TITLE: $\zeta(2)$ via partial fractions
QUESTION [5 upvotes]: I was looking at old complex analysis exams, and there is one problem I can't figure out. 
"Use the partial fraction expansion of $\frac{z}{e^z-1}$ to show $\sum_1^\infty 1/k^2=\frac{\pi^2}{6}$."
I recognize that as the generating function for the Bernoulli numbers, but I think the point of the problem is to solve it "from scratch", without that kind of knowledge. 
The function has simple poles at $2\pi i k$ for $k\in\mathbb{Z}$, and residue $2\pi i k$  at $2\pi i k$ . Unfortunately, the obvious series, with terms of the form $\frac{2\pi i k}{z-2\pi i k}$, doesn't converge. Adding convergence terms (like in the proof of Mittag-Leffler's theorem) I get a series with terms of the form $\frac{z^2}{z^2-k^2}$, modulo some constants, but I don't see where to go from there, because it vanishes at 0. I think point is that we are supposed to evaluate the partial fraction decomposition at 0, as the function is clearly 1 there. 
Thanks for the help.
As noted in the comments, there is an answer here that looks similar to what is intended: https://math.stackexchange.com/a/8373/1102 , however it seems much too involved for an exam setting, and is deliberately not rigorous. Would it be possible to modify it to be simpler and faster?
Edit: I managed to figure out a fairly slick solution that's much better than the accepted answer. I don't have time to write it up right now. If you read this and want to see it, ping me by posting a comment to this question.

REPLY [2 votes]: Potato, this is just an idea, but note that
$$\int\limits_0^\infty  {\frac{x}{{{e^x} - 1}}dx}  = \frac{{{\pi ^2}}}{6}$$
With a change of variables one has that
$$\int\limits_0^\infty  {\frac{x}{{{e^x} - 1}}dx}  =  - \int\limits_0^1 {\frac{{\log \left( {1 - x} \right)}}{x}dx} $$
Now use
$$ - \frac{{\log \left( {1 - x} \right)}}{x} = \sum\limits_{k = 1}^\infty  {\frac{{{x^{k - 1}}}}{k}} \text{ ; } |x|&lt1$$
from where
$$ - \int\limits_0^x {\frac{{\log \left( {1 - t} \right)}}{t}dt}  = \sum\limits_{k = 1}^\infty  {\frac{{{x^k}}}{{{k^2}}}} $$
This means that
$$\int\limits_0^\infty  {\frac{x}{{{e^x} - 1}}dx}  =  - \int\limits_0^1 {\frac{{\log \left( {1 - t} \right)}}{t}dt}  = \sum\limits_{k = 1}^\infty  {\frac{1}{{{k^2}}}} $$
So you might want to use residues (which I don't know about), to calculate 
$$\int\limits_0^\infty  {\frac{z}{{{e^z} - 1}}dz} $$
since it has singularities at every $z_k=2\pi ki$

Another known approach is given here, starting at $(35)$
$$\frac{z}{2} + \frac{z}{{{e^z} - 1}} = \frac{z}{2}\coth \frac{z}{2}$$
from where
$$\frac{z}{2}\coth \frac{z}{2} = \sum\limits_{n = 0}^\infty  {{B_{2n}}\frac{{{z^{2n}}}}{{\left( {2n} \right)!}}} $$
and then
$$z\coth z = \sum\limits_{n = 0}^\infty  {\frac{{{2^{2n}}{B_{2n}}}}{{\left( {2n} \right)!}}{z^{2n}}} $$
they then let $z=iz$, from where
$$z\cot z = \sum\limits_{n = 0}^\infty  {{{\left( { - 1} \right)}^n}\frac{{{2^{2n}}{B_{2n}}}}{{\left( {2n} \right)!}}{z^{2n}}} $$
They go on with partial fractions expansions, but I remember seeing elsewhere this:
$$\sin z = z\prod\limits_{n = 1}^\infty  {\left( {1 - \frac{{{z^2}}}{{{n^2}{\pi ^2}}}} \right)} $$
then
$$\log \sin z = \sum\limits_{n = 1}^\infty  {\log \left( {1 - \frac{{{z^2}}}{{{n^2}{\pi ^2}}}} \right)}+\log z $$
Differentiating and multiplying by $z$ gives
$$z\cot z = 1-2\sum\limits_{n = 1}^\infty  {\dfrac{{  \dfrac{{{z^2}}}{{{n^2}{\pi ^2}}}}}{{1 - \dfrac{{{z^2}}}{{{n^2}{\pi ^2}}}}}} $$
but since
$$\frac{{\frac{{{z^2}}}{{{n^2}{\pi ^2}}}}}{{1 - \frac{{{z^2}}}{{{n^2}{\pi ^2}}}}} = \sum\limits_{k = 1}^\infty  {\frac{1}{{{n^{2k}}{\pi ^{2k}}}}} {z^{2k}}$$
they write 
$$z\cot z =  1- 2\sum\limits_{n = 1}^\infty  {\sum\limits_{k = 1}^\infty  {\frac{1}{{{n^{2k}}}}} \frac{{{z^{2k}}}}{{{\pi ^{2k}}}}} $$
then changing the order of the sum 
$$z\cot z = 1 - 2\sum\limits_{k = 1}^\infty  {\frac{{\zeta \left( {2k} \right)}}{{{\pi ^{2k}}}}{z^{2k}}} $$
Thus, since
$$z\cot z = 1 + \sum\limits_{n = 1}^\infty  {{{\left( { - 1} \right)}^n}\frac{{{2^{2n}}{B_{2n}}}}{{\left( {2n} \right)!}}{z^{2n}}} $$
they argue that
$${\left( { - 1} \right)^{n + 1}}\frac{{{2^{2n - 1}}{B_{2n}}}}{{\left( {2n} \right)!}}{\pi ^{2n}} = \zeta \left( {2n} \right)$$