I have to calculate $\sum\limits_{n=1}^{\infty} \frac{a\cos(nx)}{a^2+n^2}$ for $x\in(0,2\pi)$.
I have used the function $f(x)=e^{ax}$ and I have calculated the Fourier coefficients which are: $$a_0=\dfrac 1{2a} \dfrac {e^{2\pi a}-1}{\pi}$$ $$a_n=\dfrac {e^{2\pi a}-1}{\pi} \dfrac{a}{a^2+n^2}$$ $$b_n=\dfrac {e^{2\pi a}-1}{\pi} \dfrac{-n}{a^2+n^2}$$
In the end, when it is written as Fourier series: $$e^{ax}=\frac{e^{2\pi a}-1}{\pi}\left(\frac{1}{2a}+\sum^\infty_{n=1}\frac{a\cos(nx)-n\sin(nx)}{a^2+n^2}\right),\text{ for }x\in(0,2\pi).$$
My question is how can I use all these facts to calculate $\sum\limits_{n=1}^{\infty} \frac{a\cos(nx)}{a^2+n^2}$?