Evaluate $\int_{0}^{\frac{\pi}{2}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}$

Evaluate $$I=\int_{0}^{\frac{\pi}{2}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}$$

My try:

Since $$f(x)=f\left(\frac{\pi}{2}-x\right)$$ we have:

$$I=2\int_{0}^{\frac{\pi}{4}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}$$

Applying $$\int_{a}^{b}f(x)dx=\int_{a}^{b}f(a+b-x)dx$$ we get:

$$I=2 \times 2\int_{0}^{\frac{\pi}{4}}\frac{dx}{\left(\sqrt{\cos x-\sin x}+\sqrt{\cos x+\sin x}\right)^2}$$

$$I=4\int_{0}^{\frac{\pi}{4}}\frac{dx}{2\cos x+2\sqrt{\cos 2x}}$$

$$I=2\int_{0}^{\frac{\pi}{4}}\frac{dx}{\cos x+\sqrt{\cos 2x}}$$

$$I=2\int_{0}^{\frac{\pi}{4}}\frac{\sqrt{\cos 2x}-\cos x}{-\sin^2 x}$$

How to proceed now?

• It is $$\frac{\Gamma \left(\frac{3}{4}\right)^2+4 \Gamma \left(\frac{5}{4}\right)^2}{\sqrt{\pi }}-2$$ Commented Feb 23, 2019 at 16:03
• How did you calculate that result? It seems to be the correct answer. Commented Feb 23, 2019 at 16:07
• May be question as $\displaystyle I=\int_{0}^{\frac{\pi}{2}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^4}.$
– DXT
Commented Feb 23, 2019 at 18:43
• BTW: \begin{align}\Gamma\left(\frac54\right)=\frac14\Gamma\left(\frac14\right)\end{align}
– FDP
Commented Feb 23, 2019 at 23:41

\begin{align}I&=\int_{0}^{\frac{\pi}{2}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}\\ &=\int_{0}^{\frac{\pi}{4}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2} +\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}\\\end{align}

In the second integral perform the change of variable $$y=\frac{\pi}{2}-x$$,

\begin{align}I&=2\int_{0}^{\frac{\pi}{4}}\frac{dx}{\left(\sqrt{\sin x}+\sqrt{\cos x}\right)^2}\\ \end{align}

Perform the change of variable $$y=\tan x$$,

\begin{align} I&=2\int_{0}^{1}\frac{1}{(1+\sqrt{x})^2\sqrt{1+x^2}}\,dx\\\end{align}

Perform the change of variable $$y=\dfrac{1-x}{1+x}$$,

\begin{align}I&=\sqrt{2}\int_{0}^{1}\frac{1-\sqrt{1-x^2}}{x^2\sqrt{1+x^2}}\,dx\\ &=-\sqrt{2}\Big[\frac{1-\sqrt{1-x^2}}{x\sqrt{1+x^2}}\Big]_0^1-\sqrt{2}\int_0^1 \frac{\sqrt{1-x^2}-2}{\sqrt{1-x^2}(1+x^2)^{\frac{3}{2}}}\,dx\\ &=-1-\sqrt{2}\int_0^1 \frac{1}{(1+x^2)^{\frac{3}{2}}}\,dx+2\sqrt{2}\int_0^1 \frac{1}{\sqrt{1-x^2}(1+x^2)^{\frac{3}{2}}}\,dx\\ &=-1-\sqrt{2}\left[\frac{x}{\sqrt{1+x^2}}\right]_0^1+2\sqrt{2}\int_0^1 \frac{1}{\sqrt{1-x^2}(1+x^2)^{\frac{3}{2}}}\,dx\\ &=2\sqrt{2}\int_0^1 \frac{1}{\sqrt{1-x^2}(1+x^2)^{\frac{3}{2}}}\,dx-2\\ \end{align}

Perform the change of variable $$y=\dfrac{1-x}{1+x}$$,

\begin{align}I&=\int_0^1 \frac{x^2+1+2x}{\sqrt{x}(1+x^2)^{\frac32}}\,dx-2\\ &=\int_0^1 \frac{1}{\sqrt{x}\sqrt{1+x^2}}\,dx+2\int_0^1 \frac{\sqrt{x}}{(1+x^2)^{\frac32}}\,dx-2\\ \end{align}

Perform the change of variable $$y=\sqrt{x}$$ in both integrals,

\begin{align}I&=2\int_0^1 \frac{1}{\sqrt{1+x^4}}\,dx+4\int_0^1 \frac{x^2}{(1+x^4)^{\frac32}}\,dx-2\end{align}

\begin{align}A&=\int_0^1 \frac{1}{\sqrt{1+x^4}}\,dx\end{align}

Perform the change of variable $$y=\frac{1}{x}$$,

\begin{align}A&=\int_1^\infty \frac{1}{\sqrt{1+x^4}}\,dx=\int_0^\infty \frac{1}{\sqrt{1+x^4}}\,dx-\int_0^1 \frac{1}{\sqrt{1+x^4}}\,dx\\ &=\int_0^\infty \frac{1}{\sqrt{1+x^4}}\,dx-A \end{align}

Therefore,

\begin{align}A&=\frac{1}{2}\int_0^\infty \frac{1}{\sqrt{1+x^4}}\,dx\end{align}

In the same manner one obtains,

\begin{align}\int_0^1 \frac{x^2}{(1+x^4)^{\frac32}}\,dx&=\frac{1}{2}\int_0^\infty \frac{x^2}{(1+x^4)^{\frac32}}\,dx\end{align}

Therefore,

\begin{align}I&=\int_0^\infty \frac{1}{\sqrt{1+x^4}}\,dx+2\int_0^\infty \frac{x^2}{(1+x^4)^{\frac32}}\,dx-2\end{align}

Perform the change of variable $$y=x^4$$,

\begin{align}I&=\frac{1}{4}\int_0^\infty \frac{x^{-\frac34}}{(1+x)^{\frac12}}\,dx+\frac{1}{2}\int_0^\infty \frac{x^{-\frac14}}{(1+x)^{\frac32}}\,dx-2\\ &=\frac{1}{4}\text{B}\left(\frac{1}{4},\frac{1}{4}\right)+\frac{1}{2}\text{B}\left(\frac{3}{4},\frac{3}{4}\right)-2\\ &=\frac{1}{4}\times \frac{\Gamma^2\left(\frac{1}{4}\right)}{\Gamma\left(\frac{1}{2}\right)}+\frac{1}{2}\times \frac{\Gamma^2\left(\frac{3}{4}\right)}{\Gamma\left(\frac{3}{2}\right)}-2\\ &=\frac{1}{4}\times \frac{\Gamma^2\left(\frac{1}{4}\right)}{\Gamma\left(\frac{1}{2}\right)}+\frac{1}{2}\times \frac{\Gamma^2\left(\frac{3}{4}\right)}{\frac{1}{2}\Gamma\left(\frac{1}{2}\right)}-2\\ &=\frac{1}{4}\times \frac{\Gamma^2\left(\frac{1}{4}\right)}{\Gamma\left(\frac{1}{2}\right)}+\frac{\Gamma^2\left(\frac{3}{4}\right)}{\Gamma\left(\frac{1}{2}\right)}-2\\ \end{align}

It is well known (Euler's reflection formula) that,

\begin{align}\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}\end{align}

Therefore,

\begin{align}\boxed{I=\frac{\Gamma^2\left(\frac{1}{4}\right)}{4\sqrt{\pi}}+\frac{\Gamma^2\left(\frac{3}{4}\right)}{\sqrt{\pi}}-2}\end{align}

NB:

$$\text{B}$$ is the Euler beta function.

• Comment s’adresser directement à FDP pour lui soumettre un probléme ? Commented Apr 10 at 7:46
• @Fjaclot: Tu poses ta question sur lesmathematiquesnet
– FDP
Commented Apr 10 at 8:34

Substitute $$x\to\dfrac\pi4+x$$ $$(1)$$, exploit symmetry $$(2)$$, rationalize the integrand $$(3)$$, put everything in terms of $$\sin x$$ $$(4)$$, then integrate by parts $$(5)$$ to produce some incomplete elliptic integrals.

\begin{align*} I &= \int_0^\tfrac\pi2 \frac{dx}{\left(\sqrt{\sin x} + \sqrt{\cos x}\right)^2} \\ &= \sqrt2 \int_{-\tfrac\pi4}^\tfrac\pi4 \frac{dx}{\left(\sqrt{\cos x + \sin x} + \sqrt{\cos x - \sin x}\right)^2} \tag1 \\ &= 2 \sqrt2 \int_0^\tfrac\pi4 \frac{dx}{\left(\sqrt{\cos x + \sin x} + \sqrt{\cos x - \sin x}\right)^2} \tag2 \\ &= \frac1{\sqrt2} \int_0^\tfrac\pi4 \frac{\left(\sqrt{\cos x+\sin x} - \sqrt{\cos x-\sin x}\right)^2}{\sin^2x} \, dx \tag3 \\ &= \sqrt2 \int_0^\tfrac\pi4 \frac{\sqrt{1-\sin^2x} - \sqrt{1-2\sin^2x}}{\sin^2x} \, dx \tag4 \\ &= -2 + 2\sqrt2 \int_0^\tfrac\pi4 \frac{1-\sin^2x}{\sqrt{1-2\sin^2x}} \, dx \tag5 \\ &= -2 + \sqrt2 \left[\int_0^\tfrac\pi4 \frac{dx}{\sqrt{1-2\sin^2x}} + \int_0^\tfrac\pi4 \sqrt{1-2\sin^2x} \, dx\right] \\ &= \sqrt2 F\left(\frac\pi4,\sqrt2\right) + \sqrt2 E\left(\frac\pi4,\sqrt2\right) - 2 \\ &= 2 E\left(\frac1{\sqrt2}\right) - 2 = \boxed{\frac{\Gamma^2\left(\frac14\right)}{4\sqrt\pi} + \frac{2\pi^{3/2}}{\Gamma^2\left(\frac14\right)} - 2} \end{align*}

The penultimate step follows from identities listed here $$(29)$$ and here $$(8)$$, which for $$\cot z=1$$ satisfies

$$\csc z \left(F(z,\csc z) + E(z,\csc z)\right) = \csc^2z \, E(\sin z).$$

The final EI's value is also known $$(44)$$.

That $$I$$ reduces to a single EI expression suggests there's a more direct approach (related question), and in fact substituting $$\sin x = \dfrac1{\sqrt2} \sin y$$ at the integral in $$(5)$$ does exactly that.

\begin{align*} & \sqrt2 \int_0^\tfrac\pi4 \frac{1-\sin^2x}{\sqrt{1-2\sin^2x}} \, dx \\ &= \sqrt2 \int_0^\tfrac\pi2 \frac{1 - \frac12\sin^2y}{\sqrt{1 - \sin^2y}} \cdot \frac{\cos y}{\sqrt2 \sqrt{1 - \frac12\sin^2y}} \, dy \\ &= \int_0^\tfrac\pi2 \sqrt{1 - \frac12\sin^2y} \, dy = E\left(\frac1{\sqrt2}\right) \end{align*}