Show $ \frac{\cosh(a( \pi -x))}{\sinh(a \pi)} = \frac{1}{a \pi} + \frac{2}{\pi} \sum_{n = 1}^{\infty}\frac{a}{a^2+n^2}\cos(nx). $ Let $f(x) = e^{-a |x|}, a > 0$. Show that 
$$ \frac{\cosh(a( \pi -x))}{\sinh(a \pi)} = \frac{1}{a \pi} + \frac{2}{\pi} \sum_{n = 1}^{\infty}\frac{a}{a^2+n^2}\cos(nx). $$ for $ 0 \leq x \leq \pi$.
So the idea is to use Poissons summation formula 
$$\sum_{n = - \infty}^{\infty} f(x+n) = \sum_{n = - \infty}^{\infty} \widehat{f}(x) e^{2 \pi i n x}.$$
I managed to show that 
$$\sum_{n = - \infty}^{\infty} \widehat{f}(x) e^{2 \pi i n x} = \frac{1}{a \pi} + \frac{2}{\pi} \sum_{n = 1}^{\infty}\frac{a}{a^2+n^2}\cos(nx),$$
however to show that 
$$\sum_{n = - \infty}^{\infty} f(x+n) = \frac{\cosh(a( \pi -x))}{\sinh(a \pi)}$$ I find more tricky. 
$$\sum_{n = - \infty}^{\infty} f(x+n) = \sum_{n = - \infty}^{\infty} e^{a |x+n|} $$
Now I would like to split the sum in two parts, but since $ 0 \leq x \leq \pi$, I consider $f(\frac{x}{\pi} + n)$ in order to get
$$\sum_{n = - \infty}^{\infty} f(\frac{x}{\pi}+n) = \sum_{n = 0}^{\infty}e^{-a(\frac{x}{\pi} + n)} + \sum_{n = 1}^{\infty}e^{a(\frac{x}{\pi} - n)} = \frac{\cosh(a( \frac{\pi}{2} -\frac{x}{\pi}))}{\sinh(\frac{a \pi}{2})}$$
Now substituting back $x \rightarrow \pi x$ gives me
$$\frac{\cosh(a( \frac{\pi}{2} -{x}))}{\sinh(\frac{a \pi}{2})} \neq \frac{\cosh(a( \pi -x))}{\sinh(a \pi)}$$
can someone see what I'm doing wrong?
Thanks
 A: 
I managed to show that 
  $\displaystyle \sum_{n = - \infty}^{\infty} \widehat{f}(x) e^{2 \pi i n x} = \frac{1}{a \pi} + \frac{2}{\pi} \sum_{n = 1}^{\infty}\frac{a}{a^2+n^2}\cos(nx)$

First, you want $\widehat{f}(n)$ instead of $\widehat{f}(x)$ on the left. More importantly, the formula can't be correct because the two sides have different periods: $1$ on the left, $2\pi$ on the right.  
You should adjust scaling in the Poisson formula: sum $\exp(-a|x|)$ over  $2\pi$-shifts instead of integer shifts. Indeed,
$$\frac{\cosh(a(\pi-x))}{\sinh (\pi a)} = \sum_{n\in\mathbb Z} \exp(-a|x+2\pi n|), \quad 0\le x\le \pi \tag1$$
because multiplying both sides by $\sinh (\pi a)=\frac12(e^{\pi a}-e^{-\pi a})$ causes the sum on the right to telescope. Namely, 
$$(e^{\pi a}-e^{-\pi a})\sum_{n=0}^\infty \exp(-a(x+2\pi n))=\exp(-ax+ a\pi ) \tag2$$
and 
$$(e^{\pi a}-e^{-\pi a})\sum_{n=-\infty}^{-1} \exp(a(x+2\pi n))=-\exp(ax-a\pi) \tag3$$
(The only surviving terms are those on the boundary of the summation).
