Find the function corresponds to $\sum_{n=1}^\infty \frac{(-1)^n}{n^2+\alpha^2}$ using the Fourier expansion
$$ f(x)=\frac{a_0}{2}+\sum_{n=1}^\infty (a_n\cos(nx)+b_n\sin(nx)) $$ where $$\frac{a_0}{2}=\frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)dx,\\{a_n}=\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(n x)dx,\\{b_n}=\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin(nx)dx$$
$$ \sum_{n=1}^\infty \frac{(-1)^n}{n^2+\alpha^2}=\sum_{n=1}^\infty \frac{\cos(n\pi x)}{n^2+\alpha^2} $$ How do I proceed further ?
As far as I can understand, the task is to find such a function that its Fourier series coincides with the given one at some point. $$ \frac{a_0}{2}+\sum_{n=1}^\infty \frac{(-1)^n\cos(n x)}{n^2+\alpha^2} +b_n\sin(nx) $$ Then at $x=0$, we will get the series subtracting $a_0$ if it is not zero.
Thus we need to find such an $f$ that $$ \frac{1}{\pi} \int_{-\pi}^\pi f(x)\cos(nx) dx = \frac{1}{n^2+\alpha^2}. $$ This is guessing work. Let's keep it simple and try the first thing which comes to a head. Consider $f(x)=\cos(\alpha x)$. This gives $$ \frac{1}{\pi} \int_{-\pi}^\pi f(x)\cos(nx) dx =\frac{2 \alpha (-1)^n \sin (\pi \alpha )}{\pi \alpha ^2-\pi n^2} $$ This is not exactly what we wanted, but let's change $\cos(\alpha x) \rightarrow \cos(i \alpha x)+\cos(-i \alpha x) $, the result is: $$ \frac{4 \alpha (-1)^n \sinh (\pi \alpha )}{\pi \left(\alpha ^2+n^2\right)}. $$ This is better. Thus the function we are interested in is $$ f=(\cos(i\alpha x)+\cos(-i\alpha x))\frac{\pi}{4\alpha \sinh(\pi\alpha)}=\frac{1}{2\alpha^2}+\sum_{n=1}^\infty \frac{(-1)^n\cos(n x)}{n^2+\alpha^2} +b_n\sin(nx). $$ It gives the answer for $x=0$ $$ \frac{\pi}{2\alpha \sinh(\pi\alpha)}-\frac{1}{2\alpha^2}=\sum_{n=1}^\infty \frac{(-1)^n}{n^2+\alpha^2} $$