How do you find the taylor series for f(x) = cos x  centered at a=pi?

Aug 4, 2015

The general formula for the Taylor Series is as follows:

sum_(n=0)^(N) f^((n))(a)/(n!)(x-a)^n
with ${f}^{\left(n\right)} \left(a\right)$ being the $n$th derivative of $f \left(x\right)$ at $x \to a$.

Thus, we have to take the derivative multiple times. You should also consider the following:

• $x \to a$, but only for $f \left(a\right)$, not ${\left(x - a\right)}^{n}$.
• $n$ varies, but $a$ does not
• Usually, taking the derivatives first makes things easier the rest of the way through
• For this case, since we are working with ${\lim}_{x \to a} {\left[\cos x\right]}^{\left(n\right)}$ at $a = \pi$, and some derivatives of $\cos x$ give some form of $\sin x$, we can omit the odd terms due to the anticipation of $\sin \pi = 0$.

Let us go to $n = 4$ (one might also say "truncate the series at $n = 4$").

${f}^{\left(0\right)} \left(x\right) = \textcolor{g r e e n}{f \left(x\right) = \cos x}$
$\textcolor{g r e e n}{f ' \left(x\right) = - \sin x}$
$\textcolor{g r e e n}{f ' ' \left(x\right) = - \cos x}$
$\textcolor{g r e e n}{f ' ' ' \left(x\right) = \sin x}$
$\textcolor{g r e e n}{f ' ' ' ' \left(x\right) = \cos x}$

Now, writing it out, we get:

= (f(a))/(0!)(x-a)^0 + (f'(a))/(1!)(x-a)^1 + (f''(a))/(2!)(x-a)^2 + (f'''(a))/(3!)(x-a)^3 + (f''''(a))/(4!)(x-a)^4 + ...

= (cosa)/(0!)(x-a)^0 + (-sina)/(1!)(x-a)^1 + (-cosa)/(2!)(x-a)^2 + (sina)/(3!)(x-a)^3 + (cosa)/(4!)(x-a)^4

= cospi + (-sinpi)/(1!)(x-pi) + (-cospi)/(2!)(x-pi)^2 + (sinpi)/(3!)(x-pi)^3 + (cospi)/(4!)(x-pi)^4

but $\sin \pi = 0$... so the odd terms go away (we talked about this!):

$= \cos \pi + \cancel{\left(- \sin \pi\right) \left(x - \pi\right)} + \frac{- \cos \pi}{2} {\left(x - \pi\right)}^{2} + \cancel{\frac{\sin \pi}{6} {\left(x - \pi\right)}^{3}} + \frac{\cos \pi}{24} {\left(x - \pi\right)}^{4}$

$= \textcolor{b l u e}{\cos \pi - \frac{\cos \pi}{2} {\left(x - \pi\right)}^{2} + \frac{\cos \pi}{24} {\left(x - \pi\right)}^{4} - \ldots}$