What is the Taylor series for #cosx# centered around #x = pi#?

1 Answer
Apr 6, 2017

The general formula for a Taylor series is:

#f(x) = sum_(n=0)^(oo) (f^((n))(a))/(n!)(x-a)^n#

where #f^((n))(a)# is the #n#th derivative of #f# defined at #x = a#. Thus, it makes sense to take some derivatives when finding the Taylor series.

#f^((0))(x) = f(x) = cosx#

#f'(x) = -sinx#

#f''(x) = -cosx#

#f'''(x) = sinx#

#f''''(x) = cosx#

etc.

Therefore, the Taylor series centered at #x = a# is:

#= (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 + ...#

But #sin(pi) = 0#, so for all odd derivatives, the term vanishes. Thus, we get:

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

#= color(blue)(-1 + 1/2(x-pi)^2 - 1/24(x-pi)^4 + . . . )#

Generalizing this...

  • We have that the series alternates sign, so we include a #(-1)^n# term somewhere...
  • We also have the #(x-pi)^n# term, obviously, but we specify even #n# to ignore the odd terms (which are zero), so we can use #2n#.
  • We have a negative sign out front, since the first term in a Taylor series tends to be #1#.
  • We would have to specify even #n# for the factorial terms, so the factorial terms go as #(2n)!#, i.e. #0!#, #2!#, #4!#, etc.

So, our instinct gives us a series representation as:

#sum_(n=0)^(oo) -((-1)^(n)(x-pi)^(2n))/((2n)!)#

#= color(blue)(sum_(n=0)^(oo) ((-1)^(n+1)(x-pi)^(2n))/((2n)!))#

#= ((-1)^(0+1)(x-pi)^(2*0))/((2*0)!) + ((-1)^(1+1)(x-pi)^(2*1))/((2*1)!) + ((-1)^(2+1)(x-pi)^(2*2))/((2*2)!) + ((-1)^(3+1)(x-pi)^(2*3))/((2*3)!) + . . . #

#= color(blue)(-1 + 1/2(x-pi)^2 - 1/24(x-pi)^4 + 1/720(x-pi)^6 - . . . )#