# Homework Help: Taylor Series Question

1. Dec 5, 2009

### bobber205

Trying to find the Taylor Series for cos(x) where x0 is PI.
I've gotten

Code (Text):

cos(x) -1
-sin(x) 0
-cos(x) 1
sin(x) 0
cos(x) -1

It's clearly 0 every other term so I need 2k or 2k-1. But the -1 term switches between -1 and 1
How in world do I deal with this? xD

Thanks for any suggestions. I am assuming I've made a mistake somewhere.
I've asked my fellow students and they're cheating with k+1 which does work.

Thanks! :)

2. Dec 5, 2009

### Staff: Mentor

Why would you think k + 1 is cheating? I'm assuming you're talking about the exponent on -1 to give sign alternation.

3. Dec 5, 2009

### bobber205

Is it correct?

4. Dec 5, 2009

### diazona

Is what correct?

5. Dec 6, 2009

### HallsofIvy

So far, you have, for the Taylor's series of cosine(x), about $\pi$,
-1 + (1/2)x2- (1/4!)x4+ ...

First, it should be clear that you will only have even powers of x and even numbers can be written "2n". That is, (1/(2(2))!)x4= (1/(2!) x2(2) and (1/6!)x6 = 1/(3(2))! x2(3). The only problem, then, is the power of -1.

The first term is n= 1 and that is positive. (-1)n would give (-1)1= -1. To fix that you could just multiply the entire sum by -1:
(-1)(-1+ (1/2!)x2- (1/6!)x6+ ...+ (-1)^n/(2n)! x2n+ ...)

That is the same as multiplying the -1 in each term:
1- (1/2!)x2- (1/6!)x6+ ...+ (-1)(-1)n/(2n)! x2n+...

Which can also be written with (-1)n+1:
1- (1/2!) x2- (1/6!)x6+ ...+ (-1)n+1/(2n)! x2n+ ...

Since this is a Taylor's series about $\pi$, all of the terms should be powers of $x - \pi$, not powers of x.