# What is int (x^2-5x+4 ) / (x^3-2x +1 )?

Jul 28, 2016

$\int \frac{{x}^{2} - 5 x + 4}{{x}^{3} - 2 x + 1} \mathrm{dx}$

$= \left(\frac{5 - 9 \sqrt{5}}{10}\right) \ln \left(\left\mid x + \frac{1}{2} - \frac{\sqrt{5}}{2} \right\mid\right) + \left(\frac{5 + 9 \sqrt{5}}{10}\right) \ln \left(\left\mid x + \frac{1}{2} + \frac{\sqrt{5}}{2} \right\mid\right) + C$

#### Explanation:

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

=(color(red)(cancel(color(black)((x-1))))(x-4))/(color(red)(cancel(color(black)((x-1))))(x^2+x-1)

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

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

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

$= \frac{A}{x + \frac{1}{2} - \frac{\sqrt{5}}{2}} + \frac{B}{x + \frac{1}{2} + \frac{\sqrt{5}}{2}}$

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

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

Equating coefficients:

$\left\{\begin{matrix}A + B = 1 \\ \left(\frac{1}{2} + \frac{\sqrt{5}}{2}\right) A + \left(\frac{1}{2} - \frac{\sqrt{5}}{2}\right) B = - 4\end{matrix}\right.$

Subtract $\frac{1}{2}$ of the first equation from the second to get:

$\frac{\sqrt{5}}{2} \left(A - B\right) = - \frac{9}{2}$

Multiply both sides by $\frac{2}{\sqrt{5}}$ to find:

$A - B = - \frac{9}{\sqrt{5}} = - \frac{9 \sqrt{5}}{5}$

Add this to the first equation to find:

$2 A = 1 - \frac{9 \sqrt{5}}{5} = \frac{5 - 9 \sqrt{5}}{5}$

Hence:

$A = \frac{5 - 9 \sqrt{5}}{10}$

$B = \frac{5 + 9 \sqrt{5}}{10}$

So:

$\int \frac{{x}^{2} - 5 x + 4}{{x}^{3} - 2 x + 1} \mathrm{dx}$

$= \int \left(\frac{5 - 9 \sqrt{5}}{10 \left(x + \frac{1}{2} - \frac{\sqrt{5}}{2}\right)} + \frac{5 + 9 \sqrt{5}}{10 \left(x + \frac{1}{2} + \frac{\sqrt{5}}{2}\right)}\right) \mathrm{dx}$

$= \left(\frac{5 - 9 \sqrt{5}}{10}\right) \ln \left(\left\mid x + \frac{1}{2} - \frac{\sqrt{5}}{2} \right\mid\right) + \left(\frac{5 + 9 \sqrt{5}}{10}\right) \ln \left(\left\mid x + \frac{1}{2} + \frac{\sqrt{5}}{2} \right\mid\right) + C$