Let $x$ and $x'$ be in the interval $[0,L]$
Compute:
$$ \sum_{n=1}^\infty \cos\left(\frac{n\pi x}{L}\right)\cos\left(\frac{n\pi x'}{L}\right) $$
I remember a lot of time i have done this and if I'm not bat the result is $\delta(x-x')$
I have proved the sum diverges when $x'=x$ but i'm stuck when $x'\neq x$