How do you find the Maclaurin series for ##cos^2 (x)##?

##1-x^2+x^4/3-2/45 x^6+x^8/315+cdots##

There are two methods.

1) Let ##f(x)=cos^2(x)## and use ##f(0)+f'(0)x+(f”(0))/(2!)x^2+(f”'(0))/(3!)x^3+cdots##

We have, by the and/or ,

##f'(x)=-2cos(x)sin(x)##, ##f”(x)=2sin^2(x)-2cos^2(x)##

##f”'(x)=4sin(x)cos(x)+4cos(x)sin(x)=8cos(x)sin(x)##

##f””(x)=-8sin^2(x)+8cos^2(x)##, ##f””'(x)=cdots=-32cos(x)sin(x)##,

##f”””(x)=32sin^2(x)-32cos^2(x)##, etc…

Hence, ##f(0)=1##, ##f'(0)=0##, ##f”(0)=-2##, ##f”'(0)=0##, ##f””(0)=8##, ##f””'(0)=0##, ##f”””(0)=-32##, etc…

Since ##2! =2##, ##8/(4!)=8/24=1/3##, and ##(-32)/(6!)=(-32)/720=-2/45##, this much calculation leads to an answer of

##1-x^2+x^4/3-2/45 x^6+cdots##

This does happen to converge for all ##x## and it does happen to equal ##cos^2(x)## for all ##x##. You can also check on your own that the next non-zero term is ##+x^8/315##

2) Use the well-known Maclaurin series ##cos(x)=1-x^2/(2!)+x^4/(4!)-x^6/(6!)+cdots##

##=1-x^2/2+x^4/24-x^6/720+cdots## and multiply it by itself (square it).

To do this, first multiply the first term ##1## by everything in the series to get

##cos^2(x)=(1-x^2/2+x^4/24-x^6/720+cdots)+cdots##

Next, multiply ##-x^2/2## by everything in the series to get

##cos^2(x)=(1-x^2/2+x^4/24-x^6/720+cdots)+(-x^2/2+x^4/4-x^6/48+x^8/1440+cdots)+cdots##

Then multiply ##x^4/24## by everything in the series to get

##cos^2(x)=(1-x^2/2+x^4/24-x^6/720+cdots)+(-x^2/2+x^4/4-x^6/48+x^8/1440+cdots)+(x^4/24-x^6/48+x^8/576-x^10/17280+cdots)+cdots##

etc…

If you go out far enough and combine “like-terms”, using the facts, for instance, that ##-1/2-1/2=-1## and ##1/24+1/4+1/24=8/24=1/3##, etc…, you’ll eventually come to the same answer as above:

##1-x^2+x^4/3-2/45 x^6+cdots##