Sorry if this has been posted before. Can somebody please tell me whether this result is correct, and give explanation as to why or why not? I'm not good at the formal side of maths.
Start here: $$\sum\limits_{k=0}^{\infty}e^{ki\vartheta}=\frac{1}{2}+\frac{i}{2}\cot\frac{\vartheta}{2},~0<\vartheta<2\pi.$$
Then equate the real and imaginary parts, so $$\begin{align*}\sum\limits_{k=1}^{\infty}\cos k\vartheta &=-\frac{1}{2},\\ \sum\limits_{k=1}^{\infty}\sin k\vartheta &=0.\end{align*}$$ For $\varphi=\vartheta+\pi$ for $-\pi<\varphi<\pi$ we could write the cosine equation as $\frac{1}{2}-\cos\varphi+\cos 2\varphi-\cdots=0$ which would mean $$1-1+1-1+\cdots=\frac{1}{2}.$$ I'm not a mathematician - is this valid?
Edit: For context, here is why I want this result. If the cosine formula holds and we can integrate it twice to some angle $0<\varphi<\alpha$ then get this interesting result $$\sum\limits_{k=1}^{\infty}(-1)^{k+1}\frac{1-\cos k\alpha}{k^2}=\frac{\alpha^2}{4}$$ which for the angle of $\pi$ would imply that $$\sum\limits_{k=1}^{\infty}\frac{1}{(2k-1)^2}=\frac{\pi^2}{8}=\zeta(2)-\sum\limits_{k=1}^{\infty}\frac{1}{(2k)^2}=\frac{3}{4}\zeta(2)$$ and finally we get $\zeta(2)=\frac{\pi^2}{6}.$ It's interesting that such a pretty result comes out of what is essentially crappy maths.
Also has that $$1-\frac{1}{4}+\frac{1}{9}-\cdots=\frac{\pi^2}{12}$$ by the way.