How to evaluate this sum $\sum_{n=0}^\infty \frac{\cos\left(\left(2n+1\right)\phi\right)}{\cos^{2n+1}\left(\phi\right)}$? $$\sum_{n=0}^\infty \frac{\cos\left(\left(2n+1\right)\phi\right)}{\cos^{2n+1}\left(\phi\right)}$$
Mathematica returns
$$\frac{2}{3}\left(-2+\frac{1}{5+3\cos{\left(2\phi\right)}}\right)$$
but I'm at a loss here. Doesn't this sum have convergence issues for $\phi=0$ or any other value for that matter?
If this evaluation is true, how would I go about showing this or whatever evaluation it may actually be?
 A: You are right in that it doesn't converge for any $\phi$ (as the limit of the summands isn't $0$). I'm guessing that Mathematica did something like the following behind the scenes: $$\sum_{n=0}^\infty \frac{\cos\left(\left(2n+1\right)\phi\right)}{\cos^{2n+1}\left(\phi\right)} = \sum_{n=0}^\infty \frac{\frac{e^{i\left(\left(2n+1\right)\phi\right)}+e^{-i\left(\left(2n+1\right)\phi\right)}}{2}}{\left( \frac{e^{i\phi}+e^{-i\phi}}{2} \right)^{2n+1}}$$
which would be equal to $$\sum_{n=0}^\infty \frac{e^{i\left(\left(2n+1\right)\phi\right)}}{\left(e^{i\phi}+e^{-i\phi} \right)^{2n+1}}2^{2n}+\sum_{n=0}^\infty \frac{e^{-i\left(\left(2n+1\right)\phi\right)}}{\left(e^{i\phi}+e^{-i\phi} \right)^{2n+1}}2^{2n}$$ if both sums converged. The first sum is $-\frac{e^{i\phi}\cos(\phi)}{-1+\cos(2\phi)+2i\sin(2\phi)}$ when $3e^{-2\Im(\phi)}-e^{2\Im(\phi)} < 2\cos(2\Re(\phi))$. The second sum is $\frac{1}{-1+e^{2ix}+2i\tan(x)}$ when $3e^{2\Im(\phi)}-e^{-2\Im(\phi)} < 2\cos(2\Re(\phi))$. Add these up and "ignore" the restrictions on $\phi$ to get what Mathematica got.
