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

Feb 4, 2018

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

#### Explanation:

Perform the decomposition into partial fractions

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

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

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

The denominators are the same, compare the numerators

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

Let $x = 0$, $\implies$, $1 = - A$, $\implies$, $A = - 1$

Coefficients of $x$

$0 = A - B$, $\implies$, $B = A = - 1$

Coefficients of ${x}^{2}$

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

Coefficients of ${x}^{3}$

$1 = C + D$, $D = 1 - C = 1 - 0 = 1$

Therefore,

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

So,

int((x^3-x^2+1)dx)x^4-x^3)=-int(1dx)/(x^3)-int(1dx)/(x^2)+int(1dx)/(x-1)

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