"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.
 A: If by $\sum$ you mean what is usually meant, then
$$
\sum_{k=0}^{\infty} e^{ki\vartheta}
$$
diverges, and the first formula and the rest of the proof is invalid.
A: This serie doesn't converge in the usual sense (partial sum converging towards a limit), as you can extract sub-sequences that converge towards 1 or 0. But there are alternative definition of summation, like Cesaro or Abel that will make this converge.
Euler spent a lot of time trying to decide wether or not it would make sense to say that this converges.
Wikipedia articles:
1-2+3
Cesaro
Edit: For the record, this is the Dirac comb. It makes sense to admit the convergence to 1/2 if you're thinking of it as a Fourier transform.
A: You discovered a very interesting result. Its validity depends on your definition of the summation.
In the usual sense the series is divergent and doesn't have a sum. So it's invalid.
However, your equation is valid if you define the summation to be the Cesaro summation, in which case the limit of the arithmetic mean of the first partial sums of the series is used.
This type of results is widely used in physics, for example, in string theory.
A: 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?
