# Something I don't understand about taylor series

1. Jun 8, 2012

### tamtam402

1. The problem statement, all variables and given/known data

Let's say I'm asked to find the taylor expansion for cot x, at the given point a = π/2.

2. Relevant equations

3. The attempt at a solution

My first thought would be to take the mc laurin series expansion for cotx, which is:
cot x = 1/x + x/3 - x3/45 ...
and substitute x for z-π/2.

According to my solution manual, that isn't correct. By messing around with trig identities, I solved the problem in the following way:

cot x = cot (π/2 + x - π/2) = -tan(x - π/2)
I took the mc laurin series expansion for tanx, multiplied it by -1, replaced x by z-π/2 and found the right answer.

Why wasn't I allowed to substitute x = z - π/2 in cot x, yet doing the same thing in -tanx gave me the right answer?

2. Jun 8, 2012

### vela

Staff Emeritus
Because cot x, which is what you're being asked to calculate, isn't equal to cot (x-pi/2), which is what you calculated.

3. Jun 8, 2012

### tamtam402

Isn't a taylor series development the development of f(x-a)? I wasn't asked to evaluate cot x for x = pi/2, I was asked to evaluate the Taylor expansion at a = pi/2.

I'm self-studying from Boas book and there's pretty much no explanation given on series. If someone would be kind enough to provide me a link to demistify the difference between Taylor and McLaurin expansions, I'd be very grateful*.

4. Jun 8, 2012

### HallsofIvy

NO, it isnt. A Taylor's series for f(x) at x= a is a power series for f(x) at the point x= a. That is NOT, in general, a power series for f(x-a).

5. Jun 8, 2012

### vela

Staff Emeritus
You might want to check out a freshman calculus book for review purposes. Boas assumes you are already familiar with the basics of these series. In any case, a MacLaurin series is the Taylor series for a=0. The Taylor series about x=a is simply
$$f(x) = f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\cdots.$$ It's a power series in x-a, not f(x-a).

Here's a specific example of the difference. The MacLaurin series for sin x is
$$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots.$$ If you substitute, say, $x=z-\pi/2$, you'd get
$$(z-\pi/2) - \frac{(z-\pi/2)^3}{3!} + \frac{(z-\pi/2)^5}{5!} - \cdots = \sin(z-\pi/2) = -\cos z.$$ If you use the formula above to find the series for sine about $x=\pi/2$, you'd actually get
$$\sin x = 1 - \frac{(x-\pi/2)^2}{2!} + \frac{(x-\pi/2)^4}{4!} - \cdots.$$

6. Jun 9, 2012

### Ray Vickson

The Taylor series for cot x at x = π/2 is the Maclaurin series of f(z) = cot(π/2 + z) around z = 0. If you try to get it from the Maclaurin series around x = 0, here is what happens:
$$\cot(\pi/2 + z) = \frac{1}{\pi/2 + z} - \frac{1}{3} (\pi/2 + z) - \frac{1}{45} (\pi/2 + z)^3 - \frac{2}{945} (\pi/2 + z)^5 + \cdots.$$
The constant term (not containing z) in the expansion is
$$c_0 = \frac{2}{\pi}-\frac{1}{3}\frac{\pi}{2} - \frac{1}{45}\frac{\pi^3}{2^3} - \frac{2}{945} \frac{\pi^5}{2^5} - \cdots.$$
Similarly, you can get the coefficient c1 of z1, c2 of z2, etc. However, these coefficients themselves are infinite series, so this is not at all useful.

RGV

7. Jun 9, 2012

### tamtam402

Alright, thanks everyone :)