# How to show that $\int_{0}^{1}\sqrt{x}\sqrt{1-x}\,\mathrm dx =\frac{\pi}{8}$

I was reading Advanced Integration Techniques, and found that$$\int_{0}^{1}\sqrt{x}\sqrt{1-x}\,\mathrm dx =\frac{\pi}{8}$$

The book provides one method using residue theorem and Laurent expansion. However, I wonder if there are other techniques that I can use to evaluate this integral.

The most direct method would be solving the integral and plug in the limits. $$\int_{0}^{1}\sqrt{x}\sqrt{1-x}\,\mathrm dx = \left[\frac{\arcsin(2x-1)+\sqrt{(1-x)x}(4x-2)}{8}\right]_{0}^{1}=\frac{\pi}{8}$$

• Beta function?${}$ – Angina Seng Dec 31 '18 at 18:16
• Maybe you know it, but it's worth to note that it's a particular case of the beta integral. – Madarb Dec 31 '18 at 18:17
• $\sqrt{x}\sqrt{1-x} = \sqrt{x-x^2} = \sqrt{\frac{1}{4}-\left(x-\frac{1}{2}\right)^2}$; substitute $u = x-\frac{1}{2}$. – rogerl Dec 31 '18 at 18:18
• $B\left( \frac 32,\frac 32\right)$ ? – Rohan Shinde Jan 1 '19 at 4:18
• Well, solving a more general problem we can show that (when $\text{n}>0$): $$\mathcal{I}_\text{n}:=\int_0^\text{n}\sqrt{x}\cdot\sqrt{\text{n}-x}\space\text{d}x=\frac{\pi}{8}\cdot\text{n}^2\tag1$$ – Jan Eerland Jan 1 '19 at 16:14

Write $$x=\sin^2 t$$ so $$dx=2\sin t\cos t dt$$. Your integral becomes $$\int_0^{\pi/2}2\sin^2 t\cos^2 t dt=\int_0^{\pi/2}\frac12 \sin^2 2t dt=\int_0^{\pi/2}\frac{1-\cos 4t}{4}dt=\left[\frac{t}{4}-\frac{1}{16}\sin 4t\right]_0^{\pi/2}=\frac{\pi}{8}.$$

Let $$\sqrt{x-x^2}=y$$.

Thus, $$y\geq0$$ and $$x^2-x+y^2=0$$ or $$\left(x-\frac{1}{2}\right)^2+y^2=\left(\frac{1}{2}\right)^2,$$ which is a semicircle with radius $$\frac{1}{2}.$$

Thus, our integral is $$\frac{1}{2}\pi\left(\frac{1}{2}\right)^2=\frac{\pi}{8}.$$

• It's a semicircle since $y>=0$ makes the domain to be only the upper semi-plane, right? – Zacky Dec 31 '18 at 18:56
• Yes, of course. – Michael Rozenberg Dec 31 '18 at 18:57
• That is awesome! I learnt something new today. – Zacky Dec 31 '18 at 18:58

Another technique just for fun (and in the meanwhile, happy new year!). We have $$\frac{1}{\sqrt{1-x}}\stackrel{L^2(0,1)}{=}2\sum_{n\geq 1}P_n(2x-1)$$ hence by Bonnet's recursion formulas and symmetry $$\sqrt{1-x}=2\sum_{n\geq 0}\frac{1}{(1-2n)(2n+3)}P_n(2x-1)$$ $$\sqrt{x}=2\sum_{n\geq 0}\frac{(-1)^n}{(1-2n)(2n+3)}P_n(2x-1)$$ and these FL expansions lead to $$\int_{0}^{1}\sqrt{x(1-x)}\,dx = \color{blue}{4\sum_{n\geq 0}\frac{(-1)^n}{(1-2n)^2 (2n+1)(2n+3)^2}}.$$ Partial fraction decomposition and telescopic series convert the RHS into $$\frac{1}{2}\sum_{n\geq 0}\frac{(-1)^n}{2n+1} = \frac{1}{2}\int_{0}^{1}\sum_{n\geq 0}(-1)^n x^{2n}\,dx = \frac{1}{2}\int_{0}^{1}\frac{dx}{1+x^2}=\frac{\pi}{8}.$$ As a by-product, we got a nice, rapidly convergent representation for $$\pi$$ (eight times the blue one).

Don't like the Legendre base of $$L^2(0,1)$$? Fine, let us go with the Chebyshev one (with respect to a different inner product). Our integral is $$\int_{0}^{1}x(1-x)\frac{dx}{\sqrt{x(1-x)}}$$ and the orthogonality relation for the Chebyshev base is $$\int_{0}^{1}T_m(2x-1)T_n(2x-1)\frac{dx}{\sqrt{x(1-x)}}=\frac{\pi}{2}\delta(m,n)(1+\delta(m)).$$ Since $$x(1-x)$$ decomposes as $$\color{blue}{\frac{1}{8}}T_0(2x-1)-\frac{1}{8}T_2(2x-1)$$, the value of our integral is $$\frac{\pi}{8}$$.

• Great series in blue, Mathematica can't sum it properly (FullSimplify works for the end result, but it's still funny how complicated the initial form is). It also gives us the following identity: $$\, _4F_3\left(1,-\frac{1}{2},-\frac{1}{2},\frac{3}{2};\frac{1}{2},\frac{5}{2},\frac{5}{2};-1\right)= \frac{9}{32} \pi$$ – Yuriy S Aug 2 '19 at 22:55
• Furthermore, $$\, _4F_3\left(1,-\frac{1}{2},-\frac{1}{2},\frac{3}{2};\frac{1}{2},\frac{5}{2},\frac{5}{2};1\right)= \frac{9}{8}$$ Which gives us a positive definite series to prove that $\pi <4$. – Yuriy S Aug 2 '19 at 23:08
• Namely: $$\sum _{n=0}^{\infty } \frac{64}{(4 n+1)^2 (4 n+3) (4 n+5)^2}=4 - \pi$$ – Yuriy S Aug 2 '19 at 23:13

J.G. has the elementary method down. If you see a $$1-x^2$$ term inside your integrand, it might be wise to give a trig substitution a try. In this case, letting $$x=\sin^2\theta$$ works out beautifully.

There’s another less elementary way by utilizing the beta function and the Gamma function. Let me know if you need a proof (I proudly have an elementary proof of it).

Beta Function:$$\operatorname{B}\left(m,n\right)=\int\limits_0^1\mathrm dx\,x^{m-1}(1-x)^{n-1}=\frac {\Gamma(m)\Gamma(n)}{\Gamma(m+n)}$$

The integral under question is then simply\begin{align*}\mathfrak{I} & =\operatorname{B}\left(\frac 32,\frac 32\right)\\ & =\frac {1}{2}\left(\frac {\sqrt{\pi}}2\right)^2\end{align*} Thus$$\int\limits_0^1\mathrm dx\, \sqrt{x(1-x)}\color{blue}{=\frac {\pi}8}$$

• What's your proof? – Larry Dec 31 '18 at 20:00
• @Larry: the fact that $\int_{0}^{1}x^{1/2}(1-x)^{1/2}\,dx$ is a value of the Beta function, I guess. – Jack D'Aurizio Jan 1 '19 at 23:36
• Ok, Frank said he has a elementary proof. I was curious about that – Larry Jan 2 '19 at 0:36
• @Larry: we already have one above: $\int_{0}^{1}\sqrt{x(1-x)}\,dx$ is the area of a half-circle centered at $(1/2,0)$ through the origin. – Jack D'Aurizio Jan 2 '19 at 1:12
• @Larry It’s just integration by parts. – Frank W Jan 2 '19 at 1:23