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

Jun 15, 2018

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

#### Explanation:

Let $x = 2 \sec t$, $\mathrm{dx} = 2 \sec t \tan t \mathrm{dt}$ with $t \in \left(0 , \frac{\pi}{2}\right)$:

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = 2 \int \frac{2 - 4 {\sec}^{2} t}{\sqrt{4 {\sec}^{2} t - 4}} \sec t \tan t \mathrm{dt}$

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = 2 \int \frac{1 - 2 {\sec}^{2} t}{\sqrt{{\sec}^{2} t - 1}} \sec t \tan t \mathrm{dt}$

Now:

${\sec}^{2} t - 1 = {\tan}^{2} t$

and as $\tan t > 0$ for $t \in \left(0 , \frac{\pi}{2}\right)$:

$\sqrt{{\sec}^{2} t - 1} = \tan t$

then:

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = 2 \int \frac{1 - 2 {\sec}^{2} t}{\tan} t \sec t \tan t \mathrm{dt}$

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

Using the linearity if the integral:

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = 2 \int \sec t \mathrm{dt} - 4 \int {\sec}^{3} t \mathrm{dt}$

The first integral is standard:

$\int \sec t \mathrm{dt} = \ln \left\mid \sec t + \tan t \right\mid + C$

Now solve:

$\int {\sec}^{3} t \mathrm{dt} = \int \sec t \cdot {\sec}^{2} t \mathrm{dt} = \int \sec t \frac{d}{\mathrm{dt}} \left(\tan t\right) \mathrm{dt}$

integrate by parts:

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \tan t \frac{d}{\mathrm{dt}} \left(\sec t\right) \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \sec t {\tan}^{2} t \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int \sec t \left({\sec}^{2} t - 1\right) \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \sec t \tan t - \int {\sec}^{3} t \mathrm{dt} + \int \sec t \mathrm{dt}$

$2 \int {\sec}^{3} t \mathrm{dt} = \sec t \tan t + \int \sec t \mathrm{dt}$

$\int {\sec}^{3} t \mathrm{dt} = \frac{\sec t \tan t}{2} + \frac{1}{2} \ln \left\mid \sec t + \tan t \right\mid + C$

Putting it together:

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = 2 \ln \left\mid \sec t + \tan t \right\mid - 2 \sec t \tan t - 2 \ln \left\mid \sec t + \tan t \right\mid + C$

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = - 2 \sec t \tan t + C$

and undoing the substitution, as:

$\sec t = \frac{x}{2}$

$\tan t = \sqrt{{\sec}^{2} t - 1} = \sqrt{{\left(\frac{x}{2}\right)}^{2} - 1} = \frac{1}{2} \sqrt{{x}^{2} - 4}$

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

Jun 15, 2018

Make a substitution that removes the square root in the denominator via the use of a trig identity.

#### Explanation:

Approach

We seek to make a substitution that removes the square root in the denominator via the use of a trig identity. Letting $A$ and $B$ each be some trig function (e.g. $\sin$ or $\sec$), we seek an identity such that ${B}^{2} \left(x\right) = {A}^{2} \left(x\right) - 1$. One such is ${\tan}^{2} \left(x\right) = {\sec}^{2} \left(x\right) - 1$, obtained by dividing through the identity ${\sin}^{2} \left(x\right) + {\cos}^{2} \left(x\right) = 1$ by ${\cos}^{2} \left(x\right)$.

Note that we might have an easier time of the later integration if we used hyperbolic functions instead - we could use ${\cosh}^{2} \left(x\right) - 1 = {\sinh}^{2} \left(x\right)$ instead. But the question asks for a trig substitution, so we'll use the $\tan$-$\sec$ identity above. I'll supply the hyperbolic substitution suggestion underneath, for your interest. If the hyperbolic functions are new to you, have a read of the Wikipedia article on them: https://en.wikipedia.org/wiki/Hyperbolic_function
They are both interesting and useful, as well as surprisingly easy to deal with. Knowing about them will enrich your knowledge of the trig functions.

Trig substitution and solution

Substitute $x = 2 \sec \theta$, so $\frac{\mathrm{dx}}{d \theta} = 2 \sec \theta \tan \theta$, by an application of the quotient rule. Thus

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = \int \frac{2 - 4 {\sec}^{2} \theta}{\sqrt{4 {\sec}^{2} \theta - 4}} \cdot 2 \sec \theta \tan \theta d \theta$
(Use the above identity)
$= \int \frac{2 - 4 {\sec}^{2} \theta}{\sqrt{4 {\tan}^{2} \theta}} \cdot 2 \sec \theta \tan \theta d \theta$
$= 2 \int \frac{2 - 4 {\sec}^{2} \theta}{2 \tan \theta} \sec \theta \tan \theta d \theta$
$= 2 \int \left(1 - 2 {\sec}^{2} \theta\right) \sec \theta d \theta = 2 \int \sec \theta - 2 {\sec}^{3} \theta d \theta$

The integrals of both $\sec \theta$ and ${\sec}^{3} \theta$ are derived here: https://www.math.ubc.ca/~feldman/m121/secx.pdf
We'll just take the results:
$\int \sec \theta d \theta = \ln | \sec \theta + \tan \theta | + C$
$\int {\sec}^{3} \theta d \theta = \frac{1}{2} \sec \theta \tan \theta + \frac{1}{2} \ln | \sec \theta + \tan \theta | + C$

So, for our integral
$2 \int \sec \theta - 2 {\sec}^{3} \theta d \theta =$
$2 \ln | \sec \theta + \tan \theta | - 2 \sec \theta \tan \theta - 2 \ln | \sec \theta + \tan \theta | + C =$
$- 2 \sec \theta \tan \theta + C =$
$- 2 \sec \theta \sqrt{{\sec}^{2} \theta - 1} + C$

Substitute back to our original variable $x$:
$- 2 \cdot \frac{1}{2} x \sqrt{\frac{1}{4} {x}^{2} - 1} + C =$
$- \frac{x}{2} \sqrt{{x}^{2} - 4} + C$

Alternative solution using hyperbolic substitution

As I mentioned this above as an alternative approach, let's work it through to give you more info on ways to attack such problems.

Instead of substituting $x = 2 \sec \theta$ as above, substitute $x = 2 \cosh u$. Then $\frac{\mathrm{dx}}{\mathrm{du}} = 2 \sinh u$.

$\int \frac{2 - {x}^{2}}{\sqrt{{x}^{2} - 4}} \mathrm{dx} = \int \frac{2 - 4 {\cosh}^{2} u}{\sqrt{4 {\cosh}^{2} u - 4}} \cdot 2 \sinh u d \theta$
$= 2 \int \frac{2 - 4 {\cosh}^{2} u}{\sqrt{4 {\sinh}^{2} u}} \sinh u d \theta$
$= 2 \int \frac{2 - 4 {\cosh}^{2} u}{2 \sinh u} \sinh u d \theta$
$= 2 \int 1 - 2 {\cosh}^{2} u d \theta$

This is where we see how the hyperbolic approach produces easier working - this is an easier integral than the $2 \int \sec \theta - 2 {\sec}^{3} \theta d \theta$ that the trig substitution produced. Continuing, using the identity $1 - 2 {\cosh}^{2} u = - \cosh 2 u$

$2 \int 1 - 2 {\cosh}^{2} u \mathrm{du} = - 2 \int \cosh 2 u \mathrm{du}$
$= - \sinh 2 u + C = - 2 \sinh u \cosh u + C = - 2 \cosh u \sqrt{\cosh {u}^{2} - 1} + C$

Substitute back to our original variable $x$:
$- 2 \frac{x}{2} \sqrt{{\left(\frac{x}{2}\right)}^{2} - 1} + C =$
$- \frac{x}{2} \sqrt{{x}^{2} - 4} + C$, as before, but with less awkward working in the integral.

Moral

When presented with an integral of a fraction with a square root denominator of a quadratic, it's always worth taking a moment to think about which particular trig or hyperbolic substitution will make for the easiest route to the answer. There's usually more than one option, and some will be harder work than others. If you can avoid using $\tan$s and $\sec$s by employing $\sinh$s and $\cosh$s, it's almost always a good idea to do so. Unless, of course, the question-setter specifically requests that your solution uses a trig substitution!