# Evaluate the integral int \ sqrt(x-x^2)/x \ dx ?

Jul 21, 2017

$\int \frac{\sqrt{x - {x}^{2}}}{x} \text{d} x = x \sqrt{\frac{1}{x} - 1} - \arctan \left(\sqrt{\frac{1}{x} - 1}\right) + C$.

#### Explanation:

Note that the integrand requires $x > 0$. For $x > 0$, $x = \sqrt{{x}^{2}}$. Then rewrite the integrand as,

$\frac{\sqrt{x - {x}^{2}}}{x} = \sqrt{\frac{x - {x}^{2}}{x} ^ 2}$.
$\frac{\sqrt{x - {x}^{2}}}{x} = \sqrt{\frac{1}{x} - 1}$.

Then denote the required integral by $I$.

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

Make the substitution $u = \sqrt{\frac{1}{x} - 1}$. Then $\text{d"x = -2x^2sqrt(1/x-1)"d} u$. Then $I$ is transformed to,

$I = - 2 \int {x}^{2} \left(\frac{1}{x} - 1\right) \text{d} u$.

From the definition of $u$, $\frac{1}{x} - 1 = {u}^{2}$. Then $x = \frac{1}{1 + {u}^{2}}$, ${x}^{2} = \frac{1}{1 + {u}^{2}} ^ 2$. Then,

$I = - 2 \int {u}^{2} / {\left({u}^{2} + 1\right)}^{2} \text{d} u$,
$I = - \int u \cdot \frac{2 u}{{u}^{2} + 1} ^ 2 \text{d} u$.

Integration by parts states $\int f ' \left(u\right) g \left(u\right) \text{d"u = f(u)g(u) - int f(u)g'(u)"d} u$. Let $f ' \left(u\right) = 2 \frac{u}{{u}^{2} + 1} ^ 2$, $g \left(u\right) = u$.

A good general integration result to be aware of is, for $n \ne - 1$,

$\int p ' \left(x\right) {\left[p \left(x\right)\right]}^{n} \text{d} x = \frac{{\left[p \left(x\right)\right]}^{n + 1}}{n + 1} + C$.

This can be easily verified by differentiating the LHS.

Then as $f ' \left(u\right)$ is in this form we conclude $f \left(u\right) = - \frac{1}{{u}^{2} + 1}$. Then, by parts,

$I = - \left(- \frac{1}{{u}^{2} + 1} \cdot u - \int - \frac{1}{{u}^{2} + 1} \text{d} u\right)$,
$I = \frac{u}{{u}^{2} + 1} - \int \frac{1}{{u}^{2} + 1} \text{d} u$,

Another general integration result to be aware of is $\int \frac{1}{{u}^{2} + 1} \text{d} u = \arctan \left(u\right) + C$. Then,

$I = \frac{u}{{u}^{2} + 1} - \arctan \left(u\right) + C$.

We know $u = \sqrt{\frac{1}{x} - 1}$. Then ${u}^{2} + 1 = \frac{1}{x}$. We conclude,

$I = x \sqrt{\frac{1}{x} - 1} - \arctan \left(\sqrt{\frac{1}{x} - 1}\right) + C$.

Jul 22, 2017

$\int \setminus \frac{\sqrt{x - {x}^{2}}}{x} \setminus \mathrm{dx} = \frac{1}{2} \arcsin \left(2 x - 1\right) + \sqrt{x - {x}^{2}} + C$

#### Explanation:

We seek:

$I = \int \setminus \frac{\sqrt{x - {x}^{2}}}{x} \setminus \mathrm{dx}$

We can start by completing the square of the numerator to get:

$x - {x}^{2} = - \left({x}^{2} - x\right)$
$\text{ } = - \left\{{\left(x - \frac{1}{2}\right)}^{2} - {\left(\frac{1}{2}\right)}^{2}\right\}$
$\text{ } = \frac{1}{4} - {\left(x - \frac{1}{2}\right)}^{2}$
$\text{ } = \frac{1}{4} \left\{1 - {\left(2 x - 1\right)}^{2}\right\}$

So we can write:

$I = \int \setminus \frac{\sqrt{\frac{1}{4} \left\{1 - {\left(2 x - 1\right)}^{2}\right\}}}{x} \setminus \mathrm{dx}$
$\setminus \setminus = \frac{1}{2} \setminus \int \setminus \frac{\sqrt{1 - {\left(2 x - 1\right)}^{2}}}{x} \setminus \mathrm{dx}$

Then comparing the numerator with $1 - {\sin}^{2} A$ we could try a trig substitution of the form:

$\sin \theta = 2 x - 1 \implies \cos \theta \frac{d \theta}{\mathrm{dx}} = 2$, and $x = \frac{1}{2} \left(\sin \theta + 1\right)$

Substituting this into the integral and we get:

$I = \frac{1}{2} \setminus \int \setminus \frac{\sqrt{1 - {\sin}^{2} \theta}}{\frac{1}{2} \left(\sin \theta + 1\right)} \setminus \frac{1}{2} \cos \theta \setminus d \theta$
$\setminus \setminus = \frac{1}{2} \setminus \int \setminus {\cos}^{2} \frac{\theta}{\sin \theta + 1} \setminus d \theta$
$\setminus \setminus = \frac{1}{2} \setminus \int \setminus \frac{1 - {\sin}^{2} \theta}{1 + \sin \theta} \setminus d \theta$
$\setminus \setminus = \frac{1}{2} \setminus \int \setminus \frac{\left(1 + \sin \theta\right) \left(1 - \sin \theta\right)}{1 + \sin \theta} \setminus d \theta$
$\setminus \setminus = \frac{1}{2} \setminus \int \setminus 1 - \sin \theta \setminus d \theta$
$\setminus \setminus = \frac{1}{2} \setminus \left\{\theta + \cos \theta\right\} + C$

And from the substitution we have:

${\sin}^{2} \theta = {\left(2 x - 1\right)}^{2} \implies {\cos}^{2} \theta = 1 - {\left(2 x - 1\right)}^{2}$
$\therefore {\cos}^{2} \theta = 1 - 4 {x}^{2} + 4 x - 1$
$\text{ } = 4 x - 4 {x}^{2}$

And so we can reverse the substitution to get:

$I = \frac{1}{2} \setminus \left\{\arcsin \left(2 x - 1\right) + \sqrt{4 \left(x - {x}^{2}\right)}\right\} + C$
$\setminus \setminus = \frac{1}{2} \arcsin \left(2 x - 1\right) + \sqrt{x - {x}^{2}} + C$