Calculation of $\zeta(2)$ I was attempting to calculate the value of $\zeta(2)$ (I already knew what the value is, but I was trying to derive it). I started with the sum
$$\sum_{x=1}^\infty \frac{1}{x^2}$$
and I created the function
$$g(a)=\sum_{x=1}^\infty \frac{a^x}{x^2}$$
and differentiated both sides to get
$$g'(a)=\sum_{x=1}^\infty \frac{a^{x-1}}{x}$$
$$ag'(a)=\sum_{x=1}^\infty \frac{a^x}{x}$$
I then used the formula
$$\sum_{x=1}^\infty \frac{a^x}{x}=-\ln(|1-a|)$$
and so
$$ag'(a)=-\ln(|1-a|)$$
$$g'(a)=-\frac{\ln(|1-a|)}{a}$$
Since $\zeta(2)=g(1)$, does that mean that
$$\zeta(2)=-\int_0^1 \frac{\ln(|1-a|)}{a}$$
Is my reasoning correct here? If so, how do I evaluate this integral? I can't seem to find an indefinite integral for it.
 A: Another derivation of this formula would be to use 
\begin{eqnarray*}
\frac{1}{n} =\int_0^1 x^{n-1} dx \\
\frac{1}{n} =\int_0^1 y^{n-1} dy
\end{eqnarray*}
So
\begin{eqnarray*}
\zeta(2)&=& \sum_{n=1}^{\infty} \frac{1}{n^2} \\
 &=& \int_0^1 \int_0^1 \sum_{n=1}^{\infty} x^{n-1} y^{n-1} \; dy \; dx \\
  &=& \int_0^1 \int_0^1  \frac{ \; dy \; dx }{1-xy}
\end{eqnarray*}
Now do one of these integrations and your formula follows.
A: Let's go back to the Taylor expansion of the logarithm:
$$-\ln(1-x)=\sum_{n=1}^\infty\frac{x^n}n$$
By consider $x\mapsto e^{ix}$ under the principal branch, we find that
$$-\operatorname{Log}(1-e^{ix})=\sum_{n=1}^\infty\frac{e^{inx}}n=\sum_{n=1}^\infty\frac{\cos(nx)+i\sin(nx)}n$$
Taking imaginary parts, we find that
$$\begin{align}\Im(-\operatorname{Log}(1-e^{ix}))&=-\arg(1-e^{ix})\\&=-\arg(1-\cos(x)-i\sin(x))\\&=\arctan\left(\frac{\sin(x)}{1-\cos(x)}\right)\end{align}$$
Where $\arctan(x)\in(-\pi/2,\pi/2)$.  With a few tricky half angle formulas, one further finds that
$$\arctan\left(\frac{\sin(x)}{1-\cos(x)}\right)=\frac\pi2-\frac x2,\quad x\in(0,2\pi)$$
Likewise, taking the imaginary part of our RHS, we find that,
$$\sum_{n=1}^\infty\frac{\sin(nx)}n=\frac\pi2-\frac x2$$
Integrate both sides over $x\in[0,\pi]$ we find that
$$\begin{align}\int_0^\pi\frac\pi2-\frac x2~\mathrm dx&=\frac{\pi^2}4\\&=\int_0^\pi\sum_{n=1}^\infty\frac{\sin(nx)}n~\mathrm dx\\&=\sum_{n=1}^\infty\frac2{(2n-1)^2}\\&=2\sum_{n=1}^\infty\frac1{n^2}-\frac1{(2n)^2}\\&=\frac32\sum_{n=1}^\infty\frac1{n^2}\end{align}$$
where we noted that $\int_0^\pi\sin(nx)~\mathrm dx$ equaled zero when $n$ was even and $2/n$ when $n$ was odd.

$$\therefore\sum_{n=1}^\infty\frac1{n^2}=\frac23\frac{\pi^2}4=\frac{\pi^2}6$$

