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

Dec 29, 2016

$\int \frac{x - 2}{3 x \left(x + 4\right)} \mathrm{dx} = \frac{1}{2} \ln \left(x + 4\right) - \frac{1}{6} \ln \left(x\right) + C$. See below.

#### Explanation:

The major component of the solution will be the use of partial fractions.

First, we can bring $\frac{1}{3}$ outside the integral as a constant to simplify the integrand slightly.

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

Setting up partial fractions:

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

We multiply both sides by the denominator on the left, $x \left(x + 4\right)$:

$\left[\frac{x - 2}{\cancel{x \left(x + 4\right)}} = \frac{A}{\cancel{x}} + \frac{B}{\cancel{x + 4}}\right] \left(x \left(x + 4\right)\right)$

This gives:

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

We pick values of $x$ which will cancel one of the variables. If we try $x = 0$, we'll get the $B$ term to drop away ($B \cdot 0 = 0$).

$\implies - 2 = A \left(4\right)$

Solving for $A$, we get $A = - \frac{1}{2}$.

Now we want to solve for B. If we set $x = - 4$ in the original equation, we'll get the $A$ term to drop away:

$\implies - 6 = B \left(- 4\right)$

Solving for $B$, we get $B = \frac{3}{2}$. Now we put $A$ and $B$ back into our partial fractions:

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

$\frac{x - 2}{x \left(x + 4\right)} = \frac{- \frac{1}{2}}{x} + \frac{\frac{3}{2}}{x + 4}$

Substitute back into the integral:

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

We can break up the integral (sum rule):

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

Bringing the constants outside:

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

For the first integral, we know that $\int \frac{1}{x} \mathrm{dx} = \ln \left(x\right)$, so we have:

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

For the second integral, we can do a substitution, where $u = x + 4$ and $\mathrm{du} = \mathrm{dx}$. This gives:

$- \frac{1}{6} \ln \left(x\right) + \frac{1}{2} \int \frac{1}{u} \mathrm{du}$

$\implies - \frac{1}{6} \ln \left(x\right) + \frac{1}{2} \ln \left(u\right)$

Substitute back in for $u$ and account for any constants:

$\implies \frac{1}{2} \ln \left(x + 4\right) - \frac{1}{6} \ln \left(x\right) + C$