Different ways to prove $\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}$ (the Basel problem)

As I have heard people did not trust Euler when he first discovered the formula (solution of the Basel problem) $$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}$$ However, Euler was Euler and he gave other proofs.

I believe many of you know some nice proofs of this, can you please share it with us?

• @J.M. Thanks. But Euler could very well be a good tag I believe. Commented Oct 30, 2010 at 10:16
• Robin Chapman has a collection of proofs on his homepage: empslocal.ex.ac.uk/people/staff/rjchapma/etc/zeta2.pdf Commented Oct 30, 2010 at 10:32
• makes no sense to have an Euler tag... maybe Eulerian but that's pushing it.
– anon
Commented Oct 30, 2010 at 10:46
• Probably Robin should answer with a link to his note. I know I've pointed people to it when they ask precisely this, and they've always been more than satisfied! Commented Oct 30, 2010 at 14:09
• What I like the most about this thread is that I know most of the proofs that I've seen posted up to this time, it makes me think that perhaps I was given adequate mathematical education after all :) Commented Nov 1, 2010 at 12:57

There is a simple way of proving that $\sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}$ using the following well-known series identity: $$\left(\sin^{-1}(x)\right)^{2} = \frac{1}{2}\sum_{n=1}^{\infty}\frac{(2x)^{2n}}{n^2 \binom{2n}{n}}.$$ From the above equality, we have that $$x^2 = \frac{1}{2}\sum_{n=1}^{\infty}\frac{(2 \sin(x))^{2n}}{n^2 \binom{2n}{n}},$$ and we thus have that: $$\int_{0}^{\pi} x^2 dx = \frac{\pi^3}{12} = \frac{1}{2}\sum_{n=1}^{\infty}\frac{\int_{0}^{\pi} (2 \sin(x))^{2n} dx}{n^2 \binom{2n}{n}}.$$ Since $$\int_{0}^{\pi} \left(\sin(x)\right)^{2n} dx = \frac{\sqrt{\pi} \ \Gamma\left(n + \frac{1}{2}\right)}{\Gamma(n+1)},$$ we thus have that: $$\frac{\pi^3}{12} = \frac{1}{2}\sum_{n=1}^{\infty}\frac{ 4^{n} \frac{\sqrt{\pi} \ \Gamma\left(n + \frac{1}{2}\right)}{\Gamma(n+1)} }{n^2 \binom{2n}{n}}.$$ Simplifying the summand, we have that $$\frac{\pi^3}{12} = \frac{1}{2}\sum_{n=1}^{\infty}\frac{\pi}{n^2},$$ and we thus have that $\sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}$ as desired.

Another proof i have (re?)discovered.

I want to prove that,

$\displaystyle J:=\int_0^1 \frac{\ln(1+x)}{x}dx=\frac{\pi^2}{12}$

Let $f$, be a function, such that, for $s\in[0;1]$,

$\displaystyle f(s)=\int_0^{\frac{\pi}{2}} \arctan\left(\frac{\sin t}{\cos t+s}\right)\,dt$

Observe that,

\begin{align} f(0)&=\int_0^{\frac{\pi}{2}}\arctan\left(\frac{\sin t}{\cos t}\right)\,dt\\ &=\int_0^{\frac{\pi}{2}} t\,dt\\ &=\left[\frac{t^2}{2}\right]_0^{\frac{\pi}{2}}\\ &=\frac{\pi^2}{8} \end{align}

For $t$ in $\left[0,\frac{\pi}{2}\right]$,

\begin{align} \frac{\sin t}{\cos t+1}&=\frac{2\sin\left(\frac{t}{2}\right)\cos\left(\frac{t}{2}\right)}{\cos^2\left(\frac{t}{2}\right)-\sin^2\left(\frac{t}{2}\right)+1}\\ &=\frac{2\sin\left(\frac{t}{2}\right)\cos\left(\frac{t}{2}\right)}{2\cos^2\left(\frac{t}{2}\right)}\\ &=\tan\left(\frac{t}{2}\right) \end{align}

Therefore,

\begin{align} f(1)&=\int_0^{\frac{\pi}{2}}\arctan\left(\frac{\sin t}{\cos t+1}\right)\,dt\\ &=\int_0^{\frac{\pi}{2}}\arctan\left(\tan\left(\frac{t}{2}\right)\right)\,dt\\ &=\int_0^{\frac{\pi}{2}} \frac{t}{2}\,dt\\ &=\left[\frac{t^2}{4}\right]_0^{\frac{\pi}{2}}\\ &=\frac{\pi^2}{16} \end{align}

For $s$ in $[0,1]$,

\begin{align} f^\prime(s)&=-\int_0^{\frac{\pi}{2}}\frac{\sin t}{1+2s\cos t+s^2}\,dt\\ &=\left[\frac{\ln(1+2s\cos t+s^2)}{2s}\right]_0^{\frac{\pi}{2}}\\ &=\frac{1}{2}\frac{\ln\left(1+s^2\right)}{s}-\frac{\ln\left(1+s\right)}{s} \end{align}

Therefore,

\begin{align} f(1)-f(0)&=\int_0^1 f^\prime(s)ds\\ &=\frac{1}{2}\int_0^1\frac{\ln\left(1+s^2\right)}{s}\,ds-\int_0^1 \frac{\ln\left(1+s\right)}{s}\,ds\\ \end{align}

In the first integral perform the change of variable $y=s^2$, therefore,

$\displaystyle f(1)-f(0)=-\frac{3}{4}J$

But,

\begin{align} f(1)-f(0)&=\frac{\pi^2}{16}-\frac{\pi^2}{8}\\ &=-\frac{\pi^2}{16} \end{align}

Therefore,

$\boxed{\displaystyle J=\frac{\pi^2}{12}}$

PS:

To obtain the value of $J$ knowing that $\displaystyle \zeta(2)=-\int_0^1 \frac{\ln(1-x)}{x}dx$

\begin{align} \int_0^1 \frac{\ln(1+t)}{t}\,dt+\int_0^1 \frac{\ln(1-t)}{t}\,dt=\int_0^1 \frac{\ln(1-t^2)}{t}\,dt \end{align}

Perform the change of variable $y=t^2$ in RHS integral,

\begin{align} \int_0^1 \frac{\ln(1+t)}{t}\,dt+\int_0^1 \frac{\ln(1-t)}{t}\,dt=\frac{1}{2}\int_0^1 \frac{\ln(1-t)}{t}\,dt \end{align}

Therefore,

\begin{align} \int_0^1 \frac{\ln(1+t)}{t}\,dt=-\frac{1}{2}\int_0^1 \frac{\ln(1-t)}{t}\,dt \end{align}

$\boxed{\displaystyle \int_0^1 \frac{\ln(1+t)}{t}\,dt=\frac{1}{2}\zeta(2)}$

• I have never seen such soluton - well done ! It reminds me a similar trick (substitutions and taking the difference) as done in evaluation to obtain $\int_{0}^{\pi}\ln\sin x \;\mathrm{d}x=-\frac{\pi}{2}\ln 2$ Commented Aug 25, 2017 at 12:15

\begin{align} \log(2\cos(x)) &=\log\left(e^{ix}+e^{-ix}\right)\tag{1a}\\ &=ix+\log\left(1+e^{-2ix}\right)\tag{1b}\\ &=-ix+\log\left(1+e^{2ix}\right)\tag{1c}\\ &=\cos(2x)-\frac{\cos(4x)}2+\frac{\cos(6x)}3-\cdots\tag{1d} \end{align} Explanation:
$$\text{(1a)}$$: $$2\cos(x)=e^{ix}+e^{-ix}$$
$$\text{(1b)}$$: factor out $$e^{ix}$$
$$\text{(1c)}$$: factor out $$e^{-ix}$$
$$\text{(1d)}$$: average $$\text{(1b)}$$ and $$\text{(1c)}$$ using the power series for $$\log(1+x)$$ \begin{align} \sum_{k=1}^\infty\frac1{k^2} &=\frac1{2\pi}\int_0^{2\pi}\sum_{k=1}^\infty\frac{e^{ikx}}k\sum_{k=1}^\infty\frac{e^{-ikx}}k\,\mathrm{d}x\tag{2a}\\ &=\frac1{2\pi}\int_0^{2\pi}\left|\log(1-e^{ix})\right|^2\,\mathrm{d}x\tag{2b}\\ &=\frac1{2\pi}\int_{-\pi}^\pi\left|\log(1+e^{ix})\right|^2\,\mathrm{d}x\tag{2c}\\ &=\frac1{2\pi}\int_{-\pi}^\pi\left|\,\log\left(2\cos\left(\frac x2\right)\right)+\frac{ix}2\,\right|^{\,2}\,\mathrm{d}x\tag{2d}\\ &=\frac1{2\pi}\int_{-\pi}^\pi\left(\log\left(2\cos\left(\frac x2\right)\right)^2+\frac{x^2}4\right)\,\mathrm{d}x\tag{2e}\\ &=\frac{\pi^2}{12}+\frac1{2\pi}\int_{-\pi}^\pi\left(\cos(x)-\frac{\cos(2x)}2+\frac{\cos(3x)}3-\cdots\right)^2\,\mathrm{d}x\tag{2f}\\ &=\frac{\pi^2}{12}+\frac12\sum_{k=1}^\infty\frac1{k^2}\tag{2g}\\ &=\frac{\pi^2}6\tag{2h} \end{align} Explanation:
$$\text{(2a)}$$: use the orthogonality of $$e^{ijx}$$ and $$e^{ikx}$$ when $$j\ne k$$
$$\text{(2b)}$$: use the power series for $$\log(1+x)$$
$$\text{(2c)}$$: substitute $$x\mapsto x+\pi$$
$$\text{(2d)}$$: $$1+e^{ix}=2\cos(x/2)e^{ix/2}$$
$$\text{(2e)}$$: $$\left|\,x+iy\,\right|^2=x^2+y^2$$
$$\text{(2f)}$$: apply $$(1)$$
$$\text{(2g)}$$: use the orthogonality of $$\cos(jx)$$ and $$\cos(kx)$$ for $$j\ne k$$
$$\text{(2h)}$$: subtract the original from twice $$\text{(2g)}$$

• This is fantastic Commented Jul 9, 2019 at 4:28

by using Fourier series of $$f(x)=1, x\in[0,1]$$ $$1=\sum_{n=1}^\infty\frac{4}{(2n-1)\pi}\sin (2n-1)\pi x$$ integrate both sides when integration limits are $$x=0 \rightarrow 1$$ $$\int_{0}^{1}1.dx=\int_{0}^{1} \sum_{n=1}^\infty\frac{4}{(2n-1)\pi}\sin (2n-1)\pi x dx$$ $$1=\sum_{n=1}^\infty\frac{8}{(2n-1)^2\pi^2}$$ $$\sum_{n=1}^\infty\frac{1}{(2n-1)^2}=\frac{\pi^2}{8}$$ then we use the equality series $$\sum_{n=1}^\infty\frac{1}{n^2}=\sum_{n=1}^\infty\frac{1}{(2n-1)^2}+\sum_{n=1}^\infty\frac{1}{(2n)^2}$$ simplify it to get $$\sum_{n=1}^\infty\frac{1}{n^2}=\frac{4}{3}\sum_{n=1}^\infty\frac{1}{(2n-1)^2}$$ so, $$\sum_{n=1}^\infty\frac{1}{n^2}=\frac{4}{3}\frac{\pi^2}{8}=\frac{\pi^2}{6}$$

Here is an interesting solution that evaluates three sums, one of which is $\zeta(2).$

$$\tag{1}\label{Double Integral} \int_{0}^{1} \int_{0}^{\sqrt{1-x^2}} \frac{1}{\sqrt{x^2+y^2} \ (1+x^2+y^2)} \ dy \ dx.$$ A quick polar coordinates transformation $x=r \cos(\theta), y= r \sin(\theta)$ transforms \eqref{Double Integral} into $$\int_{0}^{\frac{\pi}{2}}\int_{0}^{1} \frac{1}{1+r^2} \ dr \ d \theta=\frac{\pi^2}{8}.$$

Hence, \eqref{Double Integral} is equal to $\frac{\pi^2}{8}.$

Now integrate \eqref{Double Integral} with respect to $y$ using the fact

$$\int \frac{1}{\sqrt{x^2+y^2} (1+x^2+y^2)} \ dy = \frac{\tanh^{-1} \left( \frac{y}{\sqrt{1+x^2}\sqrt{x^2+y^2}} \right)}{\sqrt{1+x^2}}$$ to see that \eqref{Double Integral} becomes

$$\tag{2} \label{arctanh} \int_{0}^{1} \frac{\tanh^{-1} \left( \frac{\sqrt{1-x^2}}{\sqrt{1+x^2}} \right)}{\sqrt{1+x^2}} \ dx.$$

Next, observe that \eqref{arctanh} is equal to the double integral

$$\tag{3} \label{double integral 2} \int_{0}^{1} \int_{0}^{\sqrt{1-x^2}} \frac{1}{1+x^2-y^2} \ dy \ dx,$$ which can be confirmed by integrating the inner integral of \eqref{double integral 2} with respect to $y.$ Now here comes the interesting part. Use polar coordinates with $x=r\cos(\theta),y=r\sin(\theta)$ on \eqref{double integral 2} and then with $x=r\sin(\theta),y=r\cos(\theta)$ on \eqref{double integral 2} and average the two to see that \eqref{double integral 2} is the same as

$$\frac{1}{2}\int_{0}^{\frac{\pi}{2}} \int_{0}^{1} \frac{r}{1+r^2\cos(2\theta)} \ dr \ d \theta + \frac{1}{2}\int_{0}^{\frac{\pi}{2}} \int_{0}^{1} \frac{r}{1-r^2\cos(2\theta)} \ dr \ d \theta \,$$ which simplifies down to \begin{align} \int_{0}^{\frac{\pi}{2}} \frac{\ln(1+\cos(2\theta))}{4\cos(2\theta)}-\frac{\ln(1-\cos(2\theta))}{4\cos(2\theta)} \ d \theta & = \int_{0}^{\frac{\pi}{2}} \frac{\ln \left(\frac{1+\cos(2\theta)}{1-\cos(2\theta)} \right)}{4\cos(2\theta)} \ d \theta\\ & = \int_{0}^{\frac{\pi}{2}} -\frac{\ln(\tan^2(\theta))}{4\cos(2\theta)} \ d \theta \tag{4} \label{double angle} \\ & = \int_{0}^{\infty} \frac{\ln(u)}{2(u^2-1)} \ du \tag{5} \label{pi^2/4} \end{align} with \eqref{double angle} following from simplifying the logarithmic term with the double angle formulas $$\sin^2(\theta)=\frac{1-\cos(2\theta)}{2}, \quad \cos^2(\theta)=\frac{1+\cos(2\theta)}{2},$$ and \eqref{pi^2/4} following from the substitution $u=\tan(\theta).$

Splitting \eqref{pi^2/4} into $$\int_{0}^{1} \frac{\ln(u)}{2(u^2-1)} \ du + \int_{1}^{\infty} \frac{\ln(u)}{2(u^2-1)} \ du,$$ a substitution $u=\frac{1}{t}$ on the second term shows \eqref{pi^2/4} is equal to $$2 \int_{0}^{1} \frac{\ln(u)}{2(u^2-1)} \ du = \int_{0}^{1} \frac{\ln(u)}{u^2-1} \ du.$$ Hence, we have \begin{align} \tag{6} \label{pi^2/8} \int_{0}^{1} \frac{\ln(u)}{u^2-1} \ du = \frac{\pi^2}{8} \end{align}

Now following the other users' answers, convert the integrand in the left hand side of \eqref{pi^2/8} into a geometric series, apply the Monotone Convergence Theorem to interchange sum and integral, to see we have $$\sum_{n=0}^{\infty} \frac{1}{(2n+1)^2} = \frac{\pi^2}{8},$$ and observing \begin{align} \zeta(2) & =\sum_{n=1}^{\infty} \frac{1}{(2n)^2}+ \sum_{n=0}^{\infty} \frac{1}{(2n+1)^2} \\ & = \frac{1}{4} \zeta(2) + \frac{\pi^2}{8}, \end{align} we see $$\zeta(2)=\frac{\pi^2}{6}.$$

Those are the first two sums. We refer back to \eqref{arctanh}. Make the substitution $u=\sqrt{\frac{{1-x^2}}{{1+x^2}} }$ and simplify to see \eqref{arctanh} becomes to get: $$\tag{7} \label{complicated sub} \int_{0}^{1} \frac{\sqrt{2} u\tanh^{-1}(u)}{\sqrt{1-u^2}(1+u^2)}\ du.$$ Substituting $u=\tanh(\theta)$ transforms \eqref{complicated sub} into \begin{align} \sqrt{2}\int_{0}^{\infty}\frac{\theta(e^{2\theta}-1)}{e^{4\theta}+1}\ d\theta \end{align} and substituting $z=e^{\theta}$ shows that \eqref{arctanh} is the same as $$\sqrt{2}\int_{1}^{\infty}\frac{(z^2-1)\ln(z)}{z^4+1}\ dz,$$ and splitting the region of integration as with \eqref{pi^2/4} to get \eqref{pi^2/8}, we see \eqref{arctanh} is

$$\tag{7} \label {crazy integral} \sqrt{2}\int_{0}^{1}\frac{(t^2-1)\ln(t)}{t^4+1}\ dt.$$

Expanding this integrand into a geometric series and integrating term by term, we see that \begin{align}\frac{\pi^2}{8} & =\sqrt{2}\left(\sum_{n=0}^{\infty}\frac{(-1)^n}{(4n+1)^2}-\frac{(-1)^n}{(4n+3)^2}\right) \\ & =\sqrt{2}\sum_{n=0}^{\infty}\frac{(-1)^n}{(4n+1)^2} +\sqrt{2} \sum_{n=-\infty}^{-1}\frac{(-1)^n}{(4n+1)^2} \\ & = \sqrt{2}\sum_{n=-\infty}^{\infty}\frac{(-1)^n}{(4n+1)^2}. \end{align} Thus, \begin{align} \sum_{n=-\infty}^{\infty}\frac{(-1)^n}{(4n+1)^2}=\frac{\pi^2}{8\sqrt{2}}, \end{align} which is the third sum.

Let $X$ be an independent Laplace random variable with $X\sim L(0,1) = \frac12 \exp{(-|x|)}$, then its characteristic function :

$$\varphi_X(t)=\mathbb{E}[e^{itX}]=\frac{1}{1+t^2} \newcommand{\var}[1]{\mathrm{var}\left[#1\right]}$$

By symmetry $\mathbb{E}[X]=0$ we write (generally) :

$$\varphi_X(t)=\mathbb{E}[e^{itX}]=\mathbb{E}[1+itX-t^2X^2+\cdots\,]=1-\var{X}t^2+O(t^3)\tag{A}$$

since $\var{X}=\mathbb{E}[X^2]-\mathbb{E}[X]^2=\mathbb{E}[X^2]$, for our case : $$\frac{1}{1+t^2}=1-t^2+O(t^3) \rightarrow \var{X}=1$$ Now consider a set of such variables $X_n$, independent of each other, for a construction of a new random variable $Y$ as follows :

$$Y=\sum_{n=1}^{\infty}\frac{X_n}{n}$$

Then, taking variance of both sides :

$$\var{Y}=\var{\sum_{n=1}^{\infty}\frac{X_n}{n}}=\sum_{n=1}^{\infty}\var{\frac{X_n}{n}}=\sum_{n=1}^{\infty}\frac{\var{X_n}}{n^2}=\var{X}\zeta(2)=\zeta(2)\tag{B}$$

However, for characteristic function instead, using properities of characteristic function :

$$\varphi_Y(t)=\varphi_{\sum_{n=1}^{\infty}X_n/n}\left(t\right)=\prod_{n=1}^\infty \varphi_{X}\left(\frac{t}{n}\right) = \prod_{n=1}^\infty \frac{1}{1+\frac{t^2}{n^2}}=\frac{\pi t}{\sinh \pi t} = 1-\frac{\pi^2}{6}t^2+O(t^3)\tag{C}$$

Combining it with $(A)$ and $(B)$ we get : $$\zeta(2)=\var{Y}=\frac{\pi^2}{6}$$

NOTE : As long as the set $\{X_n\}_{n\in\mathbb{N}}$ consist of independent variables with idential pdf. the steps are the same upto $\var{X}=1$. So, there might be distributions for which the product in $C$ is easily evaluable.

NOTE2 : by mystake I posted just a fisrst sentence of this answer, so after deleting, this is the second copy

• This is equivalent to Euler's infinite product with sin(x)/x, no? Take the reciprocal and let $x=i\pi t$. Otherwise I am not sure how you conclude the product equals $\frac{\pi t}{\sinh{\pi t}}$ Commented Feb 26, 2021 at 6:11

I propose a solution... Consider for $n\in\mathbb N^*$ : $$(1) : \int_0^\pi \left(\alpha t+\beta t^2\right)\cos(nt)\,\mathrm dt = \dfrac{1}{n^2}$$ Integrate by parts : $$\int_0^\pi t\cos(nt)\,\mathrm dt = \underbrace{\left.\dfrac{t\sin(nt)}{n}\right\vert_0^\pi}_{=\,0} -\int_0^\pi \dfrac{\sin(nt)}{n}\,\mathrm dt = -\underbrace{\int_0^{n\pi}\dfrac{\sin x}{n^2}\,\mathrm dx}_{\mathrm{substitution\;by\;}x=nt} = \dfrac{\cos(n\pi)-1}{n^2}$$ and $$\begin{split}\int_0^\pi t^2\cos(nt)\,\mathrm dt &= \underbrace{\left.\dfrac{t^2\sin(nt)}{n}\right\vert_0^\pi}_{=\,0} - \int_0^\pi \dfrac{2t\sin(nt)}{n}\,\mathrm dt = \left.\dfrac{2t\cos(nt)}{n^2}\right\vert_0^\pi - \int_0^\pi \dfrac{2\cos(nt)}{n^2}\,\mathrm dt \\&= \dfrac{2\pi\cos(n\pi)}{n^2} - \underbrace{\int_0^{n\pi}\dfrac{2\cos x}{n^3}\,\mathrm dx}_{\mathrm{substition\;by\;}x=nt} = \dfrac{2\pi\cos(n\pi)}{n^2}- \underbrace{\left.\dfrac{2\sin x}{n^3}\right\vert_0^{n\pi}}_{=\,0} \\&=\dfrac{2\pi\cos(n\pi)}{n^2} \end{split}$$ Thus $$\int_0^\pi \left(\alpha t+\beta t^2\right)\cos(nt)\,\mathrm dt = \alpha \cdot \dfrac{\cos(n\pi)-1}{n^2} + \beta\cdot\dfrac{2\pi\cos(n\pi)}{n^2}$$ We deduce that $\alpha = -1$ and $\beta = 1/2\pi$ satisfies $(1)$.

Since for $x\in\mathbb R\backslash 2\pi\mathbb Z$ : $$\sum_{k=1}^n \cos(kx) =-\dfrac{1}{2} + \dfrac{\sin(nx+x/2)}{2\sin(x/2)}$$ we have $$\begin{split}\sum_{k=1}^n \dfrac{1}{k^2} &= \sum_{k=1}^n \int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\cos(kt)\,\mathrm dt \\&= \int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\sum_{k=1}^n \cos(kt)\,\mathrm dt\\ &= -\dfrac{1}{2}\int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\mathrm dt + \int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\cdot \dfrac{\sin(nt+t/2)}{2\sin(t/2)}\,\mathrm dt \end{split}$$ However $\sin(nt+t/2) = \sin(t/2)\cos(nt)+\sin(nt)\cos(t/2)$. Let $\phi$ and $\psi$ such that $$\phi(t) = \dfrac{t^2}{4\pi}-\dfrac{t}{2} \;\mathrm{and}\; \psi(t) = \left(\dfrac{t^2}{2\pi}-t\right)\cdot\dfrac{\cos(t/2)}{2\sin(t/2)}$$ so that $$\int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\cdot \dfrac{\sin(nt+t/2)}{2\sin(t/2)} = \int_0^\pi \phi(t)\cos(nt)\,\mathrm dt + \int_0^\pi \psi(t)\sin(nt)\,\mathrm dt$$ $\phi$ is continuous on $[0,\pi]$. And $\psi$ can be extended at $t=0$. Indeed as $t\to 0$ $$\psi(t) = \underbrace{\dfrac{t\cos(t/2)}{2\pi}}_{\to\, 0}\cdot\underbrace{\dfrac{t/2}{\sin(t/2)}}_{\to \ 1}- \underbrace{\cos(t/2)}_{\to \, 1}\cdot\underbrace{\dfrac{t/2}{\sin(t/2)}}_{\to\, 1} \xrightarrow[t\to 0]{} -1$$ Therefore, $\psi$ is continuous (by extension) on $[0,\pi]$.

There remains to apply Lebesgue-Riemann Lemma, which tells us that : $$\int_0^\pi \phi(t)\cos(nt)\,\mathrm dt \xrightarrow[n\to \infty]{} 0\;\;\mathrm{and}\;\;\int_0^\pi \psi(t)\sin(nt)\,\mathrm dt\xrightarrow[n\to \infty]{} 0$$ Consequently $$\int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\cdot \dfrac{\sin(nt+t/2)}{2\sin(t/2)} \xrightarrow[n\to \infty]{} 0$$ and $$\sum_{k=1}^n \dfrac{1}{k^2} \xrightarrow[n\to \infty]{} -\dfrac{1}{2}\int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\mathrm dt$$ Now, we can evaluate this integral : $$-\dfrac{1}{2}\int_0^\pi \left(\dfrac{t^2}{2\pi}-t\right)\mathrm dt = -\dfrac{1}{2}\left[\dfrac{t^3}{6\pi}-\dfrac{t^2}{2}\right]_0^\pi = -\dfrac{1}{2}\left[\dfrac{\pi^2}{6}-\dfrac{\pi^2}{2}\right] = \dfrac{\pi^2}{6}$$ Then... the desired result : $$\boxed{\sum_{k=1}^\infty \dfrac{1}{k^2} = \dfrac{\pi^2}{6}}$$

This is a similar proof as posted by Hans Lundmark, but I find it to be a little simpler. I ran across this approach in a Dover copy of The USSR Olympiad Problem Book. It is also based on the observation that $$\cot^2x<\frac{1}{x^2}<\csc^2x\,.$$

We first have the trig identity $$\sin(2n+1)\alpha=\sum_{k=0}^n(-1)^k\binom{2n+1}{2k+1}\cos^{2(n-k)}\alpha\sin^{2k+1}\alpha$$ which is arguably the hardest part of this proof. This directly manipulates into $$\sin(2n+1)\alpha=\sin^{2n+1}\alpha\sum_{k=0}^n(-1)^k\binom{2n+1}{2k+1}\cot^{2(n-k)}\alpha\,.$$ This formula reveals that the $n$ distinct quantities below $$\cot^2\frac{\pi}{2n+1},\quad\cot^2\frac{2\pi}{2n+1},\quad\ldots,\quad\cot^2\frac{n\pi}{2n+1}$$ are the roots of the polynomial $$\sum_{k=0}^n(-1)^k\binom{2n+1}{2k+1}x^{n-k}\,.$$ After scaling by the lead coefficient, Viete's Formulas then imply that $$\sum_{k=1}^n \cot^2\frac{k\pi}{2n+1}=\frac{n(2n-1)}{3}$$ By another elementary trig identity, we also get $$\sum_{k=1}^n \csc^2\frac{k\pi}{2n+1}=\frac{2n(n+1)}{3}$$ The inequality above then gives us $$\frac{n(2n-1)}{3}<\frac{(2n+1)^2}{\pi^2}\left(1+\frac{1}{2^2}+\cdots+\frac{1}{n^2}\right)<\frac{2n(n+1)}{3}$$ which gives us the desired conclusion after taking limits.

• I later found out that this is one of the three different proofs of the Basel Problem that was presented in "Proofs from the Book".
– user123641
Commented May 1, 2018 at 15:54

The sum can be written as the integral: $$\int_0^{\infty} \frac{x}{e^x-1} dx$$ This integral can be evaluated using a rectangular contour from $$0$$ to $$\infty$$ to $$\infty + \pi i$$ to $$0$$ .

Define $f$ on $[0;2\pi]$,

$\displaystyle f(a)=\int_0^1 \dfrac{\ln(x^2-2x\cos(a)+1)}{x}dx\tag 0$

Theorem:

For all $a\in [0;2\pi]$,

$f(a)=-\dfrac{1}{2}a^2+\pi a-\dfrac{\pi^2}{3}\tag 1$

For all $a\in [0;2\pi]$,

$\displaystyle f\left(\frac{a}{2}\right)+f\left(\pi-\frac{a}{2}\right)=\frac{f(a)}{2}\tag 2$

Proof:

\begin{align} f\left(\frac{a}{2}\right)+f\left(\pi-\frac{a}{2}\right)&=\int_0^1 \frac{\ln\left(\left(x^2-2x\cos\left(\frac{a}{2}\right)+1\right)\left(x^2+2x\cos\left(\frac{a}{2}\right)+1\right) \right)}{x}dx\\ &=\int_0^1 \frac{\ln\left(x^4-2x^2\cos(a)+1\right)}{x}dx\\ \end{align}

Perform the change of variable $y=x^2$ in the latter integral to obtain (2).

According to theorems about functions défined by integrals $f^{\prime\prime}$ exists and it is continuous.

Derive twice (2),

For all $a\in [0;2\pi]$,

$\displaystyle f^{\prime\prime}\left(\frac{a}{2}\right)+f^{\prime\prime}\left(\pi-\frac{a}{2}\right)=2f^{\prime\prime}(a)\tag 3$

$f^{\prime\prime}$ is continuous on $[0;2\pi]$ therefore this fonction has a maximum $M$ and a minimum $m$ that are obtainable.

Therefore it exists $a_0\in[0;2\pi]$ such that $f^{\prime\prime}(a_0)=M$.

Plug $a_0$ into (3),

$\displaystyle f^{\prime\prime}\left(\frac{a_0}{2}\right)+f^{\prime\prime}\left(\pi-\frac{a_0}{2}\right)=2f^{\prime\prime}(a_0)=2M$

But, $f^{\prime\prime}\left(\frac{a_0}{2}\right)\leq M$ et $f^{\prime\prime}\left(\pi-\frac{a_0}{2}\right)\leq M$ according to the définition of $M$.

therefore $f^{\prime\prime}\left(\frac{a_0}{2}\right)=f^{\prime\prime}\left(\pi-\frac{a_0}{2}\right)=M$

By recurrence reasoning, for all $n\geq 1$, natural integer,

$f^{\prime\prime}\left(\frac{a_0}{2^n}\right)=M\tag 4$

$f^{\prime\prime}$ is continuous in $0$ therefore taking $n$ to infinity in (4) one obtains,

$M=f^{\prime\prime}(0)$.

Considering $m$ the minimum of $f^{\prime\prime}$ using the same way it can be proved that,

$m=f^{\prime\prime}(0)$

Since $m=M$, therefore $f^{\prime\prime}$ is a constant function.

therefore, there exist $\alpha,\beta,\gamma$ real such that,

For all $a\in[0;2\pi]$,

$f(a)=\alpha a^2+\beta a+\gamma\tag 5$

Plug (5) into (3), one obtains:

$\alpha\pi+\dfrac{\beta}{2}=0$ and $\alpha \pi^2 +\beta \pi+\dfrac{3}{2}\gamma=0$

On the other hand, for all $a\in [0;2\pi]$,

$\displaystyle f^\prime(a)= 2\sin a\int_0^1\dfrac{1}{x^2-2x\cos a+1}dx$

If $a=\dfrac{\pi}{2}$ one obtains,

\begin{align} f^\prime\left(\dfrac{\pi}{2}\right)&=2\int_0^1 \dfrac{1}{x^2+1}dx\\ &=2\times \dfrac{\pi}{4}\\ &=\dfrac{\pi}{2} \end{align}

Taking derivative of (5), one obtains for all $a\in [0;2\pi]$,

$f^\prime(a)=2\alpha a+\beta$

Therefore,

$\alpha \pi +\beta=\dfrac{\pi}{2}$

One have obtained a linear system of three equations in $\alpha,\beta,\gamma$.

To achieve the proof of the theorem solve it.

To get the value of $\zeta(2)$, apply the theorem with $a=0$, one obtains,

$\displaystyle \int_0^1 \dfrac{\ln(1-x)}{x}dx=-\dfrac{\pi^2}{6}$

And then, continue in usual way, expand the integrand...

From, Euler's integrals, H. Haruki and S. Haruki, The mathematical gazette, 1983.

• This one is very simple and straightforward to follow. However, I would like to see the argument for continuity for the second derivative $f''(x)$ to be more explained (or am I so blind to see it?). Commented Aug 25, 2017 at 12:20
• It uses general theorems about derivation under the integral sign as Lebesgue's dominated convergence theorem (but weaker theorems do exist for the Riemann integral).
– FDP
Commented Aug 25, 2017 at 17:21

Following proof rely on this integral identity :

$$\int_{a}^{1}\frac{\arccos x}{\sqrt{x^2-a^2}}\mathrm{d}x=-\frac{\pi}{2}\ln a\qquad ;\,a\in(0,1]$$

We will prove it later on. Now, let's make a power series :

$$\zeta(2)=\sum_{n=1}^{\infty}\frac{1}{n^2}=\int_0^1\frac{1}{x}\sum_{n=1}^{\infty}\frac{x^n}{n}\,\mathrm{d}x=-\int_0^1\frac{\ln(1-x)}{x}\,\mathrm{d}x=-\int_0^1\frac{\ln x}{1-x}\,\mathrm{d}x$$

Inserting the formula above we get :

$$\zeta(2)=\frac{2}{\pi}\int_0^1\int_{x}^{1}\frac{\arccos y}{(1-x)\sqrt{y^2-x^2}}\,\mathrm{d}y\,\mathrm{d}x$$

Interchanging the order of integration :

$$\zeta(2)=\frac{2}{\pi}\int_0^1\int_{0}^{y}\frac{\arccos y}{(1-x)\sqrt{y^2-x^2}}\,\mathrm{d}x\,\mathrm{d}y\tag{A}$$

But, with help of substitution $x=y \cos{\theta}$ and universal $t=\tan\frac{\theta}{2}$ : $$\int_{0}^{y}\frac{\mathrm{d}x}{(1-x)\sqrt{y^2-x^2}}=\int_{0}^{\frac{\pi}{2}}\frac{\mathrm{d}\theta}{1-y \cos{\theta}}=\int_{0}^{1}\frac{\frac{2\mathrm{d}t}{1+t^2}}{1-y\frac{1-t^2}{1+t^2}}=\frac{\pi-\arccos{y}}{\sqrt{1-y^2}}$$

Plugging this to $(A)$ we get :

\begin{align*}&\zeta(2)=\frac{2}{\pi}\int_{0}^{1}\frac{\pi\arccos{y}-\arccos^2 y}{\sqrt{1-y^2}}\,\mathrm{d}y=\frac{2}{\pi}\left(\frac{\pi}{2}\arccos^2 y- \frac{1}{3}\arccos^3 y\right)\bigg{|}_{1}^{0}= \\ \\ &\frac{2}{\pi}\left(\frac{\pi}{2}\left(\frac{\pi}{2}\right)^2-\frac{1}{3}\left(\frac{\pi}{2}\right)^3\right) = \frac{2}{\pi}\left(\frac{\pi}{2}\right)^3 \left(1-\frac{1}{3}\right) =\frac{\pi^2}{6} \end{align*}

ADDENDUM : Proof of the apriori integral :

\begin{align*}&\int_{a}^{1}\frac{\arccos x}{\sqrt{x^2-a^2}}\mathrm{d}x=\int_{a}^{1}\frac{\arccos\left(\frac{x}{y}\right)}{\sqrt{x^2-a^2}}\bigg{|}_{y=x}^{y=1}\mathrm{d}x=\int_{a}^{1}\int_{x}^{1}\frac{x}{y}\frac{\mathrm{d}y\,\mathrm{d}x}{\sqrt{x^2-a^2}\sqrt{y^2-x^2}} = \\ \\ & \int_{a}^{1}\int_{a}^{y}\frac{x}{y}\frac{\mathrm{d}x\,\mathrm{d}y}{\sqrt{x^2-a^2}\sqrt{y^2-x^2}} = \frac{\pi}{2}\int_{a}^{1}\frac{\mathrm{d}y}{y} = -\frac{\pi}{2}\ln a \end{align*}

Where the inner integral was computed via substitution $x^2=a^2\cos^2\theta+y^2\sin^2\theta$ it is clear, taking differential, that $2x\;\mathrm{d}x=2\left(y^2-a^2\right)\sin\theta\cos\theta\;\mathrm{d}\theta$, then :

$$(x^2-a^2)(y^2-x^2)=(a^2\cos^2\theta+y^2\sin^2\theta-a^2)(y^2-a^2\cos^2\theta-y^2\sin^2\theta)=(y^2\sin^2\theta-a^2\sin^2\theta)(y^2\cos^2\theta-a^2\cos^2\theta)=(y^2-a^2)^2\sin^2\theta\cos^2\theta$$

Or $$\sqrt{x^2-a^2}\sqrt{y^2-x^2}= \left(y^2-a^2\right)\sin\theta\cos\theta\ = x\,\mathrm{d}x$$

Therefore :

$$\int_{a}^{y}\frac{x\,\mathrm{d}x}{\sqrt{x^2-a^2}\sqrt{y^2-x^2}}=\int_{0}^{\frac{\pi}{2}}\frac{x\,\mathrm{d}x}{x\,\mathrm{d}x}=\frac{\pi}{2}$$

Using Fourier's expansion of $f(x)=x(1-x)$, we get $$a_{0}=\frac{1}{6}$$ $$a_{n}=\frac{1}{n^2\pi^2}$$ $$b_{n}=0$$ Therefore ,we have $$x(1-x)=\frac{1}{6}-\sum_{n=1}^{\infty}\frac{\cos2xn\pi}{(n\pi)^2}$$ putting $x=0$ we get $$\sum _{k=1}^{\infty} \frac{1}{k^2} = \frac{\pi^2}{6}$$

I really like this one. Consider $f(x)=x^2-\pi^2$. Compute it's Fourier expansion to obtain $$f(x)=\frac{2}{3}\pi^2-4\sum_{n=1}^\infty\frac{(-1)^n}{n^2}\cos nx.$$ Now let $x=\pi$, then it quickly follows that $$4\zeta(2)=\frac{2}{3}\pi^2\implies \zeta(2)=\frac{\pi^2}{6}.$$

• This is the same as the first part of this one. Commented Oct 24, 2016 at 12:31

First, we relate the sum of the reciprocals of the squares of the odd natural numbers with the alternating sum of their reciprocals: \begin{align} \sum_{k=0}^\infty\frac1{(2k+1)^2} &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2-\sum_{k=0}^\infty\sum_{j=k+1}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}\\ &\phantom{{}=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2}-\sum_{k=0}^\infty\sum_{j=0}^{k-1}\frac{(-1)^{j+k}}{(2k+1)(2j+1)}\tag{1a}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2-2\sum_{k=0}^\infty\sum_{j=k+1}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}\tag{1b}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{k=0}^\infty\sum_{j=0}^\infty\frac{(-1)^j}{(2k+1)(2j+2k+3)}\tag{1c}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{j=0}^\infty\sum_{k=0}^\infty\frac{(-1)^j}{2j+2}\left(\frac1{2k+1}-\frac1{2j+2k+3}\right)\tag{1d}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{j=0}^\infty\sum_{k=0}^j\frac{(-1)^j}{2j+2}\frac1{2k+1}\tag{1e}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{k=0}^\infty\sum_{j=k}^\infty\frac{(-1)^j}{2j+2}\frac1{2k+1}\tag{1f}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{k=0}^\infty\sum_{j=0}^\infty\frac{(-1)^{j+k}}{2j+2k+2}\frac1{2k+1}\tag{1g}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+2\sum_{k=0}^\infty\sum_{j=0}^\infty\frac{(-1)^{j+k}}{2j+1}\left(\frac1{2k+1}-\frac1{2j+2k+2}\right)\tag{1h}\\ &=\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2+\sum_{k=0}^\infty\sum_{j=0}^\infty\frac{(-1)^{j+k}}{(2j+1)(2k+1)}\tag{1i}\\ &=2\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2\tag{1j} \end{align} Explanation:
$$\text{(1a):}$$ break up $$\left(\sum\limits_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2=\sum\limits_{k=0}^\infty\sum\limits_{j=0}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}$$
$$\phantom{\text{(1a):}}$$ $$\sum\limits_{k=0}^\infty\frac1{(2k+1)^2}$$ accounts for $$j=k$$
$$\phantom{\text{(1a):}}$$ $$\sum\limits_{k=0}^\infty\sum\limits_{j=k+1}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}$$ accounts for $$j\gt k$$
$$\phantom{\text{(1a):}}$$ $$\sum\limits_{k=0}^\infty\sum\limits_{j=0}^{k-1}\frac{(-1)^{j+k}}{(2k+1)(2j+1)}$$ accounts for $$j\lt k$$
$$\text{(1b):}$$ changing the order of summation then swapping $$j$$ and $$k$$ yields
$$\phantom{\text{(1b):}}$$ $$\sum\limits_{k=0}^\infty\sum\limits_{j=0}^{k-1}\frac{(-1)^{j+k}}{(2k+1)(2j+1)}=\sum\limits_{k=0}^\infty\sum\limits_{j=k+1}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}$$
$$\text{(1c):}$$ substitute $$j\mapsto j+k+1$$
$$\text{(1d):}$$ change the order of summation then partial fractions
$$\text{(1e):}$$ evaluating a telescoping series yields
$$\phantom{\text{(1e):}}$$ $$\sum\limits_{k=0}^\infty\left(\frac1{2k+1}-\frac1{2j+2k+3}\right)=\sum\limits_{k=0}^j\frac1{2k+1}$$
$$\text{(1f):}$$ change the order of summation
$$\text{(1g):}$$ substitute $$j\mapsto j+k$$
$$\text{(1h):}$$ partial fractions
$$\text{(1i):}$$ average $$\text{(1g)}$$ and $$\text{(1h)}$$
$$\text{(1j):}$$ $$\sum\limits_{k=0}^\infty\sum\limits_{j=0}^\infty\frac{(-1)^{j+k}}{(2k+1)(2j+1)}=\left(\sum\limits_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2$$

Next, apply the Leibniz Formula: \begin{align} \sum_{k=0}^\infty\frac1{(2k+1)^2} &=2\,\left(\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\right)^2\tag{2a}\\ &=\frac{\pi^2}8\tag{2b} \end{align} Explanation:
$$\text{(2a):}$$ summarize $$(1)$$
$$\text{(2b):}$$ apply the Leibniz Formula: $$\sum\limits_{k=0}^\infty\frac{(-1)^k}{2k+1}=\frac\pi4$$

Finally, use a geometric series to answer the Basel Problem: \begin{align} \sum_{n=1}^\infty\frac1{n^2} &=\sum_{k=0}^\infty\sum_{j=0}^\infty\frac1{\left(2^j(2k+1)\right)^2}\tag{3a}\\ &=\frac43\sum_{k=0}^\infty\frac1{(2k+1)^2}\tag{3b}\\ &=\frac{\pi^2}6\tag{3c} \end{align} Explanation:
$$\text{(3a):}$$ every positive integer is uniquely representable
$$\phantom{\text{(3a):}}$$ as the product of a power of $$2$$ and an odd integer
$$\text{(3b):}$$ apply the geometric series $$\sum\limits_{j=0}^\infty\frac1{4^j}=\frac43$$
$$\text{(3c):}$$ apply $$(2)$$

• So, in fact, this is the most elementary proof of the Basel problem. (+1) Commented May 24, 2023 at 16:59

Since $$\int_0^1 \frac{dx}{1+x^2}=\frac{\pi}{4}$$, we have

$$\frac{\pi^2}{16}=\int_0^1\int_0^1\frac{dydx}{(1+x^2)(1+y^2)}\overset{t=xy}{=}\int_0^1\int_0^x\frac{dtdx}{x(1+x^2)(1+t^2/x^2)}$$

$$=\frac12\int_0^1\int_t^1\frac{dxdt}{x(1+x^2)(1+t^2/x^2)}\overset{x^2\to x}{=}\frac12\int_0^1\left(\int_{t^2}^1\frac{dx}{(1+x)(x+t^2)}\right)dt$$

$$=-\frac12\int_0^1\frac{\ln\left(\frac{4t^2}{(1+t^2)^2}\right)}{1-t^2}dt\overset{t=\frac{1-x}{1+x}}{=}-\frac12\int_0^1\frac{\ln\left(\frac{1-x^2}{1+x^2}\right)}{x}dx$$

$$\overset{x^2\to x}{=}-\frac14\int_0^1\frac{\ln\left(\frac{1-x}{1+x}\right)}{x}dx=-\frac14\int_0^1\frac{\ln\left(\frac{(1-x)^2}{1-x^2}\right)}{x}dx$$

$$=-\frac12\int_0^1\frac{\ln(1-x)}{x}dx+\frac14\underbrace{\int_0^1\frac{\ln(1-x^2)}{x}dx}_{x^2\to x}$$

$$=-\frac38\int_0^1\frac{\ln(1-x)}{x}dx\Longrightarrow \int_0^1\frac{-\ln(1-x)}{x}dx=\frac{\pi^2}{6}$$

Remark:

This solution can be considered a proof that $$\zeta(2)=\frac{\pi^2}{6}$$ as we have $$\int_0^1\frac{-\ln(1-x)}{x}dx=\text{Li}_2(x)|_0^1=\text{Li}_2(1)=\zeta(2)$$

I found this proof on YouTube but I did little changes:

\begin{align} I&=\int_0^{\pi/2}\ln(2\cos x)\ dx=\int_0^{\pi/2}\ln\left(e^{ix}(1+e^{-2ix})\right)\ dx\\ &=\int_0^{\pi/2}ix\ dx-\sum_{n=1}^\infty \frac{(-1)^n}{n}\int_0^{\pi/2}e^{-2inx}\ dx\\ &=\frac{\pi^2}{8}i-\sum_{n=1}^\infty\frac{(-1)^n}{n}\left(-\frac{(-1)^n-1}{2in}\right)\\ &=\frac{\pi^2}{8}i-\frac12i\left(\zeta(2)-\operatorname{Li}_2(-1)\right)\\ &=\frac{\pi^2}{8}i-\frac12i\left(\zeta(2)+\frac12\zeta(2)\right)\\ &=i\left(\frac{\pi^2}{8}-\frac34\zeta(2)\right) \end{align}

By comparing the imaginary parts, we have

$$0=\frac{\pi^2}{8}-\frac34\zeta(2)\Longrightarrow\zeta(2)=\frac{\pi^2}{6}$$

Looking through the answers I’m honestly surprised that no one has posted this method yet, so I guess I shall do it since I just recently did a write up on some stuff that included this in it.

MSE doesn’t have the cancel package smh

Consider the Basel Problem $$S=\sum^{\infty}_{n=1}\frac{1}{n^2}$$ we may note that the Laplace transform of $$x$$ gives a similar form to the series as follows $$\mathcal{L}\left\{x\right\}(n)=\frac{1}{n^2}=\int^{\infty}_{0}xe^{-nx}\text{ d}x,\qquad n>0$$ Since our sum violates no restrictions, we may substitute this integral into it giving \begin{align} S&=\sum^{\infty}_{n=1}\int^{\infty}_{0}xe^{-nx}\text{ d}x\\ &=\int^{\infty}_{0}x\sum^{\infty}_{n=1}e^{-nx}\text{ d}x\\ &=\int^{\infty}_0\frac{x\text{ d}x}{e^x-1}=I \end{align} Showing the integral and sum interchange is valid in $$(2)$$ is trivial since our integrand is always positive along the integration interval, and would simplify to the Basel Problem when the Fubini–Tonelli theorem is applied. $$(3)$$ on the other hand is a trivial geometric series.

How should we evaluate this integral? To do this, we will consider the rather counterintuitive function $$f(z)=\frac{z^2}{e^z-1}$$ This function has poles at every $$z=2\pi i n$$, $$n\in\mathbb{Z}$$, but notice that the "pole" at the origin actually is a removable singularity, which can be shown by taking the limit of the function as it goes to the origin. This means that when we set up our rectangular contour, we don't actually need to take the principal value to the origin through a circular indent, because the function is well behaved there and the integral along that circular indent would go to $$0$$ regardless.

Hence, consider the following contour

$$\oint_{\mathcal{C}}f(z)\text{ d}z=\int_B+\int_{\mathcal{R}}+\int_T+\int_r+\int_Lf(z)\text{ d}z=0$$ Parameterization of the contour gives \begin{alignat*}{5} B&:\text{ }z=x,\qquad &\text{d}z&=\text{d}x,\qquad &x&\in[0, R\,]\\ \mathcal{R}&:\text{ }z=R+iy,\qquad &\text{d}z&=i\text{ d}y,\qquad &y&\in[0, 2\pi]\\ T&:\text{ }z=2\pi i+x,\qquad &\text{d}z&=\text{d}x,\qquad &x&\in[R, \epsilon\,]\\ r&:\text{ }z=2\pi i+\epsilon e^{i\theta},\qquad &\text{d}z&=i\epsilon e^{i\theta}\text{ d}\theta,\qquad &y&\in\left[0, -\frac{\pi}{2}\right]\\ L&:\text{ }z=iy,\qquad &\text{d}z&=i\text{ d}y,\qquad &y&\in[2\pi-\epsilon, 0] \end{alignat*} Instead of evaluating these integrals one by one however, this time we will first begin by adding two of them and cancelling terms, which is the reason why we increased the numerator power by $$1$$ in our $$f(z)$$. We have it such that \begin{align} \lim_{R\to+\infty,\,\epsilon\to+0}\int_B+\int_Tf(z)\text{ d}z&=\lim_{R\to+\infty,\,\epsilon\to+0}\int^R_0\frac{x^2\text{ d}x}{e^x-1}+\int_R^{\epsilon}\frac{(2\pi i+x)^2\text{ d}x}{{e^{2\pi i}}e^x-1}\\ &=\int^{\infty}_0\frac{x^2\text{ d}x}{e^x-1}-\int_0^{\infty}\frac{(2\pi i+x)^2\text{ d}x}{e^x-1}\\ &={\int^{\infty}_0\frac{x^2\text{ d}x}{e^x-1}}-{\int^{\infty}_0\frac{x^2\text{ d}x}{e^x-1}}-\int^{\infty}_0\frac{4\pi i x\text{ d}x}{e^x-1}+\int^{\infty}_0\frac{4\pi^2\text{ d}x}{e^x-1}\\ &=-4\pi iI+\int^{\infty}_0\frac{4\pi^2\text{ d}x}{e^x-1} \end{align} Next, we have \begin{align} \left|\int_{\mathcal{R}}f(z)\text{ d}z\right|&\le\int^{2\pi}_0\frac{\left|R+iy\right|^2\cdot{|i|}\text{ d}y}{\left|\displaystyle e^R e^{iy}-1\right|}\\ &\le\int^{2\pi}_0\frac{R^2+y^2}{\left|\left|\displaystyle e^R\right|{\left|e^{iy}\right|}-|1|\right|}\text{ d}y\\ &=\int^{2\pi}_0\frac{R^2+y^2}{e^R-1}\text{ d}y=\frac{2\pi\left(4\pi^2+3R^2\right)}{3\left(e^R-1\right)} \end{align} So this integral is just $$0$$ since $$\frac{2\pi}{3}\lim_{R\to+\infty}\frac{4\pi^2+3R^2}{e^R-1}=0$$ The integral about $$r$$ gives $$\int^{-\frac{\pi}2}_0\frac{\left(2\pi i + \epsilon e^{i\theta}\right)^2}{{e^{2\pi i}}e^{\epsilon e^{i\theta}}-1}\cdot i\epsilon e^{i\theta}\text{ d}\theta$$ Fix a $$-\frac{\pi}2\le\theta\le0$$, and we can bound the denominator and then the whole integrand by a constant since the integral is over a finite interval, which allows us to swap the $$\epsilon$$ limit and the integral. Meanwhile, the limit itself can be solved by L'Hôpital's rule, which yields $$\lim_{\epsilon\to+0}\int^{-\frac{\pi}2}_0\frac{\left(2\pi i + \epsilon e^{i\theta}\right)^2}{e^{\epsilon e^{i\theta}}-1}\cdot i\epsilon e^{i\theta}\text{ d}\theta=\int^{-\frac{\pi}2}_0\lim_{\epsilon\to+0}\frac{\left(2\pi i + \epsilon e^{i\theta}\right)^2}{e^{\epsilon e^{i\theta}}-1}\cdot i\epsilon e^{i\theta}\text{ d}\theta=4i\pi^2\int^0_{-\frac{\pi}{2}}\text{d}\theta=2i\pi^3$$ We have one more integral to go, where we can see that $$\lim_{\epsilon\to+0}\int_Lf(z)\text{ d}z=\lim_{\epsilon\to+0}\int^{0}_{2\pi-\epsilon}\frac{-y^2\cdot i\text{ d}y}{e^{iy}-1}=\int^{2\pi}_{0}\frac{iy^2\text{ d}y}{e^{iy}-1}$$ All in all, we end up with $$\oint_{\mathcal{C}}f(z)\text{ d}z=\int_B+{\int_{\mathcal{R}}}+\int_T+\int_r+\int_Lf(z)\text{ d}z=-4\pi iI+\int^{\infty}_0\frac{2\pi^2\text{ d}x}{e^x-1}+2i\pi^3+\int^{2\pi}_0\frac{iy^2\text{ d}y}{e^{iy}-1}=0$$ Note that the two unsolved integrals that remain are divergent, and will actually cancel each other out if we take a principal value "over" the two integrals, but we do not need to deal with them. Instead, we can pass the equation through the imaginary part function and equate the results, which give $$-4\pi I+2\pi^3+\int^{2\pi}_0\Im\left(\frac{iy^2}{e^{iy}-1}\right)\text{ d}y=0$$ We can separate real and imaginary parts of the integrand of the last integral with some simple conjugate multiplication, and we would end up with $$-4\pi I+2\pi^3+\int^{2\pi}_0\frac{-y^2\text{ d}y}{2}=0$$ $$I=S=\frac{-2\pi^3+\frac{4}{3}\pi^3}{-4\pi}=\boxed{\frac{\pi^2}{6}}$$

• In the above there is a devision by 0, better to use: $$e^R = | e^Re^{iy}-1+1|\leq |e^Re^{iy}-1| +1$$ to reach the estimate $$\frac{1}{|e^Re^{iy}-1|}\leq \frac{1}{e^R-1} \qquad(\textrm{valid for y\not\in2\pi\mathbb{Z})}$$ Commented Sep 2, 2022 at 6:42
• @AD-StopPutin- you can just use the reverse triangle inequality on the denominator (which is what i did) Commented Sep 2, 2022 at 12:25
• You can not divide by zero. Commented Sep 3, 2022 at 14:30
• @AD-StopPutin- there is no part in my solution that divides by 0 Commented Sep 4, 2022 at 16:56
• @AD-StopPutin- there exists an $e^R$ term in front lol. Commented Sep 10, 2022 at 17:07

Let $$f(x)=\frac 12-x$$ on the interval $$[0, 1)$$, and extend $$f$$ to be periodic on $$\mathbb{R}$$.

By definition, \begin{align*} \hat f(0)=\int_0^1 f(x)dx=\int_0^1 \left(\frac 12-x\right)dx=0. \end{align*} And for $$\kappa\ne 0$$: \begin{align*} \hat f(\kappa)&=\int_{0}^{1}f(x)e^{-2\pi i\kappa x }dx=\int_0^1\left( \frac 12 -x \right)e^{-2\pi i\kappa x}dx=-\int_0^1xe^{-2\pi i \kappa x}dx\\ &=\frac{1}{2\pi i\kappa }\int_{0}^{1}xd(e^{-2\pi i\kappa x})=\left.\frac{1}{2\pi i\kappa}xe^{-2\pi i\kappa x}\right|_0^1+\frac{1}{2\pi i\kappa}\int_0^1 e^{-2\pi i\kappa x}dx\\ &=\frac{1}{2\pi i\kappa}. \end{align*}

By the Parseval identity \begin{align*} \int_{0}^{1}|f(x)|^2dx=\sum_{k=-\infty}^{\infty}|\hat{f}(k)|^2=|\hat{f}(0)|^2+2\sum_{k=1}^{\infty}|\hat{f}(k)|^2=2\sum_{k=1}^{\infty}\frac{1}{4\pi^2 k^2}. \end{align*} On the other hand, \begin{align*} \int_{0}^{1}|f(x)|^2dx&=\int_{0}^{1}\left( \frac{1}{2}-x \right)^2 dx=\frac 14-\frac 12+\frac 13=\frac 1{12}. \end{align*} Hence, we have $$\sum_{k=1}^{\infty}\frac{1}{k^2}=\frac{\pi^2}{6}.$$

Remark: This is an exercise(Chapter 8.13 on page 254 ) in Folland's book.

Here's mine. I'm answering late, I know that, but I am still answering it.
We'll use the expansion of $$\tanh^{-1}$$: $$\frac{1}{2}\log\frac{1+y}{1-y}=\sum_{n\geq0}\frac{y^{2n+1}}{2n+1},\quad|y|<1$$ We start with this inequality:
$$\int_{-1}^{1}\int_{-1}^{1}\frac{1}{1+2xy+y^2}dy\,dx=\int_{-1}^{1}\frac{1}{1+2xy+y^2}dx\,dy$$ The LHS of this equality gives: $$\int_{-1}^{1}\int_{-1}^{1}\frac{1}{1+2xy+y^2}dy\,dx=\int_{-1}^{1}\frac{\arctan \frac{x+y}{\sqrt{1-x^2}}}{\sqrt{1-x^2}}dx\Biggr|_{y=-1}^{y=1}\\ \quad\,\,\quad\quad\quad\quad\quad\quad\quad\quad\quad=\int_{-1}^{1}\frac{\pi}{2\sqrt{1-x^2}}dx=\frac{\pi^2}{2}$$ The RHS of the former equality yields: \begin{align} \int_{-1}^{1}\int_{-1}^{1}\frac{1}{1+2xy+y^2}dy\,dx&=\int_{-1}^{1}\frac{\log(1+2xy+y^2)}{2y}dy\Biggr|_{x=-1}^{x=1}\\ &=\int_{-1}^{1}\frac{\log\frac{1+y}{1-y}}{y}dy\\ &=2\int_{-1}^{1}\sum_{n\geq0}\frac{y^{2n}}{2n+1}dy\\ &=4\sum_{n\geq0}\frac{1}{(2n+1)^2} \end{align} Hence, $$\sum_{r\geq0}\frac{1}{(2n+1)^2}=\frac{\pi^2}{8}$$ Now $$\frac{3}{4}\zeta(2)=\zeta(2)-\frac{1}{4}\zeta(2)=\sum_{n\geq 1}\frac{1}{n^2}=\sum_{m\geq1}\frac{1}{(2m)^2}=\sum_{r\geq0}\frac{1}{(2r+1)^2}=\frac{\pi^2}{8}$$ Solving this we get $$\zeta(2)=\frac{\pi^2}{6}$$ as desired. Source:https://www.emis.de/journals/GM/vol16nr4/ivan/ivan.pdf
Here are more proofs.

The following proof is by Khalaf Ruhemi ( he is not a MSE member)

By partial fraction decomposition, we have $$\frac{y}{(1+y^2)(y^2+x^2)}=\frac{1}{x^2-1}\left(\frac{y}{1+y^2}-\frac{y}{y^2+x^2}\right).$$ Integrate both sides from $$y=0$$ to $$y=\infty$$, $$\begin{gather*} \int_0^\infty\frac{y}{(1+y^2)(y^2+x^2)}\mathrm{d}y=\frac{1}{x^2-1}\int_0^\infty\left[\frac{y}{1+y^2}-\frac{y}{y^2+x^2}\right]\mathrm{d}y\\ =\frac{1}{x^2-1}\left[\frac12\ln(1+y^2)-\frac12\ln(y^2+x^2)\right]_0^\infty=\frac{1}{2(x^2-1)}\left[\ln\left(\frac{1+y^2}{y^2+x^2}\right)\right]_0^\infty\\ =\frac{1}{2(x^2-1)}\left[\ln(1)-\ln\left(\frac{1}{x^2}\right)\right]=\frac{1}{2(x^2-1)}\left[2\ln(x)\right]=\frac{\ln(x)}{x^2-1}. \end{gather*}$$ Next, integrate both sides from $$x=0$$ to $$x=\infty$$ $$\begin{gather*} \int_0^\infty\frac{\ln(x)}{x^2-1}\mathrm{d}x=\int_0^\infty\int_0^\infty\frac{y}{(1+y^2)(y^2+x^2)}\mathrm{d}y\,\mathrm{d}x\\ \{\text{change the order of integration}\}\\ =\int_0^\infty\frac{1}{1+y^2}\left[\int_0^\infty\frac{y\,\mathrm{d}x}{y^2+x^2}\right]\mathrm{d}y\\ =\int_0^\infty\frac{1}{1+y^2}\left[\arctan\left(\frac{x}{y}\right)\right]_0^\infty dy=\int_0^\infty\frac{1}{1+y^2}\left[\frac{\pi}{2}-0\right] \mathrm{d}y\\ =\frac{\pi}{2}\int_0^\infty\frac{1}{1+y^2} dy=\frac{\pi}{2}\arctan(y)\bigg|_0^\infty=\frac{\pi}{2}\cdot\frac{\pi}{2}=\frac{\pi^2}{4}. \end{gather*}$$ Thus, $$\begin{gather*} \frac{\pi^2}{4}=\int_0^\infty\frac{\ln(x)}{x^2-1}\mathrm{d}x=\left(\int_0^1+\int_1^\infty\right)\frac{\ln(x)}{x^2-1}\mathrm{d}x\\ =\int_0^1\frac{\ln(x)}{x^2-1}\mathrm{d}x+\underbrace{\int_1^\infty\frac{\ln(x)}{x^2-1}\mathrm{d}x}_{x\to1/x}\\ =2\int_0^1\frac{\ln(x)}{x^2-1}\mathrm{d}x=-\int_0^1\frac{\ln(x)}{1-x}\mathrm{d}x-\int_0^1\frac{\ln(x)}{1+x}\mathrm{d}x\\ \left\{\text{use \frac{1}{1+x}=\frac{1}{1-x}-\frac{2x}{1-x^2} in the second integral}\right\}\\ =-2\int_0^1\frac{\ln(x)}{1-x}\mathrm{d}x+2\underbrace{\int_0^1\frac{x\ln(x)}{1-x^2}\mathrm{d}x}_{x^2\to x}\\ =-2\int_0^1\frac{\ln(x)}{1-x}\mathrm{d}x+\frac12\int_0^1\frac{\ln(x)}{1-x}\mathrm{d}x\\ =-\frac32\int_0^1\frac{\ln(x)}{1-x}\mathrm{d}x\overset{1-x\to y}{=}-\frac32\int_0^1\frac{\ln(1-y)}{y}\mathrm{d}y\\ \{\text{expand \ln(1-y) in series}\}\\ =\frac32\sum_{n=1}^\infty \frac{1}{n}\int_0^1 y^{n-1}\mathrm{d}y=\frac32\sum_{n=1}^\infty\frac{1}{n^2}=\frac{3}{2}\zeta(2). \end{gather*}$$ So we have $$\frac{\pi^2}{4}=\frac{3}{2}\zeta(2)\Longrightarrow \zeta(2)=\frac{\pi^2}{6}.$$

• This looks identical to Daniele Ritelli's solution to the Basel Problem. We would like to refer you to our joint AMS Publication for a generalization of this particular proof: ams.org/journals/qam/2018-76-03/S0033-569X-2018-01499-3 Commented Mar 5, 2021 at 23:02
• @Vivek Kaushik can you provide a link to his solution? Commented Mar 6, 2021 at 18:13
• Here is his paper: arxiv.org/abs/1208.5981. The joint publication listed earlier also references some other authors with similar solutions. Commented Mar 6, 2021 at 18:59
• @Vivek Kaushik thanks Commented Mar 7, 2021 at 0:09

I thought I'd just add a rigorous, yet only slightly more involved version of @QiaochuYuan 's proof:

So the generating function of the Bernoulli numbers, given by $$g(z) = \frac{z}{e^z - 1}$$ does have a partial fraction decomposition, but we have to divide by $$z$$ in order to make the pole sum converge, so $$\frac{g(z)}{z} = \frac{1}{e^z - 1} = -\frac{1}{2} + \frac{1}{z} + \sum_{n=1}^\infty \frac{2z}{z^2 + (2πn)^2}$$ where we already collected the terms for each $$n$$ and $$-n$$ together. This is justified because the difference between $$g(z)/z$$ and the partial fraction decomposition is bounded and holomorphic and hence constant, and the limit may easily be computed at $$0$$. Near $$0$$ all of this converges absolutely, so that we are justified in permuting the order of summation in order to obtain the expression $$\sum_{n=1}^\infty \frac{2 (-1)^k}{(2πn)^2(2πn)^{2k}}$$ for the $$k+1$$-st coefficient in the power series expansion of $$g(z)/z$$. Equating coefficients then yields the desired formula.

• @FShrike I suppose that my above answer to a comment of yours doesn't itself fit into a comment... Commented Mar 31, 2022 at 15:04

The extraction of the desired values will also consider the simple fact that $$\displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}= \sum_{n=1}^{\infty}\frac{1}{(2n)^2}+ \sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}=\frac{1}{4} \sum_{n=1}^{\infty}\frac{1}{n^2}+ \sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}$$ that leads to $$\displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{4}{3}\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}$$. Exploiting the power series $$\displaystyle \operatorname{arctanh}(x)=\sum_{n=1}^{\infty}\frac{x^{2n-1}}{2n-1}$$, we write

$$4\sum_{n=1}^{\infty} \frac{1}{(2n-1)^2}=4\int_0^1 \frac{\operatorname{arctanh}(x)}{x}\textrm{d}x =-\int_0^1\left( \int_0^1\frac{\partial}{\partial x} \left(\frac{\log((1+y)^2-4 x y)}{y}\right)\textrm{d}x\right) \textrm{d}y$$ $$=4\int_0^1\left( \int_0^1 \frac{1}{(y+1-2x)^2+(2 \sqrt{x (1-x)})^2}\textrm{d}y\right) \textrm{d}x$$ $$=4\int_0^1\frac{1}{2 \sqrt{x (1-x)}}\arctan\left(\frac{y+1-2x}{2 \sqrt{x (1-x)}}\right)\biggr|_{y=0}^{y=1}\textrm{d}x$$

$$\begin{equation*} =2\int_0^1\frac{1}{\sqrt{x (1-x)}}\left(\arctan\left(\frac{\sqrt{1-x}}{ \sqrt{x}}\right)-\arctan\left(\frac{1-2x}{2 \sqrt{x (1-x)}}\right)\right)\textrm{d}x \end{equation*}$$ $$\begin{equation*} \overset{x=\cos^2(t)}{=}4 \int_0^{\pi/2}x \textrm{d}x +4 \underbrace{\int_0^{\pi/2}\arctan(\cot(2x))\textrm{d}x}_{\displaystyle 0 \text{ by symmetry}}=\frac{\pi^2}{2}, \end{equation*}$$ which gives $$\displaystyle \sum_{n=1}^{\infty} \frac{1}{(2n-1)^2}=\frac{\pi^2}{8}$$, and combined with $$\displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{4}{3}\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2}$$, we arrive at the desired result, and the proof is complete.

Another creative solution may be found in (Almost) Impossible Integrals, Sums, and Series (2019), Chapter $$3$$, Section $$3.1$$, pp. $$55-57$$.

This proof comes from here The triangle inequality implies $\displaystyle 1 + \frac{1}{2^2} + \frac{1}{3^2} + \cdots = \frac{\pi^2}{6}$
Pick three random points $$A$$, $$B$$, $$C$$ on the unit circle. Let the sides of triangle $$ABC$$ have length $$a$$,$$b$$,$$c$$. The probability that $$a+b\gt xc$$ is $$\mathbb{Pr}(\frac{a+b}c\gt x)=\frac4{\pi^2}\int_{-\pi/2}^{\pi/2} \arcsin(\frac{\cos\phi}x)d\phi$$ which has the series $$\frac8{\pi^2}\sum_{n=0}^{\infty}\frac1{(2n+1)^2x^{2n+1}}$$ By the triangle inequality, the limit of the probability as $$x\to1$$ is $$1$$, which establishes the sum.
Proof:
The angles at $$A$$,$$B$$ and $$C$$ are half the angles subtended at the centre so$$(\alpha,\beta,\gamma)$$ is uniformly distributed over the flat region bounded by $$(\pi,0,0),(0,\pi,0),(0,0,\pi)$$.
Since $$\frac{\sin\alpha}a=\frac{\sin\beta}b=\frac{\sin\gamma}c$$, the key ratio equals $$\frac{a+b}c=\frac{\sin\alpha+\sin\beta}{\sin\gamma}\\=\frac{2\sin\frac{\alpha+\beta}2\cos{\frac{\alpha-\beta}2}}{\sin(\alpha+\beta)}\\ =\frac{\cos\frac{\alpha-\beta}2}{\cos\frac{\alpha+\beta}2}$$ Define $$\theta =\frac{\alpha+\beta}2,\phi=\frac{\alpha-\beta}2$$ The relevant region is $$0\le\theta\le\frac\pi2,\\-\theta\le\phi\le\theta$$ which has area $$\pi^2/4$$.
The inequality we want is equivalent to $$\cos\theta\le\frac{\cos\phi}x\\ \arccos\frac{\cos\phi}x\le\theta\le\frac\pi2$$ Integrate to find the region's area, divided by the domain's area to get $$\mathbb{Pr}(\frac{a+b}c\ge x)=\frac4{\pi^2} \int_{-\pi/2}^{\pi/2}\arcsin\frac{\cos\phi}xd\phi$$ To establish the series, differentate to get $$\frac4{\pi^2}\int_{-\pi/2}^{\pi/2}\frac{-\cos\phi d\phi}{x^2\sqrt{1-\frac{\cos^2\phi}{x^2}}}\\ =\frac{-4}{x\pi^2}\int_{-\pi/2}^{\pi/2} \frac{\cos\phi d\phi}{\sqrt{x^2-1+\sin^2\phi}}\\ =\frac{-8}{x\pi^2}\int_0^{1/\sqrt{x^2-1}}\frac{du}{\sqrt{1+u^2}}\\ =\frac{-8}{x\pi^2}\operatorname{asinh}(1/\sqrt{x^2-1})\\ =\frac{-8}{x\pi^2}\operatorname{atanh}(1/x)\\ =\frac{-8}{\pi^2} \sum_{n=0}^{\infty}\frac1{(2n+1)x^{2n+2}}$$ Integrate this series to get the original probability.

I present my two proofs here, the second one is the simpler proof but relies heavily on the Weierestrass factorization. The first proof is slightly more involved but more rigorous:

Proof 1):

We know that:

$$\arctan(x)=x-\dfrac{x^3}{3}+\dfrac{x^5}{5}-\dfrac{x^7}{7}+\cdots$$

Now,$$\int x^1\arctan(x) \,dx=\dfrac{x^3}{1\cdot3}-\dfrac{x^5}{3\cdot5}+\dfrac{x^7}{5\cdot7}+\cdots--(1)$$

$$\int x^3\arctan(x) \,dx=\dfrac{x^5}{1\cdot5}-\dfrac{x^7}{3\cdot7}+\dfrac{x^9}{5\cdot9}+\cdots--(2)$$

$$\int x^5\arctan(x) \,dx=\dfrac{x^7}{1\cdot7}-\dfrac{x^9}{3\cdot9}+\dfrac{x^11}{5\cdot11}+\cdots--(3)\cdots$$

Notice that if one were to add all these equations and replace $$x$$ with $$i$$, they would get the residual value from the square of the Leibniz pi formula times $$i$$.... I.E:

$$\dfrac{\pi}{4}\cdot\dfrac{\pi}{4}=\left(1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+\dfrac{1}{9}+\cdots \right)\left(1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+\dfrac{1}{9}+\cdots \right)$$

$$\dfrac{\pi^2}{16}=\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\cdots+2\left(-\dfrac{1}{1\cdot3}+\dfrac{1}{1\cdot5}-\dfrac{1}{1\cdot7}+\cdots-\dfrac{1}{3\cdot5}+\dfrac{1}{3\cdot7}+\cdots \right)$$

$$\dfrac{\pi^2}{16}=\left(\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\cdots \right)+2K(Say)--(@)$$

Now $$K=\sum_{n=0}^{\infty}\int I^{2n+1} dx=\sum_{n=0}^{\infty} \int x^{2n+1}\arctan(x) dx$$, Where $$I^{1}=(1); I^{3}=(2); I^{5}=(3)\cdots$$

$$I^{1}=\int x^1\arctan(x) \,dx=\dfrac{(x^2+1)\arctan(x)-x}{2}$$ $$I^{3}=\int x^3\arctan(x) \,dx=\dfrac{(3x^4-3)\arctan(x)-x^3+3x}{12}$$ $$I^{5}=\int x^5\arctan(x) \,dx=\dfrac{(15x^6+15)\arctan(x)-3x^5+5x^3-15x}{90}$$

On replacing $$x=i$$ in all these equations, we get: $$I^{1}=-\dfrac{i}{2}; I^{3}=\dfrac{i}{3}; I^{5}=-\dfrac{23i}{90}; I^{7}=\dfrac{22i}{105}\cdots$$

Upon adding these values we get:

$$K=-\dfrac{i}{2}+\dfrac{i}{3}-\dfrac{23i}{90}+\dfrac{22i}{105}-\cdots--(*)$$

Now, we know the Taylor series expansion for $$\arctan^2(x)=x^2 - \dfrac{2}{3}x^4 + \dfrac{23}{45}x^6 - \dfrac{44}{105}x^8 + \dfrac{563}{1575}x^{10} + \cdots$$

By observation, we can see that (*) is equal to the negative half of the $$\arctan^2(x)$$ expansion at $$x=1$$

Therefore, $$\dfrac{\arctan^2(1)}{2}=-(*)=-K=\dfrac{\pi^2}{32}=(-1)\cdot\left(-\dfrac{1}{1\cdot3}+\dfrac{1}{1\cdot5}-\dfrac{1}{1\cdot7}+\cdots-\dfrac{1}{3\cdot5}+\dfrac{1}{3\cdot7}+\cdots \right)$$

This result can be substituted in $$(@)$$, to get: $$\dfrac{\pi^2}{16}=\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\cdots+2K=\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\cdots-\dfrac{\pi^2}{16}$$

Which results in,$$\dfrac{\pi^2}{8}=\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\dfrac{1}{9^2}+\dfrac{1}{11^2}+\dfrac{1}{13^2}+\dfrac{1}{15^2}+\cdots--(!)$$

Now consider:$$L=\dfrac{1}{1^2}+\dfrac{1}{2^2}+\dfrac{1}{3^2}+\dfrac{1}{4^2}+\dfrac{1}{5^2}+\dfrac{1}{6^2}+\cdots=(!)+(L/4)$$

$$=>\dfrac{3L}{4}=(!)=\dfrac{\pi^2}{8}$$

Therefore,$$L=\dfrac{\pi^2}{6}=\dfrac{1}{1^2}+\dfrac{1}{2^2}+\dfrac{1}{3^2}+\dfrac{1}{4^2}+\dfrac{1}{5^2}+\dfrac{1}{6^2}+\cdots$$

Proof 2):

This is by no means rigorous but I found it was enough to give me a general intuition to approach problems like these.

Consider a polynomial:$$a_nx^n+a_{n-1}x^{n-1}+\cdots+a_2x^2+a_1x+a_0$$

Now the summation of the reciprocal products (Two at a time):

$$\sum{\dfrac{1}{r_i\cdot r_j}}=\dfrac{a_2}{a_0}$$

Consider $$\cos(x)$$ as the "polynomial" function. The Taylor expansion is:

$$1-\dfrac{x^2}{2!}+\dfrac{x^4}{4!}-\cdots$$

The roots of $$\cos(x)$$ are: $$\dfrac{\pi}{2},\dfrac{-\pi}{2},\dfrac{3\pi}{2},\dfrac{-3\pi}{2},\dfrac{5\pi}{2},\cdots$$

Here, $$\sum{\dfrac{1}{r_i\cdot r_j}}=\dfrac{a_2}{a_0}=\dfrac{-1}{2}$$

So,$$\dfrac{-1}{2}=\dfrac{1}{\dfrac{\pi}{2}}(\dfrac{1}{\dfrac{3\pi}{2}}+\dfrac{1}{\dfrac{5\pi}{2}}+\cdots+\dfrac{1}{\dfrac{-\pi}{2}}+\dfrac{1}{\dfrac{-3\pi}{2}}+\cdots)+\dfrac{1}{\dfrac{3\pi}{2}}(\dfrac{1}{\dfrac{\pi}{2}}+\dfrac{1}{\dfrac{5\pi}{2}}+\cdots+\dfrac{1}{\dfrac{-\pi}{2}}+\dfrac{1}{\dfrac{-3\pi}{2}}+\cdots)+\dfrac{1}{\dfrac{5\pi}{2}}(\dfrac{1}{\dfrac{\pi}{2}}+\dfrac{1}{\dfrac{3\pi}{2}}+\dfrac{1}{\dfrac{7\pi}{2}}+\cdots+\dfrac{1}{\dfrac{-\pi}{2}}+\dfrac{1}{\dfrac{-3\pi}{2}}+\dfrac{1}{\dfrac{-5\pi}{2}}\cdots)+\cdots$$

This results in:

$$\dfrac{1}{\dfrac{\pi^2}{2}}(\dfrac{1}{\dfrac{3}{2}}+\dfrac{1}{\dfrac{5}{2}}+\cdots+\dfrac{1}{\dfrac{-1}{2}}+\dfrac{1}{\dfrac{-3}{2}}+\cdots)+\dfrac{1}{\dfrac{3\pi^2}{2}}(\dfrac{1}{\dfrac{1}{2}}+\dfrac{1}{\dfrac{5}{2}}+\cdots+\dfrac{1}{\dfrac{-1}{2}}+\dfrac{1}{\dfrac{-3}{2}}+\cdots)+\cdots$$

Resulting in:

$$-\dfrac{1}{2}=\dfrac{1}{\dfrac{\pi^2}{2}}\dfrac{1}{(\dfrac{-1}{2})}+\dfrac{1}{\dfrac{3\pi^2}{2}}\dfrac{1}{(\dfrac{-3}{2})}+\dfrac{1}{\dfrac{5\pi^2}{2}}\dfrac{1}{(\dfrac{-5}{2})}+\cdots$$

Therefore, $$\dfrac{\pi^2}{8}=\dfrac{1}{1^2}+\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+\cdots$$

Consequently, $$\dfrac{\pi^2}{6}=\dfrac{1}{1^2}+\dfrac{1}{2^2}+\dfrac{1}{3^2}+\dfrac{1}{4^2}+\cdots$$

• If I were to replace cosx-0 with, say cosx-1, cosx-1/2 or cosx-√3/2, cosx-sinx, etc... I would get a whole family of equations analogous to the Basel problem. These results can be seemingly generalized as (Where $X_e=\dfrac{\pi}{n}$): $$\dfrac{X_e^2}{2}(\csc^2(X_e)(1+\cos(X_e)))=\dfrac{\pi^2}{2\cdot n^2}(\csc^2(\dfrac{\pi}{n})(1+\cos(\dfrac{\pi}{n})))$$$=\dfrac{\pi^2}{2n^2}\dfrac{1}{1-\cos(\dfrac{\pi}{n})}=\dfrac{1}{1^2}+\dfrac{1}{(2n-1)^2}+\dfrac{1}{(2n+1)^2}+\dfrac{1}{(1-4n)^2}+\dfrac{1}{(1+4n)^2}+\cdots$(For n>1) :) Commented Sep 19, 2023 at 17:17