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

May 13, 2018

$\int {x}^{2} / \left({x}^{2} + 3 x - 4\right) \mathrm{dx} = x + \frac{1}{5} \ln \left\mid x + 1 \right\mid - \frac{16}{5} \ln \left\mid x + 4 \right\mid + C$

#### Explanation:

Before applying partial fraction decomposition we must reduce the degree of the numerator:

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

Factorize the denominator:

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

now decompose in partial fractions:

$\frac{3 x - 4}{{x}^{2} + 3 x - 4} = \frac{A}{x - 1} + \frac{B}{x + 4}$

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

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

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

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

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

Now:

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

and using the linearity of the integral:

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

$\int {x}^{2} / \left({x}^{2} + 3 x - 4\right) \mathrm{dx} = x + \frac{1}{5} \ln \left\mid x + 1 \right\mid - \frac{16}{5} \ln \left\mid x + 4 \right\mid + C$