# How to calculate $\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx$

I have to calculate the integral:

$$\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx$$

I tried a various sort of ways, I'll present 2 of them that lead me nowhere, maybe someone will see a way through the obstacles.

way 1: trigonometric substitution :

substitue:

$$\tan\left(\frac{x}{2}\right)=t$$

thus

$$\sin\left(x\right)=\frac{2t}{1+t^{2}},\cos\left(x\right)=\frac{1-t^{2}}{1+t^{2}},dx=\frac{2}{1+t^{2}}dt$$

$$\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx=\intop_{0}^{1}\frac{\frac{\sqrt{2t}}{\sqrt{1+t^{2}}}}{\frac{\sqrt{2t}}{\sqrt{1+t^{2}}}+\frac{\sqrt{1-t^{2}}}{\sqrt{1+t^{2}}}}\frac{2}{1+t^{2}}dt=\intop_{0}^{1}\frac{2\sqrt{2t}}{\left(1+t^{2}\right)\left(\sqrt{2t}+\sqrt{1-t^{2}}\right)}dt$$

From here I cannot see how to continue.( I tried to multiply the denominator and the numerator by $$\sqrt{2t}-\sqrt{1-t^{2}}$$ but it also seems like a dead end.

In the other way that I tried, I did found an antideriviative of the integrand, but not in the segment

$$[0,\frac{\pi}{2}]$$

because if we could divide by $$\sqrt{\sin x}$$ then we'd get:

$$\int\frac{1}{1+\sqrt{\cot x}}dx$$ then if we substitue $$\sqrt{\cot x}=t$$ then

$$\sqrt{\cot x}=t$$

so

$$\frac{1}{2t}\cdot\frac{-1}{\sin^{2}x}dx=dt$$

and since $$\frac{1}{\sin^{2}x}=1+\cot^{2}x$$ we would get

$$dx=\frac{-2t}{1+t^{4}}dt$$

Thus

$$\int\frac{1}{1+\sqrt{\cot x}}dx=-\int\frac{2t}{\left(1+t\right)\left(1+t^{4}\right)}dt=-\int\frac{2t}{\left(1+t\right)\left(t^{2}-\sqrt{2}t+1\right)\left(t^{2}+\sqrt{2}t+1\right)}dt=-\int\left(\frac{-1}{t+1}+\frac{1+\sqrt{2}}{2\left(t+\sqrt{2}\right)}+\frac{1-\sqrt{2}}{2\left(t-\sqrt{2}\right)}\right)dt$$

and finally:

$$\int\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx=\ln|\sqrt{\cot x}+1|-\frac{1+\sqrt{2}}{2}\ln|\sqrt{\cot x}+\sqrt{2}|-\frac{1-\sqrt{2}}{2}\ln|\sqrt{\cot x}-\sqrt{2}|+constant$$

So this is an antideriviative, but we cannot use Newton leibnitz's formula because of the point $$x=0$$.

In addition, I tried to calculate this integral with an online integral calculator and it failed to show the steps, so I guess this calculation isnt trivial.

Any suggestions would help.

• This is very simple in fact...Try to prove this property $$\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$$ Aug 22, 2020 at 14:09
• @user35508 Is it true without any demands on $f$ ? how does it helps here ? It would just replace $sin$ by $cos$ Aug 22, 2020 at 14:13
• Use $y=\frac{\pi}{2}-x$ Substitution
– DARK
Aug 22, 2020 at 14:14
• @Waizman: The integrand should be Reimann integrable on $[a,b]$ which is clearly the case here as the integrand is continuous on $[a,b]$
– Koro
Aug 22, 2020 at 14:18

Let $$I=\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}dx\tag{1}$$
Substitute $$x=\pi/2-t$$ so that $$dx=-dt$$. Hence, $$I=-\intop_{\pi/2}^{0}\frac{\sqrt{\cos y }}{\sqrt{\sin y}+\sqrt{\cos y}}dy=\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\cos y}}{\sqrt{\sin y}+\sqrt{\cos y}}dy=\intop_{0}^{\frac{\pi}{2}}\frac{\sqrt{\cos x}}{\sqrt{\cos x}+\sqrt{\sin x}}dx\tag{2}$$
Add the two to get: $$2I= \int_0^{\frac{\pi}{2}} \frac{\sqrt{\sin{x}}+\sqrt{\cos{x}}}{\sqrt{\sin{x}}+\sqrt{\cos{x}}} \; dx \\ = \int_{0}^{\pi/2}dx=\pi/2\implies I=\pi/4$$
As user35508 mentioned in the comments, you can use the substitution of $$u=\frac{\pi}{2}-x$$ to obtain $$\int_0^{\frac{\pi}{2}} \frac{\sqrt{\cos{x}}}{\sqrt{\sin{x}}+\sqrt{\cos{x}}} \; dx$$ This integral is equivalent to the original integral, so if you add the original integral to the previous integral you get: \begin{align*} 2I&=\int_0^{\frac{\pi}{2}} \frac{\sqrt{\sin{x}}+\sqrt{\cos{x}}}{\sqrt{\sin{x}}+\sqrt{\cos{x}}} \; dx \\ &= \frac{\pi}{4} \end{align*}
Hint:use kings property ie replace $$x$$ by $$\frac{\pi}{2}-x$$ you get an equivalent integral . Now add these integrals what do you observe?