# How do you find the indefinite integral of int sqrtx/(sqrtx-3)?

Dec 4, 2016

I got:

$x + 6 \sqrt{x} + 18 \ln | \sqrt{x} - 3 | + C$

Let $u = \sqrt{x}$. Then, $\mathrm{du} = \frac{1}{2 \sqrt{x}} \mathrm{dx}$, $2 u \mathrm{du} = \mathrm{dx}$, and we have:

$\implies 2 \int {u}^{2} / \left(u - 3\right) \mathrm{du}$

By subtracting and adding $\frac{9}{u - 3}$, we take advantage of the difference of two squares, and obtain:

$\implies 2 \int \frac{{u}^{2} - 9}{u - 3} + \frac{9}{u - 3} \mathrm{du}$

$= 2 \int \frac{\left(u + 3\right) \cancel{\left(u - 3\right)}}{\cancel{u - 3}} + \frac{9}{u - 3} \mathrm{du}$

$= 2 \int u + 3 + \frac{9}{u - 3} \mathrm{du}$

$= 2 \left({u}^{2} / 2 + 3 u + 9 \ln | u - 3 |\right)$

$= {u}^{2} + 6 u + 18 \ln | u - 3 |$

But since $u = \sqrt{x}$, we un-substitute to get:

$\implies \textcolor{b l u e}{\int \frac{\sqrt{x}}{\sqrt{x} - 3} \mathrm{dx} = x + 6 \sqrt{x} + 18 \ln | \sqrt{x} - 3 | + C}$

Dec 4, 2016

$x + 6 \sqrt{x} + 18 \ln \left\mid \sqrt{x} - 3 \right\mid + C$

#### Explanation:

$I = \int \frac{\sqrt{x}}{\sqrt{x} - 3} \mathrm{dx}$

We will use the substitution $u = \sqrt{x} - 3$. This also implies that $\sqrt{x} = u + 3$, which is a substitution we will use in the numerator.

Differentiating both sides of the substitution, we see that $\mathrm{du} = \frac{1}{2 \sqrt{x}} \mathrm{dx}$, which looks (and is) a little messy. However, we can modify the integral to force this $\frac{1}{2 \sqrt{x}} \mathrm{dx}$ term to appear to our benefit!

Since there's currently no $\frac{1}{2 \sqrt{x}}$ term present, we can multiply the integrand by $2 \sqrt{x} \frac{1}{2 \sqrt{x}}$ to have no net change.

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

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

Returning to our substitutions, which we can now make more easily: we have let $\sqrt{x} - 3 = u$, and following from this $\sqrt{x} = u + 3$ and $\frac{1}{2 \sqrt{x}} \mathrm{dx} = \mathrm{du}$.

$I = 2 \int {\left(u + 3\right)}^{2} / u \mathrm{du}$

Expanding the squared term:

$I = 2 \int \frac{{u}^{2} + 6 u + 9}{u} \mathrm{du}$

Dividing through:

$I = 2 \int \left(u + 6 + \frac{9}{u}\right) \mathrm{du}$

We can write this as $3$ separate integrals (don't forget to distribute the $2$):

$I = 2 \int u + 12 \int \mathrm{du} + 18 \int \frac{1}{u} \mathrm{du}$

All of these are fairly common integrals:

$I = 2 \left({u}^{2} / 2\right) + 12 u + 18 \ln \left\mid u \right\mid + C$

From $u = \sqrt{x} - 3$ we see that:

$I = {\left(\sqrt{x} - 3\right)}^{2} + 12 \left(\sqrt{x} - 3\right) + 18 \ln \left\mid \sqrt{x} - 3 \right\mid + C$

Expanding the first two terms to simplify:

$I = \left(x - 6 \sqrt{x} + 9\right) + 12 \sqrt{x} - 36 + 18 \ln \left\mid \sqrt{x} - 3 \right\mid + C$

The two constants can merge into $C$, the all-powerful constant of integration:

$I = x + 6 \sqrt{x} + 18 \ln \left\mid \sqrt{x} - 3 \right\mid + C$