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

Feb 24, 2017

$27 \ln \left\mid x + \sqrt{{x}^{2} + 4} \right\mid - \frac{1}{2} x \sqrt{{x}^{2} + 4} + C$

#### Explanation:

We will want to use the substitution $x = 2 \tan \theta$. This implies that $\mathrm{dx} = 2 {\sec}^{2} \theta \textcolor{w h i t e}{.} d \theta$.

$I = \int \frac{25 - {x}^{2}}{\sqrt{{x}^{2} + 4}} \mathrm{dx} = \int \frac{25 - 4 {\tan}^{2} \theta}{\sqrt{4 {\tan}^{2} \theta + 4}} \left(2 {\sec}^{2} \theta \textcolor{w h i t e}{.} d \theta\right)$

Note that $\sqrt{4 {\tan}^{2} \theta + 4} = 2 \sqrt{{\tan}^{2} \theta + 1} = 2 \sec \theta$. The fact that we use ${\tan}^{2} \theta + 1 = {\sec}^{2} \theta$ to simplify the square root was the reason to choose the substitution $x = 2 \tan \theta$ in the first place.

$I = \int \frac{25 - 4 {\tan}^{2} \theta}{2 \sec \theta} \left(2 {\sec}^{2} \theta\right) d \theta = \int \left(25 - 4 {\tan}^{2} \theta\right) \left(\sec \theta\right) d \theta$

Expanding and writing ${\tan}^{2} \theta \sec \theta$ in terms of $\sin \theta$ and $\cos \theta$:

$I = 25 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \int {\sin}^{2} \frac{\theta}{\cos} ^ 3 \theta d \theta$

Rewrite ${\sin}^{2} \theta$ as $1 - {\cos}^{2} \theta$:

$I = 25 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \int \frac{1 - {\cos}^{2} \theta}{\cos} ^ 3 \theta d \theta$

$I = 25 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \int \left({\sec}^{3} \theta - \sec \theta\right) d \theta$

$I = 29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \int {\sec}^{3} \theta \textcolor{w h i t e}{.} d \theta \text{ "" } \textcolor{red}{\left(\star\right)}$

We will tackle $\int {\sec}^{3} \theta \textcolor{w h i t e}{.} d \theta$ with integration by parts. Since ${\sec}^{3} \theta = \sec \theta \left({\sec}^{2} \theta\right)$, and ${\sec}^{2} \theta$ can easily be integrated, let:

$\left\{\begin{matrix}u = \sec \theta & \implies & \mathrm{du} = \sec \theta \tan \theta \textcolor{w h i t e}{.} d \theta \\ \mathrm{dv} = {\sec}^{2} \theta \textcolor{w h i t e}{.} d \theta & \implies & v = \tan \theta\end{matrix}\right.$

Then, using $\int u \mathrm{dv} = u v - \int v \mathrm{du}$:

$I = 29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \left(\sec \theta \tan \theta - \int \sec \theta {\tan}^{2} \theta \textcolor{w h i t e}{.} d \theta\right)$

$I = 29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \sec \theta \tan \theta + 4 \int \sec \theta {\tan}^{2} \theta \textcolor{w h i t e}{.} d \theta$

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

$I = 29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \sec \theta \tan \theta + 4 \int \sec \theta \left({\sec}^{2} \theta - 1\right) d \theta$

$I = 25 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \sec \theta \tan \theta + \left[4 \int {\sec}^{3} \theta \textcolor{w h i t e}{.} d \theta\right]$

Returning to $\textcolor{red}{\left(\star\right)}$, we see that $4 \int {\sec}^{3} \theta \textcolor{w h i t e}{.} d \theta = 29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - I$:

$I = 25 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \sec \theta \tan \theta + \left[29 \int \sec \theta \textcolor{w h i t e}{.} d \theta - I\right]$

Combining and adding $I$ to both sides:

$2 I = 54 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 4 \sec \theta \tan \theta$

$I = 27 \int \sec \theta \textcolor{w h i t e}{.} d \theta - 2 \sec \theta \tan \theta$

The antiderivative of $\sec \theta$ is commonly known:

$I = 27 \ln \left\mid \tan \theta + \sec \theta \right\mid - 2 \sec \theta \tan \theta$

Our original substitution was $x = 2 \tan \theta$, which implies that $\tan \theta = \frac{x}{2}$.

From this we can say that $\sec \theta = \sqrt{{\tan}^{2} \theta + 1} = \sqrt{{x}^{2} / 4 + 1} = \frac{1}{2} \sqrt{{x}^{2} + 4}$. Then:

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

Factoring $\frac{1}{2}$ from the natural logarithm, it can be removed from the logarithm using $\ln \left(\frac{a}{b}\right) = \ln \left(a\right) - \ln \left(b\right)$, and the resultant $- \ln \left(2\right)$ will be absorbed into the constant of integration.

$I = 27 \ln \left\mid x + \sqrt{{x}^{2} + 4} \right\mid - \frac{1}{2} x \sqrt{{x}^{2} + 4} + C$

Feb 24, 2017

$\int \frac{25 - {x}^{2}}{\sqrt{{x}^{2} + 4}} \mathrm{dx}$

$= 27 \ln | \frac{x + \sqrt{{x}^{2} + 4}}{2} | - \frac{x \sqrt{{x}^{2} + 4}}{2} + C$

#### Explanation:

$\int \frac{25 - {x}^{2}}{\sqrt{{x}^{2} + 4}} \mathrm{dx}$

$= \int \frac{25 - {x}^{2}}{\sqrt{\left(4\right) \left({x}^{2} / 4 + 1\right)}}$

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

Recognize trig substitution in denominator from radical, so list various useful trigonometric ratios with this triangle.

$\textcolor{g r e e n}{\tan \theta = \frac{x}{2}}$
$\textcolor{g r e e n}{x = 2 \tan \theta}$
$\textcolor{g r e e n}{\mathrm{dx} = 2 {\sec}^{2} \theta \left(d \theta\right)}$
$\textcolor{g r e e n}{25 - {x}^{2} = 25 - 4 {\tan}^{2} \theta}$

$\textcolor{g r e e n}{\sec \theta = \sqrt{{\left(\frac{x}{2}\right)}^{2} + 1}}$

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

$= \frac{1}{2} \int \frac{25 - 4 {\tan}^{2} \theta}{\cancel{\sec \theta}} \left(2 \cancel{\sec \theta} \sec \theta\right) \left(d \theta\right)$

$= \int \left[25 \sec \theta - 4 \sec \theta {\tan}^{2} \theta\right] d \theta$

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

$= 25 \ln | \sec \theta + \tan \theta | - 4 \int \left(\sec \theta {\tan}^{2} \theta\right) d \theta$

Now, we're getting close to the end - we have to simplify $\textcolor{red}{\int \left(\sec \theta {\tan}^{2} \theta\right) d \theta}$
Use integration by parts:
$\textcolor{red}{u = \tan \theta}$
$\textcolor{red}{\mathrm{du} = {\sec}^{2} \theta}$
$\textcolor{red}{v = \sec \theta}$
$\textcolor{red}{\mathrm{dv} = \sec \theta \tan \theta}$

$\textcolor{red}{\int \left(\sec \theta {\tan}^{2} \theta\right) d \theta = \sec \theta \tan \theta - \int \left({\sec}^{3} \theta\right) d \theta}$
$\textcolor{red}{= \sec \theta \tan \theta - \int \left(\sec \theta\right) \left(1 + {\tan}^{2} \theta\right) d \theta}$
$\textcolor{red}{= \sec \theta \tan \theta - \int \left(\sec \theta\right) d \theta - \int \left(\sec \theta {\tan}^{2} \theta\right) d \theta}$
$\textcolor{red}{\int \left(\sec \theta {\tan}^{2} \theta\right) d \theta = \sec \theta \tan \theta - \ln | \sec \theta + \tan \theta | - \int \left(\sec \theta {\tan}^{2} \theta\right) d \theta}$
$\textcolor{red}{2 \int \sec \theta {\tan}^{2} \theta d \theta = \sec \theta \tan \theta - \ln | \sec \theta + \tan \theta |}$
$\textcolor{red}{\int \sec \theta {\tan}^{2} \theta d \theta = \frac{1}{2} \sec \theta \tan \theta - \frac{1}{2} \ln | \sec \theta + \tan \theta | + C}$

$= 25 \ln | \sec \theta + \tan \theta | - 4 \left[\frac{1}{2} \sec \theta \tan \theta - \frac{1}{2} \ln | \sec \theta + \tan \theta |\right] + C$

$= 25 \ln | \sec \theta + \tan \theta | - 2 \sec \theta \tan \theta + 2 \ln | \sec \theta + \tan \theta | + C$

$= 27 \ln | \sec \theta + \tan \theta | - 2 \sec \theta \tan \theta + C$

Lastly, re-substitute the trig ratios:
$= 27 \ln | \sqrt{{\left(\frac{x}{2}\right)}^{2} + 1} + \frac{x}{2} | - 2 \left(\frac{x}{2}\right) \sqrt{{\left(\frac{x}{2}\right)}^{2} + 1} + C$

$= 27 \ln | \frac{x}{2} + \sqrt{{\left(\frac{x}{2}\right)}^{2} + 1} | - x \sqrt{{\left(\frac{x}{2}\right)}^{2} + 1} + C$

Change the square root notation back to the original form:
$= 27 \ln | \frac{x + \sqrt{{x}^{2} + 4}}{2} | - \frac{x \sqrt{{x}^{2} + 4}}{2} + C$