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

Sep 12, 2014

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

Let us look at some details.

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

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

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)!}