Why does this series define $\tan (z)$?

140 Views Asked by At

According to Wolfram Alpha, $\tan(z) = i\left(1+2\sum_{k=1}^{\infty}(-1)^kq^{2k}\right): q=e^{iz}$. It seemed to make sense when I first looked at it, but upon closer examination, I am convinced that this is not the case. Just look, for $\tan(\frac{\pi}4)=$ $$ e^{iz}=\cos(z)+i\sin(z)\\ i\left(1+2\sum_{k=1}^{\infty}(-1)^ke^{\frac{\pi ki}2}\right)\\ i\left(1\quad\underset{\text{periodic, cancels}}{\underbrace{-2e^{\frac{i\pi}2}+2e^{i\pi}-2e^{\frac{3i\pi}2}+2e^{2i\pi}\dots}}\right)\\ i\left(1\quad\underset{\text{periodic, cancels}}{\underbrace{-2i\boxed{-2}+2i+\boxed{2}\dots}}\right)\\ \downarrow\\ \tan\left(\frac\pi4\right)=i $$ Clearly, this is a contradiction. However, I don't know where I went wrong... can someone point out where I did? Or is Wolfram Alpha just wrong?

EDIT: I know this may seem as if I am assuming that there is a "final value" to a periodic sum, to say that it cancels, but it is also assuming that there is a final value to assume that the sum equates to anything at all. So what gives?

1

There are 1 best solutions below

0
On BEST ANSWER

The Euler sum of $-2i-2+2i+2...$ is not $0$. It is $-1-i$. Put that in for the periodic sum and get $\tan(\pi/4)=1$ as expected.

I used the Euler sum above. When $z$ is real we find this necessary, as the series does not strictly converge. The Euler sum, where it exists, gives the tangent as a limiting value from arguments in the upper half plane where the series really does converge.