# How do you integrate int (x+4)/(x^2+4x-5) dx using partial fractions?

Nov 24, 2015

$\frac{1}{6} \cdot \ln | x + 5 | + \frac{5}{6} \cdot \ln | x - 1 |$

#### Explanation:

1) First step is to factorize the denominator of your fraction completely:

${x}^{2} + 4 x - 5 = \left(x + 5\right) \left(x - 1\right)$

In case you don't know how to do this:
- solve the quadratic equation ${x}^{2} + 4 x - 5 = 0$
- find the solutions $x = - 5$ and $x = 1$
- your factorization is $\left(x - {\text{solution"_1)(x - "solution}}_{2}\right)$

2) Now that you have the factorization, you need to decompose your fraction into partial fractions.

This means that you are searching for $A$ and $B$ so that

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

... multiply both sides of the equation with $\left(x + 5\right) \left(x - 1\right)$...

$\iff x + 4 = A \left(x - 1\right) + B \left(x + 5\right)$
$\iff x + 4 = A \cdot x - A + B \cdot x + 5 B$
$\iff \textcolor{b l u e}{x} + \textcolor{red}{4} = \textcolor{b l u e}{A \cdot x} \textcolor{w h i t e}{x} \textcolor{red}{- A} + \textcolor{b l u e}{B \cdot x} + \textcolor{red}{5 B}$

To solve this equation, you need to compare the $\textcolor{b l u e}{x}$ terms and the $\textcolor{red}{\text{constant}}$ terms:

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

The solution of this linear equation system is $B = \frac{5}{6}$, $A = \frac{1}{6}$.

This means that you have succeded in the partial fraction decomposition:

$\frac{x + 4}{\left(x + 5\right) \left(x - 1\right)} = \frac{1}{6} \cdot \frac{1}{x + 5} + \frac{5}{6} \cdot \frac{1}{x - 1}$

3) The only thing left to do is solving the integral. :-)

$\int \frac{x + 4}{{x}^{2} + 4 x - 5} \text{d"x = int (x+4)/ ((x+5)(x-1)) "d} x$

$\textcolor{w h i t e}{\times \times \times \times \times x} = \int \frac{1}{6} \cdot \frac{1}{x + 5} + \frac{5}{6} \cdot \frac{1}{x - 1} \text{d} x$

$\textcolor{w h i t e}{\times \times \times \times \times x} = \frac{1}{6} \cdot \int \frac{1}{x + 5} \text{d"x + 5/6 * int 1/(x-1) "d} x$

$\textcolor{w h i t e}{\times \times \times \times \times x} = \frac{1}{6} \cdot \ln | x + 5 | + \frac{5}{6} \cdot \ln | x - 1 |$