# How do you evaluate the following integral? [duplicate]

How could you evaluate this integral?

$$\int_0^{\pi/2}\frac{\sqrt{\sin x}}{\sqrt{\sin x}\,+\sqrt{\cos x}} \, dx$$

I think the answer is $\pi/4$.

-

## marked as duplicate by lab bhattacharjee, Claude Leibovici, Davide Giraudo, Daniel Rust, Jyrki LahtonenMay 12 at 10:42

$$\int_0^{\pi/2}\frac{\sqrt{\sin x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}} + \int_0^{\pi/2}\frac{\sqrt{\cos x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}} = \int_0^{\pi/2} 1\,dx = \frac \pi 2.$$

If you can show that the two integrals are equal to each other, then it follows that each must be $\pi/4$.

The substitution $u = \pi/2-x$ and $du=-dx$, transforming $\displaystyle\int_0^{\pi/2}\cdots\,dx$ into $\displaystyle\int_{\pi/2}^0 \cdots\,(-du)$ will do it provided you recall trigonometric identities involving $\sin(\pi/2 - x)$ and $\cos(\pi/2-x)$.

-

HINT:

Evaluate $$\int_{a}^{b} \frac {f(x)}{f(x)+f(a+b-x)}dx.$$

-
you made slight error, all $x$ needs to be replaced by $a+b-x$ –  Santosh Linkha May 11 at 17:36
@SantoshLinkha, I do not think so –  Indrayudh Roy May 11 at 17:41
perhaps you mean different approach ... –  Santosh Linkha May 11 at 17:46
@SantoshLinkha No, I wanted the OP to observe this thing, what everybody has done, replace $x$ by $\frac {\pi}{2}+0-x$. This is the most general form of problems like the OP posted. –  Indrayudh Roy May 11 at 17:49
okay okay ... very nice of you, when I ran my eyes across your solution, i thought you were doing essentially same as every one of us did but made some typo. –  Santosh Linkha May 11 at 17:51

Note that $$\int_0^{\pi/2}\frac{\sqrt{\sin x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}} = \int_0^{\frac \pi 2} \frac{\sqrt{\sin(\pi/2-x)}\,\,dx}{\sqrt{\sin(\pi/2-x)} + \sqrt{\cos(\pi/2-x)}} = \int_0^{\pi/2}\frac{\sqrt{\cos x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}}$$

Let the integral be $I$, then $$2I = \int_0^{\pi/2}\frac{\sqrt{\sin x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}} + \int_0^{\pi/2}\frac{\sqrt{\cos x} \,\, dx}{\sqrt{\sin x}\,+\sqrt{\cos x}}$$

You can do the rest.

-

Substitute $t=\frac {\pi}{2}-x$ then $t=x$ as it is a dummy variable.

Add this equation this to original integrand. It should be $2$ times the integral required after adding and you see the that the integrand is $1$ and you can easily integrate.

-