# A beautiful integral which yields a solution to the Basel problem

Recently, I came across a powerful elementary integral, $\int_{0}^1 \frac{1}{(1+yx)\sqrt{1-x^2}} \, dx$ where $y\in (-1, 1).$

We will start out by finding the value of the integral above, letting $x=\sin (t)$,

\begin{aligned} \int_{0}^1 \frac{1}{(1+yx)\sqrt{1-x^2}} \, dx =& \int_{0}^{\frac{\pi}{2}} \frac{1}{1+y\sin t} \, dt \\ =& \int_{0}^{\frac{\pi}{2}} \frac{1}{\sin^2 (\frac{t}{2})+\cos^2 (\frac{t}{2})+2y\sin (\frac{t}{2})\cos (\frac{t}{2})} \, dt \\ =& 2\int_{0}^{\frac{\pi}{2}} \frac{(\tan (\frac{t}{2}))'}{\tan^2 (\frac{t}{2})+2y\tan (\frac{t}{2})+1} \, dt \\ =& 2\int_{0}^{1} \frac{1}{u^2+2yu+1} \, du \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[u=\tan (\frac{t}{2})\right] \\ =& 2\int_{0}^{1} \frac{1}{(u+y)^2+1-y^2} \, du \\ =& 2\int_{y}^{1+y} \frac{1}{v^2+1-y^2} \, dv \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[v=u+y\right] \\ =& \frac{2}{\sqrt{1-y^2}}\int_{\tan^{-1} \left(\frac{y}{\sqrt{1-y^2}}\right)}^{\tan^{-1} \left(\frac{1+y}{\sqrt{1-y^2}}\right)} \, d\theta \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[v=\sqrt{1-y^2} \tan \theta \right] \\ =& \frac{2}{\sqrt{1-y^2}} \left[\tan^{-1} \left(\frac{1+y}{\sqrt{1-y^2}}\right)-\tan^{-1} \left(\frac{y}{\sqrt{1-y^2}}\right)\right] \\ =& \frac{2}{\sqrt{1-y^2}} \tan^{-1} \left(\sqrt{\frac{1-y}{1+y}}\right) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[\tan^{-1} (x)-\tan^{-1}(y)=\tan^{-1} \left(\frac{x-y}{1+xy} \right) \right]\\ =& \frac{\arccos y}{\sqrt{1-y^2}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[\arccos (\alpha) = 2 \arctan \left(\sqrt{\frac{1-\alpha}{1+\alpha}}\right), \ \alpha \in (-1,1] \right]\end{aligned} .

Now, we can solve the Basel problem using this integral, by integrating both sides with respect to $y$ from $-1$ to $1$, the RHS is just $\int_{-1}^1 \frac{\arccos y}{\sqrt{1-y^2}} \, dy = \left. -\frac{\arccos^2 y}{2}\right|_{-1}^1 =\frac{\pi ^2}{2}.$ For the LHS, we switch the order of integration to get

\begin{aligned} \int_{-1}^{1} \int_{0}^1 \frac{1}{(1+yx)\sqrt{1-x^2}} \, dx \, dy =& \int_{0}^{1} \int_{-1}^1 \frac{1}{(1+yx)\sqrt{1-x^2}} \, dy \, dx \\ =& \int_{0}^1 \left. \dfrac{\ln (1+xy)}{x\sqrt{1-x^2}}\right|_{-1}^{1} \, dx \\ =& -\int_{0}^{1} \frac{\ln \left(\frac{1-x}{1+x}\right)}{x\sqrt{1-x^2}} \, dx \\ =& -4\int_{0}^{1} \frac{\ln y}{1-y^2} \, dy \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left[ \textrm{Let} \ \ y^2 = \frac{1-x}{1+x}\right]\\ =& -4\int_{0}^{1} \sum_{n=0}^\infty y^{2n} \ln y dy \\ =& -4\sum_{n=0}^\infty \int_{0}^1 y^{2n} \ln y \, dy \\ =& -4\sum_{n=0}^\infty \left(\cancelto{=0}{\left. \dfrac{y^{2n+1} \ln y}{2n+1} \right|_{0}^{1}}- \int_{0}^1 \frac{y^{2n}}{2n+1} \, dy \right) \\ =& 4 \sum_{n=0}^\infty \left. \dfrac{y^{2n+1}}{(2n+1)^2} \right|_{0}^1 \\ =& 4\sum_{n=0}^\infty \frac{1}{(2n+1)^2} \end{aligned}

Therefore, by these two values, we get $\sum_{n=1}^\infty \frac{1}{(2n-1)^2} = \sum_{n=0}^\infty \frac{1}{(2n+1)^2} = \frac{\pi ^2}{8}.$ If we let $S=\displaystyle{\sum_{n=1}^\infty \frac{1}{n^2}}$, we have $S=\sum_{n=1}^\infty \frac{1}{(2n-1)^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} + \frac{S}{4} \implies \frac{3S}{4}=\sum_{n=1}^\infty \frac{1}{(2n-1)^2}=\frac{\pi ^2}{8} \implies \boxed{S=\frac{\pi ^2}{6}}$

Note by ChengYiin Ong
3 months, 4 weeks ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

I vaguely remember this integral coming up in one of my quantum mechanics courses - the professor dedicated the entire class to talking about the Basel problem and how it can be solved this way. It's nice to see it on here!

- 3 months, 3 weeks ago

Wow, in a quantum mechanics course! I was also surprised when I first came across this integral.

- 3 months, 3 weeks ago

This integral and solution is a first problem mentioned in Almost Impossible Integrals, Sums and Series by Cornel loan Vălean. The approach I have is use of the double integral.

- 2 weeks, 6 days ago