# How do you find the Maclaurin series of f(x)=cos(x) ?

Sep 22, 2014

The Maclaurin series of $f \left(x\right) = \cos x$ is
f(x)=sum_{n=0}^infty (-1)^nx^{2n}/{(2n)!}.

Let us look at some details.

The Maclaurin series for $f \left(x\right)$ in general can be found by
f(x)=sum_{n=0}^infty {f^{(n)}(0)}/{n!}x^n

Let us find the Maclaurin series for $f \left(x\right) = \cos x$.

By taking the derivatives,
$f \left(x\right) = \cos x R i g h t a r r o w f \left(0\right) = \cos \left(0\right) = 1$
$f ' \left(x\right) = - \sin x R i g h t a r r o w f ' \left(0\right) = - \sin \left(0\right) = 0$
$f ' ' \left(x\right) = - \cos x R i g h t a r r o w f ' ' \left(0\right) = - \cos \left(0\right) = - 1$
$f ' ' ' \left(x\right) = \sin x R i g h t a r r o w f ' ' ' \left(0\right) = \sin \left(0\right) = 0$
${f}^{\left(4\right)} \left(x\right) = \cos x R i g h t a r r o w {f}^{\left(4\right)} \left(0\right) = \cos \left(0\right) = 1$

Since $f \left(x\right) = {f}^{\left(4\right)} \left(x\right)$, the cycle of $\left\{1 , 0 , - 1 , 0\right\}$ repeats itself.

So, we have the series
f(x)=1-{x^2}/{2!}+x^4/{4!}-cdots=sum_{n=0}^infty(-1)^n x^{2n}/{(2n)!}