# How do you integrate int sqrt(x^2-25) by trigonometric substitution?

Sep 5, 2016

$\frac{x \sqrt{{x}^{2} - 25} - 25 \ln \left(\left\mid \sqrt{{x}^{2} - 25} + x \right\mid\right)}{2} + C$

#### Explanation:

We have:

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

Let $x = 5 \sec \left(u\right)$. Note that this implies $\mathrm{dx} = 5 \sec \left(u\right) \tan \left(u\right) \mathrm{du}$. Thus:

$I = 5 \int \sec \left(u\right) \tan \left(u\right) \sqrt{25 {\sec}^{2} \left(u\right) - 25} \mathrm{du}$

Factoring $\sqrt{25} = 5$:

$I = 25 \int \sec \left(u\right) \tan \left(u\right) \sqrt{{\sec}^{2} \left(u\right) - 1} \mathrm{du}$

Note that since ${\tan}^{2} \left(u\right) + 1 = {\sec}^{2} \left(u\right)$, we can say that $\sqrt{{\sec}^{2} \left(u\right) - 1} = \tan \left(u\right)$, which is why we chose the original subsitution of $x = 5 \sec \left(u\right)$. This yields:

$I = 25 \int \sec \left(u\right) {\tan}^{2} \left(u\right) \mathrm{du}$

Now, rewrite this using ${\tan}^{2} \left(u\right) = {\sec}^{2} \left(u\right) - 1$:

$I = 25 \int \sec \left(u\right) \left({\sec}^{2} \left(u\right) - 1\right) \mathrm{du}$

$I = 25 \int {\sec}^{3} \left(u\right) \mathrm{du} - 25 \int \sec \left(u\right) \mathrm{du}$

The second integral is a common integral:

$I = 25 \int {\sec}^{3} \left(u\right) \mathrm{du} - 25 \ln \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right) \text{ } \textcolor{red}{\overline{\underline{\left\mid \star \right\mid}}}$

Letting ${I}_{1} = \int {\sec}^{3} \left(u\right) \mathrm{du}$, we will solve for it using integration by parts, in the form:

$\int s \mathrm{dt} = s t - \int t \mathrm{ds}$

So, let:

$\left\{\begin{matrix}s = \sec \left(u\right) \text{ "=>" "ds=sec(u)tan(u)du \\ dt=sec^2(u)du" "=>" } t = \tan \left(u\right)\end{matrix}\right.$

Thus:

${I}_{1} = \sec \left(u\right) \tan \left(u\right) - \int \sec \left(u\right) {\tan}^{2} \left(u\right)$

Letting $\tan \left(u\right) = {\sec}^{2} \left(u\right) - 1$:

${I}_{1} = \sec \left(u\right) \tan \left(u\right) - \int \sec \left(u\right) \left({\sec}^{2} \left(u\right) - 1\right) \mathrm{du}$

${I}_{1} = \sec \left(u\right) \tan \left(u\right) - \int {\sec}^{3} \left(u\right) + \int \sec \left(u\right)$

Here, we see that $\int {\sec}^{3} \left(u\right) = {I}_{1}$, the integral we're currently solving for. Additionally, we've already integrated $\sec \left(u\right)$ once:

${I}_{1} = \sec \left(u\right) \tan \left(u\right) - {I}_{1} + \ln \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)$

Adding ${I}_{1}$ to both sides:

$2 {I}_{1} = \sec \left(u\right) \tan \left(u\right) + \ln \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)$

${I}_{1} = \frac{1}{2} \sec \left(u\right) \tan \left(u\right) + \frac{1}{2} \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)$

Returning to $\textcolor{red}{\overline{\underline{\left\mid \star \right\mid}}}$, we see that:

$I = 25 \left(\frac{1}{2} \sec \left(u\right) \tan \left(u\right) + \frac{1}{2} \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)\right) - 25 \ln \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)$

$I = \frac{25}{2} \sec \left(u\right) \tan \left(u\right) - \frac{25}{2} \ln \left(\left\mid \tan \left(u\right) + \sec \left(u\right) \right\mid\right)$

Since we have $x = 5 \sec \left(u\right)$, write this all in terms of $\sec \left(u\right)$:

$I = \frac{25}{2} \sec \left(u\right) \sqrt{{\sec}^{2} \left(u\right) - 1} - \frac{25}{2} \ln \left(\left\mid \sqrt{{\sec}^{2} \left(u\right) - 1} + \sec \left(u\right) \right\mid\right)$

Note that $\frac{x}{5} = \sec \left(u\right)$ and ${\sec}^{2} \left(u\right) = {x}^{2} / 25$:

$I = \frac{25}{2} \left(\frac{x}{5}\right) \sqrt{{x}^{2} / 25 - 1} - \frac{25}{2} \ln \left(\left\mid \sqrt{{x}^{2} / 25 - 1} + \frac{x}{5} \right\mid\right)$

$I = \frac{5}{2} x \sqrt{\frac{{x}^{2} - 25}{25}} - \frac{25}{2} \ln \left(\left\mid \sqrt{\frac{{x}^{2} - 25}{25}} + \frac{x}{5} \right\mid\right)$

Factoring out $\sqrt{\frac{1}{25}} = \frac{1}{5}$:

$I = \frac{1}{2} x \sqrt{{x}^{2} - 25} - \frac{25}{2} \ln \left(\left\mid \frac{1}{5} \sqrt{{x}^{2} - 25} + \frac{x}{5} \right\mid\right)$

$I = \frac{1}{2} x \sqrt{{x}^{2} - 25} - \frac{25}{2} \ln \left(\left\mid \frac{1}{5} \left(\sqrt{{x}^{2} - 25} + x\right) \right\mid\right)$

$I = \frac{1}{2} x \sqrt{{x}^{2} - 25} - \frac{25}{2} \ln \left(\left\mid \sqrt{{x}^{2} - 25} + x \right\mid\right) - \frac{25}{2} \ln \left(\frac{1}{5}\right) + C$

Note that $- \frac{25}{2} \ln \left(\frac{1}{5}\right)$ is absorbed into $C$:

$I = \frac{1}{2} x \sqrt{{x}^{2} - 25} - \frac{25}{2} \ln \left(\left\mid \sqrt{{x}^{2} - 25} + x \right\mid\right) + C$

And, finally:

$I = \frac{x \sqrt{{x}^{2} - 25} - 25 \ln \left(\left\mid \sqrt{{x}^{2} - 25} + x \right\mid\right)}{2} + C$