# How to calculate integral $\int \frac{\sqrt{x}}{\sqrt{1-x}}dx$

I have this integral $$\int \frac{\sqrt{x}}{\sqrt{1-x}}dx$$

I tried integrating it with integration by parts, using $u = \sqrt t$, trigonometric substitutions, but I'm stuck.

• Try $u=1-x$, then simplify. Commented Dec 13, 2015 at 21:40

If we set $x=z^2$ we are left with $$\int \frac{2z^2}{\sqrt{1-z^2}}\,dz = C+2\arcsin(z)-2\int\sqrt{1-z^2}\,dz$$ and the last integral is easy to manage through integration by parts. We have: $$\int \frac{2z^2}{\sqrt{1-z^2}}\,dz = C+\arcsin(z)-z\sqrt{1-z^2}$$ hence: $$\int\sqrt{\frac{x}{1-x}}\,dx = C+\arcsin(\sqrt{x})-\sqrt{x-x^2}.$$

$$y=\frac{\sqrt{x}}{\sqrt{1-x}} \to D_y=[0,10\\x=cos^2t \\dx=-2\cos t \sin t dt\\\int \frac{\sqrt{x}}{\sqrt{1-x}} dx=\int \frac{\sqrt{cos^2t}}{\sqrt{1-cos^2t}} (-2\cos t \sin t dt)=\\-\int\frac{cost}{sint}(2\cos t \sin t)dt=\\-\int2\cos^2tdt=\\-\int(1+\cos (2t))dt$$

Try using the substitution $x = (\sin t)^2$; then the integrand becomes $\tan t$.

First, rewrite the integral in this form (it's simple algebra):

$$\int \frac{1}{\sqrt{\frac{1-x}{x}}}\ \text{d}x$$

then use the substitution $a = \frac{1-x}{x}$, so $\text{d} a = \left(-\frac{1-x}{x^2} - \frac{1}{x}\right)\ \text{d}x$

you will get now

$$-2 \int \frac{1}{(-a-1)^2)\sqrt{a}}\ \text{d}a$$

now a substitution again with: $b = \sqrt{a}$, $\text{d} b = \frac{1}{2\sqrt{a}}\ \text{d} a$. Arrange the denominator then, and you should now have this writing:

$$-2\int \frac{1}{(b^2 + 1)^2} \text{d} b$$

At this point you should be able to continue.

If not, then read the following

Ok let's continue with another substitution: $b = \tan(y)$, $\text{d} b = \sec^2(y) \text{d} b$

Do little trigonometry and you will get an easy integral:

$$-2\int\cos^2(y)\ \text{d}y$$

This is a really easy integral and you shall compute it. Then begin to substitute back for $y$, $b$, $a$ and $x$ and the result in the end is:

$$\int\frac{\sqrt{x}}{\sqrt{1-x}}\ \text{d}x = - x \sqrt{\frac{1}{x} -1} - \arctan\left(\sqrt{\frac{1}{x} - 1}\right)$$

Here is a slightly different path, using integration by parts:

Let us write the integrand as $$1\cdot \frac{\sqrt{x}}{\sqrt{1-x}}$$ and integrate by parts, choosing $x-1$ as a primitive of $1$. The result, after some simplification, is $$\int\frac{\sqrt{x}}{\sqrt{1-x}}\,dx=-\sqrt{1-x}\sqrt{x}+\frac{1}{2}\int\frac{1}{\sqrt{x-x^2}}\,dx.$$ Next, by completing the square inside the square root, we write $$\frac{1}{2\sqrt{x-x^2}}=\frac{1}{\sqrt{1-(1-2x)^2}}$$ and use the fact that $\int\frac{1}{\sqrt{1-t^2}}\,dt=\arcsin t+C$, to find that $$\int\frac{\sqrt{x}}{\sqrt{1-x}}\,dx=-\sqrt{1-x}\sqrt{x}-\frac{1}{2}\arcsin(1-2x)+C.$$

By geometry:

After the substitution $x=1-t^2$, you get

$$\int\frac{\sqrt x}{\sqrt{1-x}}dx=-2\int\sqrt{1-t^2}dt.$$

The latter integral represents the area of the unit circle between two verticals, one of which is variable (let $1$ and $t$).

This is a circle segment, the difference between a sector and a triangle,

$$S=\theta-\sin(\theta)\cos(\theta),$$ where $\cos(\theta)=t=\sqrt{1-x}$ and $\sin(\theta)=\sqrt x$.

Check:

$$\left(\arccos(\sqrt{1-x})-\sqrt x\sqrt{1-x}\right)'=\frac1{\sqrt{1-x}\sqrt x}-\frac{\sqrt{1-x}}{2\sqrt x}+\frac{\sqrt x}{2\sqrt{1-x}}=\frac{\sqrt x}{\sqrt{1-x}}.$$

Integrate by parts

\begin{align}\int \frac{\sqrt{x}}{\sqrt{1-x}}\ dx=& \int \frac{\sqrt{x}}{\sqrt{1-x}}\ d(x-1)\\ =&\ (x-1) \frac{\sqrt{x}}{\sqrt{1-x}}+\int \frac{d(\sqrt{x})}{\sqrt{1-x}}\\ =& -\sqrt{x}\sqrt{1-x}-\sin^{-1}\sqrt{x}+\overset{}C \end{align}