I'm working through the problems of a book on Sturm-Liouville problems. In a problem I found the Green function for the following SLP2 problem
$$\frac{-d^2g}{dx^2}-\lambda g=\delta(x-\xi)$$ $$g(0,\xi)=g(2\pi,\xi)$$ $$\frac{dg(0,\xi)}{dx}=\frac{dg(2\pi,\xi)}{dx}$$
as
$$g(x,\xi)=-\frac{\cos{(\sqrt{\lambda}(|x-\xi|-\pi))}}{2\sqrt{\lambda}\sin\sqrt\lambda \pi}$$
Now in the next problem it wants me to prove that "using the above Green function, the spectral representation for Delta function is this":
$$\delta(x-\xi)=\frac{1}{2\pi}+\frac{1}{\pi}\sum_{n=1}^{\infty}(\cos nx \cos n\xi + \sin nx \sin n\xi )$$
I have no idea how to start solving this. Can you tell me from where should I start solving this?