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

Mar 18, 2018

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

#### Explanation:

We seek:

$I = \int \frac{2 - x}{\sqrt{{x}^{2} - 4}} \setminus \mathrm{dx}$

I would not use trigonometric substitutions. Using linearity we can split this into two integrals:

$I = \int \frac{2}{\sqrt{{x}^{2} - 4}} - \frac{x}{\sqrt{{x}^{2} - 4}} \setminus \mathrm{dx}$

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

Consider the first integral:

${I}_{1} = \int \frac{2}{\sqrt{{x}^{2} - 4}} \setminus \mathrm{dx}$

We can perform a substitution of the form:

$u = \frac{x}{2} \implies \frac{\mathrm{du}}{\mathrm{dx}} = \frac{1}{2}$

Substituting into the integral, we get:

${I}_{1} = \int \frac{2}{\sqrt{{\left(2 u\right)}^{2} - 4}} \setminus \left(2\right) \mathrm{du}$
$\setminus \setminus \setminus = \int \frac{1}{\sqrt{4 \left({u}^{2} - 1\right)}} \setminus \mathrm{du}$
$\setminus \setminus \setminus = 2 \int \frac{1}{\sqrt{{u}^{2} - 1}} \setminus \mathrm{du}$

Which is a standard integral, so we can readily integrate and restore the substitution:

${I}_{1} = 2 \ln | u + \sqrt{{u}^{2} - 1} |$
$\setminus \setminus \setminus = 2 \ln | \frac{x}{2} + \sqrt{{x}^{2} / 4 - 1} |$
$\setminus \setminus \setminus = 2 \ln | \frac{x}{2} + \sqrt{\frac{1}{4} \left({x}^{2} - 4\right)} |$
$\setminus \setminus \setminus = 2 \ln | \frac{x}{2} + \frac{1}{2} \sqrt{{x}^{2} - 4} |$
$\setminus \setminus \setminus = 2 \ln | \frac{1}{2} \left(x + \sqrt{{x}^{2} - 4}\right) |$
$\setminus \setminus \setminus = 2 \ln \left(\frac{1}{2}\right) + 2 \ln | x + \sqrt{{x}^{2} - 4} |$

Now, we consider the second integral:

${I}_{2} = \int \setminus \frac{x}{\sqrt{{x}^{2} - 4}} \setminus \mathrm{dx}$

We can perform a substitution of the form:

$u = {x}^{2} - 4 \implies \frac{\mathrm{du}}{\mathrm{dx}} = 2 x$

Substituting into the integral, we get:

${I}_{2} = \int \setminus \frac{1}{\sqrt{u}} \setminus \left(\frac{1}{2}\right) \setminus \mathrm{du}$
$\setminus \setminus \setminus = \frac{1}{2} \setminus \int \setminus \frac{1}{\sqrt{u}} \setminus \mathrm{du}$

Which is a standard integral, so we can readily integrate and restore the substitution:

${I}_{2} = \frac{\frac{1}{2} \sqrt{u}}{\frac{1}{2}}$
$\setminus \setminus \setminus = \sqrt{u}$
$\setminus \setminus \setminus = \sqrt{{x}^{2} - 4}$

And Combining these results, and introducing a constant of integration, we get:

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