Calculate $\sum_{n=1}^\infty\frac{1}{n^2}$ and $\sum_{n=1}^\infty\frac{1}{n^4}$ I need to do that using 
$$\sum_{n \in \mathbb{Z}}\frac{1}{(z-n)^2}=\left(\frac{\pi}{\sin \pi z}\right)^2$$
I've already prove that this is true. The thing is that this function in meromorphic and it's poles are $\mathbb{Z}$. So the natural evauation in $0$ is not possible. I tried to think of a way to do it with that using that the singular part of this function in $n\in\mathbb{Z}$ is $\frac{1}{(z-n)^2}$, but could find a way. What I was looking was sort of substract the term where $n=0$ and divide by $2$. 
For the second sum, I didn't find a clear way. The natural evaluation in $n^2-n$ is not possible since $n$ varies in the sum.
Thanks
 A: For the first sum:
For $z = \frac12$ we have
$$\pi^2 = \frac{\pi^2}{\sin^2\frac{\pi}2} = \sum_{n\in\mathbb{Z}}\frac1{\left(n-\frac12\right)^2} = 4\sum_{n\in\mathbb{Z}}\frac1{(2n-1)^2} = 8\sum_{\substack{k\in\mathbb{N} \\ k \text{ odd}}} \frac1{k^2}$$
$$\sum_{\substack{k\in\mathbb{N} \\ k \text{ even}}} \frac1{k^2} = \sum_{\substack{k\in\mathbb{N}}} \frac1{(2k)^2} = \frac14 \sum_{k\in\mathbb{N}} \frac1{k^2}$$
$$S = \sum_{\substack{k\in\mathbb{N}}} \frac1{k^2} = \sum_{\substack{k\in\mathbb{N} \\ k \text{ even}}} \frac1{k^2} + \sum_{\substack{k\in\mathbb{N} \\ k \text{ odd}}} \frac1{k^2} = \frac14 S + \frac{\pi^2}8 \implies S = \frac{\pi^2}6$$

For the second sum differentiate the original series twice:

$$\sum_{n\in\mathbb{Z}} \frac1{(z-n)^2} = \frac{\pi^2}{\sin^2 \pi z}$$
$$-2\sum_{n\in\mathbb{Z}} \frac1{(z-n)^3} = -\frac{2\pi^3\cos \pi z}{\sin^3 \pi z}$$
$$6\sum_{n\in\mathbb{Z}} \frac1{(z-n)^4} = \frac{2\pi^4(\sin^2 \pi z + 3\cos^2\pi z)}{\sin^4 \pi z} = \frac{2\pi^4(2 + \cos(2\pi z))}{\sin^4 \pi z}$$
So $\sum_{n\in\mathbb{Z}} \frac1{(z-n)^4} = \frac{\pi^4(2 + \cos(2\pi z))}{3\sin^4 \pi z}$. Again pluggin in $z = \frac12$ gives
$$\frac{\pi^4}3 = \frac{\pi^4(2 + \cos\pi)}{3\sin^4 \frac\pi2} = \sum_{n\in\mathbb{Z}}\frac1{\left(n-\frac12\right)^4} = 16\sum_{n\in\mathbb{Z}}\frac1{(2n-1)^4} = 32\sum_{\substack{k\in\mathbb{N} \\ k \text{ odd}}} \frac1{k^4}$$
$$\sum_{\substack{k\in\mathbb{N} \\ k \text{ even}}} \frac1{k^4} = \sum_{\substack{k\in\mathbb{N}}} \frac1{(2k)^4} = \frac1{16} \sum_{k\in\mathbb{N}} \frac1{k^4}$$
$$S = \sum_{\substack{k\in\mathbb{N}}} \frac1{k^4} = \sum_{\substack{k\in\mathbb{N} \\ k \text{ even}}} \frac1{k^4} + \sum_{\substack{k\in\mathbb{N} \\ k \text{ odd}}} \frac1{k^4} = \frac1{16} S + \frac{\pi^4}{3\cdot 32} \implies S = \frac{\pi^4}{90}$$
A: Write this as
$$\frac1{z^2}+\sum_{n=1}^\infty\left(\frac{1}{(z-n)^2}+\frac{1}{(z+n)^2}\right).$$
Then
$$\frac1{(z-n)^2}=\frac1{n^2}\frac1{(1-z/n)^2}
=\sum_{k=0}^\infty\frac{(k+1)z^k}{n^{k+2}}$$
and so
$$\frac1{(z-n)^2}+\frac1{(z+n)^2}
=2\sum_{r=0}^\infty\frac{(2r+1)z^{2r}}{n^{2r+2}}.$$
Then
$$\frac1{z^2}+\sum_{n=1}^\infty\left(\frac{1}{(z-n)^2}+\frac{1}{(z+n)^2}\right)=\frac1{z^2}+2\sum_{r=0}^\infty(2r+1)\zeta(2r+2)z^{2r}$$
which you can now compare to the expansion of $\pi^2/\sin^2\pi z$.
