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

Mar 1, 2017

The answer is $= x - \frac{3}{x} + \ln \left(| x |\right) - \ln \left(| x - 3 |\right) + C$

#### Explanation:

We factorise the denominator

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

We start by performing a polynomial long division

$\textcolor{w h i t e}{a a a a}$${x}^{3} - 3 {x}^{2}$$\textcolor{w h i t e}{a a a a a a}$$- 9$$\textcolor{w h i t e}{a a a a}$$|$${x}^{3} - 3 {x}^{2}$

$\textcolor{w h i t e}{a a a a}$${x}^{3} - 3 {x}^{2}$$\textcolor{w h i t e}{a a a a a a}$color(white)(aaaaaaa)|$1$

$\textcolor{w h i t e}{a a a a a a}$$0 - 0$$\textcolor{w h i t e}{a a a a a a}$$- 9$$\textcolor{w h i t e}{a a a a}$

Therefore,

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

Now, we perform the partial fraction decomposition

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

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

The denominators are the same, we compare the numerators

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

Let $x = 0$,$\implies$,$9 = - 3 A$, $\implies$, $A = - 3$

Let $x = 3$, $\implies$, $9 = 9 C$, $\implies$,$C = 1$

Coefficients of ${x}^{2}$

$0 = B + C$, $\implies$, $B = - C = - 1$

Therefore,

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

So,

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

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

Then,

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

$= x - \frac{3}{x} + \ln \left(| x |\right) - \ln \left(| x - 3 |\right) + C$