"Proof" that $1-1+1-1+\cdots=\frac{1}{2}$ and related conclusion that $\zeta(2)=\frac{\pi^2}{6}.$ 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.

The equation:
$$\sum\limits_{k=1}^{\infty}(-1)^{k+1}\frac{1-\cos k\alpha}{k^2}=\frac{\alpha^2}{4}$$
seems to be valid for all $a\in[-\pi,\pi]$, so there has to be something gone right with your "proof" (or at least the idea behind it), even if it seems flawed "as-is."
I suspect that your original series are "true" if you view it with the "Cesàro" or "Abel" definition (for all but finitely many points, I hope), which makes the derivation valid. Can someone verify this?
