# Homework Help: Deriving Maclaurin series for tanx

1. Oct 28, 2011

### Lucy Yeats

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

State the Maclaurin series for sinx and cosx. Hence derive the Maclaurin series for tanx.

2. Relevant equations

sin(x) = x - x3/3! + x5/5! - x7/7!...
cos(x) = 1 - x2/2! + x4/4! - x6/6!...

3. The attempt at a solution

I know you divide the series for sinx by the series for cosx. However, can you do polynomial long division to get the answer? I've only done long division with polynomials starting with the highest power, so I'm confused.

2. Oct 28, 2011

### vela

Staff Emeritus
One way you can do it is to write
\begin{align*}
\tan x &= \frac{x - \frac{x^3}{3!}+\frac{x^5}{5!}-\cdots}{1-\frac{x^2}{2!}+\frac{x^4}{4!}-\cdots} \\
&= \frac{x - \frac{x^3}{3!}+\frac{x^5}{5!}-\cdots}{1 - \left(\frac{x^2}{2!}-\frac{x^4}{4!}+\cdots\right)} \\
&= \left( x - \frac{x^3}{3!}+\frac{x^5}{5!} -\cdots \right) \left[ 1 + \left(\frac{x^2}{2!}-\frac{x^4}{4!}+\cdots\right) + \left(\frac{x^2}{2!}-\frac{x^4}{4!} + \cdots\right)^2+\cdots\right]
\end{align*}What you'd want to do is figure out what terms contribute to each order of x.

3. Oct 28, 2011

### Lucy Yeats

Sorry for being slow, but how did you get that last line?

4. Oct 28, 2011

### vela

Staff Emeritus
Oh, sorry. I meant to explain that. It's using the series for 1/(1-z):
$$\frac{1}{1-z} = 1 + z + z^2 + \cdots$$In this case, you have
$$z = \frac{x^2}{2!} - \frac{x^4}{4!} + \cdots$$

You might want to see if you can figure out how to adapt long division to solve this problem. Try starting from the low-degree end and see how it works out.

5. Oct 28, 2011

### Lucy Yeats

Thanks, that's a clever method.

6. Oct 28, 2011

### lurflurf

7. Oct 28, 2011

### Dickfore

Notice that $\tan{x}$ is an odd function. Therefore, its Maclaurin series expansion contains only odd powers:
$$\tan{x} = \sum_{n= 0}^{\infty}{T_{n} \, x^{2 n + 1}}$$

You are left with finding the coefficients $\lbrace T_{n} \rbrace$. Notice that:
$$\tan{x} = \frac{\sin{x}}{\cos{x}} \Rightarrow \sin{x} = \cos{x} \, \tan{x}$$
Although you had stated the first few terms of the sine and the cosine series expansions, you need an analytic form for the whole series:
$$\sin{x} = \sum_{n = 0}^{\infty}{\frac{(-1)^{n}}{(2 n + 1)!} \, x^{2 n + 1}}$$
$$\cos{x} = \sum_{n = 0}^{\infty}{\frac{(-1)^{n}}{(2 n)!} \, x^{2 n}}$$

If you plug all these expansions in, and you use the [URL [Broken] product[/itex] to find the general term of the product of the series, and you compare them term by term, you should get an equation for the coefficients $\lbrace T_{n} \rbrace$. If you compare it with the equation that defines the Bernoulli numbers, you might find a connection.

Last edited by a moderator: May 5, 2017
8. Oct 28, 2011

### Lucy Yeats

Thanks everyone!