calculating the sum of a series I was wondering if there is a way to use complex-analysis to solve the sum of the following series? (just like you can use it to solve integrals of some kinds (using fourier's transform for integrals).

$$\sum^{\infty}_{n=0}\frac{1}{n^2+25}$$

and

$$\sum^{\infty}_{n=0}\frac{(-1)^n}{n^2+25}$$

And if not, how to solve them otherwise?
thanks in advance!
 A: We can evaluate the two sums using following expansions of trigonometry functions
which can be proved using Mittag Leffler's theorem:
$$
\frac{\cos x}{\sin x} = \lim_{N\to\infty}\sum_{n=-N}^N \frac{1}{x+n\pi}
\quad\text{ and }\quad
\frac{1}{\sin x} = \lim_{N\to\infty}\sum_{n=-N}^N \frac{(-1)^n}{x+n\pi}
$$
Let's look at the expansion at the left first. Substitute $x$ by $\pi y i$, move the term for $n = 0$ and group the terms for $+n$ and $-n$ togather, we get
$$\frac{\cos(\pi y i)}{\sin(\pi y i)} - \frac{1}{\pi y i} = \frac{1}{\pi}\sum_{n=1}^\infty \left(\frac{1}{y i + n} + \frac{1}{yi - n}\right)
= \frac{2 y}{\pi i}\sum_{n=1}^\infty\frac{1}{y^2+n^2}$$
This leads to
$$\sum_{n=0}^\infty \frac{1}{y^2+n^2} = \frac{1}{y^2} + \frac{\pi}{2y}\left( \frac{\cosh(\pi y)}{\sinh(\pi y)} - \frac{1}{\pi y}\right)
= \frac{1}{2y^2} + \frac{\pi}{2y}\frac{\cosh(\pi y)}{\sinh(\pi y)}
$$
The evaluation of the second sum is pretty similar, you get something like
$$
\sum_{n=0}^\infty \frac{(-1)^n}{y^2+n^2} = \frac{1}{2y^2} + \frac{\pi}{2y} \frac{1}{\sinh(\pi y)}
$$
As a result, one get
$$
\sum_{n=0}^\infty \frac{1}{25+n^2} = \frac{1}{50} + \frac{\pi}{10}\frac{\cosh(5\pi)}{\sinh(5\pi)}
\quad\text{ and }\quad
\sum_{n=0}^\infty \frac{(-1)^n}{25+n^2} = \frac{1}{50} + \frac{\pi}{10}\frac{1}{\sinh(5\pi)}$$
A: Solution via Fourier's series:
Note that (see  here)
$$
\int \cos {nx} ~ \cosh {bx} dx = \dfrac{1}{n^2+b^2}
\left(n \sin nx \cosh bx + b \cos nx \sinh bx \right) + C
$$
(form is very close to given $\pm\dfrac{1}{n^2+25}$).
Now consider function 
$$
f(x)=\cosh {5x}, \qquad x\in [-\pi,\pi];
$$
and make it $2\pi$-periodic (so, $f(x)$ is continuous function).
Fourier series of this even function will have form
$$
f(x) = \dfrac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos{nx},
$$
where 
coefficients $a_n$ are:
$$
a_n = \dfrac{2}{\pi}\int_{0}^{\pi} \cosh {5x} ~ \cos nx \; dx 
= 
\dfrac{10 \cos {n\pi} \sinh{5\pi}}{\pi(n^2+25)} = \dfrac{10\sinh{5\pi}}{\pi} \cdot \dfrac{(-1)^n }{n^2+25}.
$$
As $f(x)$ is continuous, then 
$$
\dfrac{a_0}{2}+f(0) 
= \sum\limits_{n=0}^{\infty} a_n \cos (n \cdot 0) 
= \sum\limits_{n=0}^{\infty} a_n 
= \dfrac{10\sinh{5\pi}}{\pi} \sum\limits_{n=0}^{\infty} \dfrac{(-1)^n}{n^2+25},
$$
$$
\dfrac{a_0}{2} + f(\pi) 
= \sum\limits_{n=0}^{\infty} a_n \cos n\pi 
= \sum\limits_{n=0}^{\infty}(-1)^n a_n 
= \dfrac{10\sinh{5\pi}}{\pi} \sum\limits_{n=0}^{\infty} \dfrac{1}{n^2+25}.
$$
Note that
$~~\dfrac{a_0}{2}+f(0) = \dfrac{\sinh 5\pi}{5\pi}+1$, 
$~~\dfrac{a_0}{2}+f(\pi) = \dfrac{\sinh 5\pi}{5\pi}+\cosh{5\pi}$,
so
$$
\sum_{n=0}^\infty \dfrac{(-1)^n}{n^2+25} = \dfrac{\pi\left(\frac{\sinh 5\pi}{5\pi}+1\right)}{10\sinh 5\pi} 
= \dfrac{1}{50}+\dfrac{\pi}{10}\dfrac{1}{\sinh 5\pi},
$$
$$
\sum_{n=0}^\infty \dfrac{1}{n^2+25} = \dfrac{\pi\left(\frac{\sinh 5\pi}{5\pi}+\cosh{5\pi}\right)}{10\sinh 5\pi}
= \dfrac{1}{50}+\dfrac{\pi}{10}\dfrac{\cosh 5\pi}{\sinh 5\pi}.
$$
