# How do you evaluate the integral int 1/(x^2-4)?

Mar 26, 2017

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

#### Explanation:

This can be done with partial fractions, but this will be done with a trigonometric substitution.
First, we need to add $\mathrm{dx}$ to the integral:

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

Recall that ${\sec}^{2} \theta - 1 = {\tan}^{2} \theta$.

Because of that identity, let $x = 2 \sec \theta$.

Importantly, this implies that ${x}^{2} - 4 = 4 {\sec}^{2} \theta - 4 = 4 \left({\sec}^{2} \theta - 1\right) = 4 {\tan}^{2} \theta$.

Furthermore, $\mathrm{dx} = 2 \sec \theta \tan \theta d \theta$.

Then:

$I = \int \frac{2 \sec \theta \tan \theta}{4 {\tan}^{2} \theta} d \theta = \frac{1}{2} \int \sec \frac{\theta}{\tan} \theta d \theta = \frac{1}{2} \int \csc \theta d \theta$

Which is a commonly known integral:

$I = - \frac{1}{2} \ln \left\mid \csc \theta + \cot \theta \right\mid$

From our original substitution $x = 2 \sec \theta$ we see that $\sec \theta = \frac{x}{2}$. This is a right triangle where $2$ is the side adjacent to $\theta$, $x$ is the hypotenuse and then the side opposite theta is $\sqrt{4 - {x}^{2}}$.

Then, $\csc \theta = \frac{x}{\sqrt{4 - {x}^{2}}}$ and $\cot \theta = \frac{2}{\sqrt{4 - {x}^{2}}}$. So:

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

Expanding further:

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

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

We can combine these and switch the order of $2 - x$ to $x - 2$ since we're working with absolute values:

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

This would be much quicker if done with partial fractions.

Mar 27, 2017

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

#### Explanation:

We can also show how to solve with partial fractions:

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

$\frac{1}{\left(x - 2\right) \left(x + 2\right)} = \frac{A}{x - 2} + \frac{B}{x + 2}$

$\frac{1}{\left(x - 2\right) \left(x + 2\right)} = \frac{A \left(x + 2\right) + B \left(x - 2\right)}{\left(x - 2\right) \left(x + 2\right)}$

$1 = A x + 2 A + B x - 2 B$

$1 = \left(A + B\right) x + 2 \left(A - B\right)$

$\left\{\begin{matrix}A + B = 0 \\ 2 A - 2 B = 1\end{matrix}\right.$

$\left\{\begin{matrix}A = - B \\ 4 A = 1\end{matrix}\right.$

$\left\{\begin{matrix}A = \frac{1}{4} \\ B = - \frac{1}{4}\end{matrix}\right.$

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

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

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

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

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