Formula for $\sum\cos(\pi kt)/(1+k^2)$ Is there an explicit formula for the sum
$$F = \sum_{k=0}^\infty \frac{1}{1+k^2} \cos(\pi k t)$$
This is the green function for the operator $1 + \Delta$ on the circle.
 A: Let $f(x)$ the function such that:
a) $f(x)={\rm sh}(x)$ on $[0,\pi]$;
b) $f$ is even;
c) $f$ is periodic of period $2\pi$. 
Then the Fourier series of $f$ is:
$$f(x)=\frac{{\rm ch}(\pi)-1}{\pi}+\frac{2}{\pi}\sum_{n\geq 1}\frac{(-1)^n {\rm ch}(\pi)-1}{1+n^2}\cos(nx)$$
If you put $\displaystyle F(x)=\sum_{n\geq 1}\frac{\cos(nx)}{1+n^2}$, you get that $\displaystyle F(x+\pi)=\sum_{n\geq 1}\frac{(-1)^n\cos(nx)}{1+n^2}$.
Hence:
$$f(x)=\frac{{\rm ch}(\pi)-1}{\pi}+\frac{2}{\pi}({\rm ch}(\pi)F(x+\pi)-F(x))$$
Now replace $x$ by $x+\pi$:
$$f(x+\pi)=\frac{{\rm ch}(\pi)-1}{\pi}+\frac{2}{\pi}({\rm ch}(\pi)F(x)-F(x+\pi))$$
and solve for $F(x)$; perhaps the formula is ugly, I have not done the computation. To finish, put $x=\pi t$, and add $1$. 
A: If $0 \le t \le 2 $, $$\sum_{k=0}^{\infty} \frac{\cos (k \pi t) }{1+k^{2}} = \frac{\pi}{2} \frac{\cosh [\pi(t-1)]}{\sinh \pi} + \frac{1}{2}. $$
One way to evaluate series of the form $ \displaystyle \sum f(k) e^{ik \theta}$, where $0 \le \theta \le 2 \pi$ and $f(z)$ is rational function such that $f(z) = \mathcal{O}(z^{-2})$ as $|z| \to \infty,$ is to consider the function $$g(z) = f(z) e^{i \theta z} \ \frac{2 \pi i}{e^{2 \pi iz}-1}$$ and integrate around a square with vertices at $z = \pm (N + \frac{1}{2} ) \pm i (N + \frac{1}{2})$. 
Like $ \pi \cot (\pi z)$, the function$ \displaystyle \frac{2 \pi i}{e^{2 \pi iz} -1}$ (or equivalently $\pi e^{-i \pi z} \csc (\pi z)$) has simple poles at the integers with residue $1$.
But unlike $\displaystyle \int f(z) e^{i \theta z} \ \pi \cot (\pi z) \ dz $, the integral $ \displaystyle \int f(z) e^{i \theta z} \frac{2 \pi i}{e^{2 \pi iz}-1} \ dz$ will vanish along the contour as $N \to \infty$ through the positive integers.
You can use the ML inequality to show this.
(A more subtle argument will show that the integral will vanish even if $f(z) = \mathcal{O}(z^{-1})$ as $|z|\to \infty$.)
So consider $$g(z) = \frac{e^{i \theta z}}{1+z^{2}} \frac{2 \pi i}{e^{2 \pi iz}-1}.$$
Then summing up the residues, $$ \sum_{k=-\infty}^{\infty} \text{Res}[g(z),k] + \text{Res}[g(z),i] + \text{Res}[g(z), -i] = 0$$
where $$\text{Res}[g(z),k] = \frac{e^{ik \theta}}{1+k^{2}}, $$
$$\text{Res}[g(z),i] = \lim_{z \to i} \frac{e^{i \theta z}}{z+i} \frac{2 \pi i}{e^{2 \pi iz}-1}=\frac{\pi e^{-\theta}}{e^{-2 \pi}-1}, $$
and $$\text{Res}[g(z),-i] = \lim_{z \to -i} \frac{e^{i \theta z}}{z-i} \frac{2 \pi i}{e^{2 \pi iz}-1}= -\frac{\pi e^{\theta}}{e^{2 \pi}-1}. $$
But $$ \sum_{k=-\infty}^{\infty} \frac{e^{ i k \theta}}{1+k^{2}} = 2 \sum_{k=1}^{\infty} \frac{\cos (k \theta)}{1+k^{2}} + 1 =2 \sum_{k=0}^{\infty} \frac{\cos (k \theta)}{1+k^{2}} - 1.$$
Therefore, $$ \begin{align} \sum_{k=0}^{\infty} \frac{\cos (k \theta)}{1+k^{2}} &= \frac{\pi}{2} \left(\frac{e^{\theta}}{e^{2 \pi}-1} - \frac{e^{-\theta}}{e^{-2 \pi}-1} \right) + \frac{1}{2} \\ &= \frac{\pi}{2} \left(\frac{e^{\theta - \pi }}{e^{\pi}-e^{- \pi}} + \frac{e^{-\theta + \pi}}{e^{\pi}- e^{- \pi}} \right) + \frac{1}{2} \\ &= \frac{\pi}{2} \frac{\cosh (\theta - \pi)}{\sinh \pi} + \frac{1}{2}. \end{align}   $$
Finally replace $\theta$ with $\pi t$.
