Prove that in the range $-\pi < x < \pi$, $$\cosh(ax) = \frac{2a^2 \sinh(a \pi)}{\pi} \left(\frac1{2a^2} + \sum_{n=1}^\infty(-1)^n \frac{1}{n^2 + a^2}\cos (nx) \right) $$
Now, I have tried to get the Fourier series of $\cosh(ax)$.
I got
$$
a_0 = 2\frac{\sinh(a \pi)}{\pi a}\\
a_n = - \frac{2a\sinh(a \pi)}{\pi(n^2 - a^2)}
$$
Probably I got
$$
f(x) = \frac{\sinh(a \pi)}{\pi} \left( \frac1a- 2a \sum_{n=1}^\infty {(-1)^n \frac1{n^2 - a^2} \cos nx}\right)
$$
I tried twice and again I got this answer which is not matching with the question.
Please tell me what is my fault and how to solve this?