Let $f:\mathbb R\longrightarrow \mathbb R$ s.t. $f(x)=e^{-x}$ on $[0,L)$ and s.t. $f(x+L)=f(x)$.
1) Find Fourier coefficient.
2) Deduce $\sum_{n=1}^\infty \frac{1}{n^2+1}$.
For 1), I found $$c_n=\frac{1}{L+2i\pi n}\left(e^{-(L+2i\pi n)x}-1\right),$$
but how can I deduce 2) ? The thing I know it's that $$f(x)=\sum_{k\in\mathbb Z}c_ke^{\frac{2i\pi nx}{L}}$$ on $[0,L)$, but even, I can't conclude.