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

Jan 23, 2017

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

#### Explanation:

$\frac{{x}^{2} - 5}{{x}^{2} - 4 x + 4} = \frac{{x}^{2} - 4 x + 4 + 4 x - 9}{{x}^{2} - 4 x + 4}$

= $1 + \frac{4 x - 9}{x - 2} ^ 2$

Let $\frac{4 x - 9}{x - 2} ^ 2 \Leftrightarrow \frac{A}{x - 2} + \frac{B}{x - 2} ^ 2$

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

Therefore $A = 4$ and $B - 2 A = - 9$ and $B = - 9 + 8 = - 1$

i.e. $\frac{{x}^{2} - 5}{{x}^{2} - 4 x + 4} = 1 + \frac{4}{x - 2} - \frac{1}{x - 2} ^ 2$

and $\int \frac{{x}^{2} - 5}{{x}^{2} - 4 x + 4} \mathrm{dx} = \int \left[1 + \frac{4}{x - 2} - \frac{1}{x - 2} ^ 2\right] \mathrm{dx}$

= $x + 4 \ln | x - 2 | + \frac{1}{x - 2} + c$