Different ways to tackle the integral $\int_0^1\sqrt\frac x{1-x}\,dx$ $$\int_0^1\sqrt\frac x{1-x}\,dx$$
I saw in my book that the solution is $x=\cos^2u$ and $dx=-2\cos u\sin u\ du$.
I would like to see different approaches, can you provide them?
 A: Here it is an entirely different approach, through Fourier-Legendre series expansions.
By the generating function for shifted Legendre polynomials, for any $x\in(0,1)$ we have:
$$ \sqrt{x}=\sum_{n\geq 0}\frac{2(-1)^n}{(1-2n)(2n+3)}\,P_n(2x-1), $$
$$ \frac{1}{\sqrt{1-x}}=\sum_{n\geq 0} 2\,P_n(2x-1), $$
hence by the orthogonality relations it follows that
$$\begin{eqnarray*} \int_{0}^{1}\sqrt{\frac{x}{1-x}}\,dx &=& \sum_{n\geq 0}\frac{4(-1)^{n+1}}{(2n-1)(2n+1)(2n+3)}\\&=&\frac{1}{2}\sum_{n\geq 0}(-1)^{n+1}\left[\frac{1}{2n-1}-\frac{2}{2n+1}+\frac{1}{2n+3}\right]\\
&\stackrel{\text{SBP}}{=}& 2\sum_{n\geq 0}\left[\frac{1}{4n+1}-\frac{1}{4n+3}\right]=2\arctan 1=\color{blue}{\frac{\pi}{2}}. \end{eqnarray*}$$
This technique has a large number of interesting applications, especially about integrals involving $K(k)$ or $E(k)$, which are naturally associated with (shifted) Legendre polynomials.

Yet another approach. By enforcing the substitution $\frac{x}{1-x}\mapsto u^2$ we are left with
$$ 2\int_{0}^{+\infty}\frac{du}{(1+u^2)^2}=-2\left.\frac{d}{da}\int_{0}^{+\infty}\frac{du}{a+u^2}\right|_{a=1}=-\left.\frac{d}{da}\frac{\pi}{\sqrt{a}}\right|_{a=1}=\frac{\pi}{2}.$$
A: Here is another way that involves rationalising the numerator first.
For $0 \leqslant x < 1$ we can write
\begin{align*}
\int_0^1 \sqrt{\frac{x}{1 - x}} \, dx &= \int_0^1 \sqrt{\frac{x}{1 - x}} \cdot \frac{\sqrt{x}}{\sqrt{x}} \, dx\\
&= \int^1_0 \frac{x}{\sqrt{x - x^2}} \, dx
\end{align*}
Now rewriting the numerator as the derivative of the denominator we have 
\begin{align*}
\int_0^1 \sqrt{\frac{x}{1 - x}} \, dx &= -\frac{1}{2} \int^1_0 \frac{(1 - 2x) - 1}{\sqrt{x - x^2}} \, dx\\
&= -\frac{1}{2} \int^1_0 \frac{1 - 2x}{\sqrt{x - x^2}} \, dx + \frac{1}{2} \int^1_0 \frac{dx}{\sqrt{x - x^2}} \, dx\\
&= I_1 + I_2
\end{align*}
The first of these integrals can be found using a substitution of $x = u + 1/2$. The result is 
$$I_1 = \int^{1/2}_{-1/2} \frac{u}{\sqrt{1/4 - u^2}} \, du = 0,$$
as the integrand is odd between symmetric limits.
The second integral can be found by first completing the square. As 
$$x - x^2 = \frac{1}{4} - \left (x - \frac{1}{2} \right )^2,$$
we have
$$I_2 = \frac{1}{2} \int^1_0 \frac{dx}{\sqrt{\frac{1}{2^2} - \left (x - \frac{1}{2} \right )^2}} \, dx = \frac{1}{2} \sin^{-1} (2x - 1) \Big{|}^1_0 = \frac{\pi}{2}.$$
Thus
$$\int_0^1 \sqrt{\frac{x}{1 - x}} \, dx = \frac{\pi}{2}.$$
A: The standard way for rational functions $f\biggl(x,\sqrt{\dfrac{ax+b}{cx+d}}\biggr)$ consists in setting $t=\sqrt{\dfrac{ax+b}{cx+d}}$. So we'll set
$$t=\sqrt{\frac{x}{1-x}}\iff x=\frac{t^2}{1+t^2},\qquad \mathrm dx=\frac{2t}{(1+t^2)^2}\,\mathrm dt.$$
The integral becomes
$$\int_0^1\sqrt{\frac{x}{1-x}}\,\mathrm dx=2\int_0^{+\infty}\frac{t^2\,\mathrm dt}{(1+t^2)^2}=2\biggl(\int_0^{+\infty}\frac{\mathrm dt}{1+t^2}-\int_0^{+\infty}\frac{\mathrm dt}{(1+t^2)^2}\biggr).$$
Now it is well-known the standard integrals $\;I_n=\displaystyle\int\frac{\mathrm dt}{(1+t^2)^n}$ can be computed recursively: in the present case, integrating by parts $I_1=\arctan x$, we'll obtain the following relation between $I_1$ and $I_2$:
$$I_2=\frac{t}{2(1+t^2)}+\frac12I_1,\enspace\text{so }\quad I_1-I_2=\frac12\Bigl(\arctan t-\frac{t}{1+t^2}\Bigr)$$
and finally
$$\int_0^1\sqrt{\frac{x}{1-x}}\,\mathrm dx=\arctan t -\frac{t}{1+t^2}\Biggm\vert_0^{\infty}=\frac\pi2.$$
A: An additional trick may cause a little less headache.
Let $I_1 = \int_{0}^{1} \sqrt{\dfrac{x}{1-x}}dx$
Let $I_2 = \int_{0}^{1} \sqrt{\dfrac{1-x}{x}}dx$
Then $I_1 + I_2 = \int_{0}^{1}\dfrac{1}{ \sqrt{x(1-x)}}dx$
and  $I_1 - I_2 = \int_{0}^{1} \dfrac{2x-1}{\sqrt{x(1-x)}}dx$
Now substitute $x = cos^2(t)$ the two integrals will simplify to 
$I_1+I_2 = 2\int_{0}^{\frac{\pi}{2}} dt $
$I_1-I_2 = \int_{0}^{\frac{\pi}{2}} tan(t)  dt - \int_{0}^{\frac{\pi}{2}} cot(t) dt $ 
Add these
$2I_1 = 2\int_{0}^{\frac{\pi}{2}} dt  + \int_{0}^{\frac{\pi}{2}} tan(t)  dt - \int_{0}^{\frac{\pi}{2}} cot(t) dt$
$I_1 = \frac{\pi}{2} + \frac{1}{2}\left[\int_{0}^{\frac{\pi}{2}} tan(t) dt - \int_{0}^{\frac{\pi}{2}} cot(t) dt\right]$
I think $I_1 = \frac{\pi}{2} $
A: Here is a nice and simple way. No special change of variable.
Let $f: [0,1-\varepsilon]\to [0,f(1-\varepsilon)],~~\text{for}~~~~0<\varepsilon<1$ with $f(x)=\sqrt{\dfrac{x}{1-x}}~ $ is a bijection (even increasing) since $$f'(x) = \frac{1}{2(1-x)^2}\sqrt{\dfrac{1-x}{x}}>0~~~  \text{}~~~~~$$
and we have,
$$f^{-1} (y) = \frac{y^2}{1+y^2}$$
From this formula(see my picture there, for clarification):$\int_{a}^{b} f(x) dx = b \cdot f(b) - a \cdot f(a) - \int_{f(a)}^{f(b)} f^{-1}(x) dx$ proof
It springs that 
$$\int_0^{1-\varepsilon} f(x)dx  = (1-\varepsilon )f(1-\varepsilon) -0f(0) - \int_0^{ f(1-\varepsilon)}\frac{y^2}{1+y^2} dy$$
Hence it follows that,
$$\int_0^1 \sqrt\frac{x}{1-x}dx =\lim_{\varepsilon \to 0 }\int_0^{1-\varepsilon} f(x)dx  =\lim_{\varepsilon \to 0 }\left[(1-\varepsilon )f(1-\varepsilon)- \int_0^{ f(1-\varepsilon)}\frac{y^2}{1+y^2} dy\right]$$
But $$\color{black}{\lim_{\varepsilon \to 0 } (1-\varepsilon )f(1-\varepsilon) = \lim_{\varepsilon \to 0 }(1-\varepsilon )\sqrt{\dfrac{\varepsilon}{1-\varepsilon}} = 0~~and ~~~ \lim_{\varepsilon \to 0 } f(1-\varepsilon) =\infty }$$
Therefore our previous relation becomes, 
$$\color{blue}{\int_0^1 \sqrt\frac{x}{1-x}dx = \int_0^{ \infty}\frac{y^2}{1+y^2} dy\overset{u=1/y}{=} \int_0^{ \infty}\frac{1}{1+u^2} du =\frac{\pi}{2} }$$
A: \begin{align}
I&=\int_0^1\sqrt{\frac{x}{1-x}}\ dx=\int_0^1x^{1/2}(1-x)^{-1/2}\ dx=\text{B}\left(\frac32,\frac12\right)\\
&=\frac{\Gamma(\frac32)\Gamma(\frac12)}{\Gamma(2)}=\frac12\Gamma^{\ 2}\left(\frac12\right)=\frac{\pi}{2}
\end{align}
A: $$ \int_0^1 \sqrt{\frac{x}{1-x}} \mathrm{d}x $$
Let $x = 1 - u^2$ and thus $\mathrm{d}x = -2u\mathrm{d}u$ . Note that the bounds are exchanged by this substitution, i.e. $u(0) = 1$ and $u(1) = 0$
$$ -2\int_{1}^0 \sqrt{\frac{1 - u^2}{u^2}} \cdot u\mathrm{d}u $$
$$ -2\int_{1}^0 \frac{\sqrt{1 - u^2}}{u} \cdot u\mathrm{d}u $$
$$ -2\int_{1}^0 \sqrt{1 - u^2}\;\mathrm{d}u $$
$$ 2 \int_{0}^{1} \sqrt{1 - u^2}\; \mathrm{d}u $$
Next let's put our geometry hat on. $\int_{0}^{1} \sqrt{1 - u^2} \;\mathrm{d}u$ is one quarter the area of a unit circle. Because $u \mapsto \sqrt{1-u^2}$ traces the top half of a unit circle clockwise when $u$ goes from $(-1)$ to $1$.
$$ 2 \cdot \frac{\pi}{4} $$
$$ \frac{\pi}{2} $$
A: Let $u = \sqrt{1-x}$
Then the integral transforms into:
$$2 \int_0^1 \sqrt{1-u^2} \, \mathrm{d} u = \int_{-1}^1 \sqrt{1-u^2} \, \mathrm{d} u$$
Which has a nice geometric interpretation.
A: Using King's rule, we have,
$$I=  \int_0^1\sqrt{\frac{x}{1-x}}dx =\int_0^1\sqrt{\frac{1-x}{x}}dx$$
$$2I = \int_0^1\left(\sqrt{\frac{x}{1-x}}+\sqrt{\frac{1-x}{x}}\right)dx = \int_0^1\frac{1}{\sqrt{x-x^2}}dx=\int_0^1\frac{1}{\sqrt{\frac{1}{4}-(x-\frac{1}{2})^2}}dx$$
$$2I = \big[\arcsin(2x-1)\big]^1_0 = \frac\pi2+\frac\pi2 $$

$$\implies I = \frac\pi2$$

