# How do you integrate int 1/(x-sqrt(9 + x^2))dx using trigonometric substitution?

Sep 11, 2016

$- \frac{{x}^{2} + x \sqrt{{x}^{2} + 9} + 9 \ln \left\mid \sqrt{{x}^{2} + 9} + x \right\mid}{18} + C$

#### Explanation:

First multiply by the conjugate:

$I = \int \frac{1}{x - \sqrt{9 + {x}^{2}}} \cdot \frac{x + \sqrt{9 + {x}^{2}}}{x + \sqrt{9 + {x}^{2}}} \mathrm{dx}$

$= \int \frac{x + \sqrt{9 + {x}^{2}}}{{x}^{2} - \left(9 + {x}^{2}\right)} \mathrm{dx}$

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

$= - \frac{1}{9} \int x \mathrm{dx} - \frac{1}{9} \int \sqrt{9 + {x}^{2}} \mathrm{dx}$

$= - \frac{1}{18} {x}^{2} - \frac{1}{9} \int \sqrt{9 + {x}^{2}} \mathrm{dx}$

Letting $J = \int \sqrt{9 + {x}^{2}} \mathrm{dx}$, we will solve this by using the substitution $x = 3 \tan \theta$. This implies that $\mathrm{dx} = 3 {\sec}^{2} \theta d \theta$.

$J = \int \sqrt{9 + {x}^{2}} \mathrm{dx} = \int \sqrt{9 + 9 {\tan}^{2} \theta} \left(3 {\sec}^{2} \theta d \theta\right)$

$= 9 \int \sqrt{1 + {\tan}^{2} \theta} \left({\sec}^{2} \theta d \theta\right)$

Since $1 + {\tan}^{2} \theta = {\sec}^{2} \theta$:

$J = 9 \int {\sec}^{3} \theta d \theta$

To solve this integral, we will use integration by parts, which takes the form $\int u \mathrm{dv} = u v - \int v \mathrm{du}$. For $K = \int {\sec}^{3} \theta d \theta$, let:

$\left\{\begin{matrix}u = \sec \theta \text{ "=>" "du=secthetatanthetad theta \\ dv=sec^2thetad theta" "=>" } v = \tan \theta\end{matrix}\right.$

Thus:

$K = \sec \theta \tan \theta - \int \sec \theta {\tan}^{2} \theta d \theta$

Let ${\tan}^{2} \theta = {\sec}^{2} \theta - 1$:

$K = \sec \theta \tan \theta - \int \sec \theta \left({\sec}^{2} \theta - 1\right) d \theta$

$K = \sec \theta \tan \theta - \int {\sec}^{3} \theta d \theta + \int \sec \theta d \theta$

Notice that we have the original integral $K = \int {\sec}^{3} \theta d \theta$ imbedded in this integral. Also, the integration of just secant is a common integral.

$K = \sec \theta \tan \theta - K + \ln \left\mid \sec \theta + \tan \theta \right\mid$

Solving for $K$:

$2 K = \sec \theta \tan \theta + \ln \left\mid \sec \theta + \tan \theta \right\mid$

$K = \frac{\sec \theta \tan \theta + \ln \left\mid \sec \theta + \tan \theta \right\mid}{2} = \int {\sec}^{3} \theta d \theta$

Returning to $J = 9 \int {\sec}^{3} \theta d \theta$, we see that:

$J = \frac{9}{2} \left(\sec \theta \tan \theta + \ln \left\mid \sec \theta + \tan \theta \right\mid\right)$

We should write this in terms of just $\tan \theta$:

$J = \frac{9}{2} \left(\sqrt{{\tan}^{2} \theta + 1} \left(\tan \theta\right) + \ln \left\mid \sqrt{{\tan}^{2} \theta + 1} + \tan \theta \right\mid\right)$

Since $\tan \theta = \frac{x}{3}$:

$J = \frac{9}{2} \left(\sqrt{{x}^{2} / 9 + 1} \left(\frac{x}{3}\right) + \ln \left\mid \sqrt{{x}^{2} / 9 + 1} + \frac{x}{3} \right\mid\right)$

$J = \frac{9}{2} \left(\sqrt{\frac{1}{9} \left({x}^{2} + 9\right)} \left(\frac{x}{3}\right) + \ln \left\mid \sqrt{\frac{1}{9} \left({x}^{2} + 9\right)} + \frac{x}{3} \right\mid\right)$

$J = \frac{9}{2} \left(\frac{x}{9} \sqrt{{x}^{2} + 9} + \ln \left\mid \frac{1}{3} \left(\sqrt{{x}^{2} + 9} + x\right) \right\mid\right)$

$J = \frac{x}{2} \sqrt{{x}^{2} + 9} + \frac{9}{2} \ln \left\mid \sqrt{{x}^{2} + 9} + x \right\mid - \frac{9}{2} \ln \left(3\right)$

(Ignore the constant since this is from an integral, just we haven't yet added $C$ for convenience purposes.)

$\int \sqrt{9 + {x}^{2}} \mathrm{dx} = \frac{x}{2} \sqrt{{x}^{2} + 9} + \frac{9}{2} \ln \left\mid \sqrt{{x}^{2} + 9} + x \right\mid$

Plugging this into $I = - \frac{1}{18} {x}^{2} - \frac{1}{9} \int \sqrt{9 + {x}^{2}} \mathrm{dx}$:

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

$I = - \frac{1}{18} {x}^{2} - \frac{1}{18} x \sqrt{{x}^{2} + 9} - \frac{1}{2} \ln \left\mid \sqrt{{x}^{2} + 9} + x \right\mid$

$I = - \frac{{x}^{2} + x \sqrt{{x}^{2} + 9} + 9 \ln \left\mid \sqrt{{x}^{2} + 9} + x \right\mid}{18} + C$