# Power series of tan(x), cot(x), csc(x)

Here’s a little how-to on figuring out the power series of tan(x), cot(x) and csc(x).

$$\displaystyle \sum_{k=0}^{\infty} B_k \frac{t^k}{k!} = \frac{t}{e^t-1}$$

Take only the even powers of t on the LHS:

$$\displaystyle \sum_{k=0}^{\infty} B_k \frac{t^k}{k!} + \sum_{k=0}^{\infty} B_k \frac{(-t)^k}{k!} = \frac{t}{e^t-1} – \frac{t}{e^{-t}-1}$$

$$\displaystyle 2 \sum_{k=0}^{\infty} B_{2k} \frac{t^{2k}}{(2k)!} = \frac{t\left(e^{-t}-e^t\right)}{\left(e^t-1\right)\left(e^{-t}-1\right)}$$

$$\displaystyle = \frac{t\left(e^{-\frac{1}{2} t}+e^{\frac{1}{2} t}\right)\left(e^{-\frac{1}{2} t}-e^{\frac{1}{2} t}\right)}{e^{\frac{1}{2} t}\left(e^{\frac{1}{2} t}-e^{-\frac{1}{2} t}\right)e^{-\frac{1}{2} t}\left(e^{-\frac{1}{2} t}-e^{\frac{1}{2} t}\right)}$$

$$\displaystyle = \frac{t\left(e^{\frac{1}{2} t}+e^{-\frac{1}{2} t}\right)}{e^{\frac{1}{2} t}-e^{-\frac{1}{2} t}}$$

Put $$t=2ix$$:

$$\displaystyle 2 \sum_{k=0}^{\infty} B_{2k} \frac{(2ix)^{2k}}{(2k)!} = \frac{2ix\left(e^{ix}+e^{-ix}\right)}{e^{ix}-e^{-ix}}$$

$$\displaystyle \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k x^{2k-1}}{(2k)!} = \frac{i\left(e^{ix}+e^{-ix}\right)}{e^{ix}-e^{-ix}}$$

Recall that $$\sin x = \frac{e^{ix}-e^{-ix}}{2i}$$ and $$\cos x = \frac{e^{ix}+e^{-ix}}{2}$$:

$$\displaystyle \frac{\cos x}{\sin x} = \cot x = \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k x^{2k-1}}{(2k)!}$$

That was pretty easy. How about tan and csc?

Consider

$$\displaystyle \cot x – 2\cot 2x = \cot x – \frac{\cot^2 x – 1}{\cot x}$$

$$\displaystyle = \frac{1}{\cot x}$$

$$\displaystyle = \tan x$$

$$\displaystyle \tan x = \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k x^{2k-1}}{(2k)!} – 2\sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k 2^{2k-1} x^{2k-1}}{(2k)!}$$

$$\displaystyle \tan x = \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k (1-4^k) x^{2k-1}}{(2k)!}$$

And finally,

$$\displaystyle \cot x – \cot 2x = \cot x – \frac{\cot^2 x – 1}{2\cot x}$$

$$\displaystyle = \frac{\csc^2 x}{2\cot x}$$

$$\displaystyle = \frac{1}{2 \sin x \cos x}$$

$$\displaystyle = \csc 2x$$

$$\displaystyle \csc x = \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k x^{2k-1}}{2^{2k-1} (2k)!} – \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k 4^k x^{2k-1}}{(2k)!}$$

$$\displaystyle \csc x = \sum_{k=0}^{\infty} B_{2k} \frac{(-1)^k (2-4^k) x^{2k-1}}{(2k)!}$$

This entry was posted in Mathematics and tagged . Bookmark the permalink.

### 3 Responses to Power series of tan(x), cot(x), csc(x)

1. fyyre says:

More code, less math.

2. drac says:

Thanks, Nice little piece =)

3. Sungu says:

Please,may u assist me on this problem. I will be very grateful if assisted=Tan(n/2+h)