What is int (x^3-2x^2+6x-3 ) / (-x^2+ 9 x +2 )?

$\int \frac{{x}^{3} - 2 {x}^{2} + 6 x - 3}{- {x}^{2} + 9 x + 2} \mathrm{dx} =$
$- {x}^{2} / 2 - 7 x - \frac{71}{2} \cdot \ln \left({x}^{2} - 9 x - 2\right)$
$- \frac{661 \sqrt{89}}{178} \cdot \ln \left(\frac{2 x - 9 - \sqrt{89}}{2 x - 9 + \sqrt{89}}\right) + C$

Explanation:

From the given integrand, divide the numerator by the denominator. So that
(x^3−2x^2+6x−3)/(−x^2+9x+2)=-x-7-(71x+11)/(x^2-9x-2)

We have to simplify the third term, so that

$\frac{71 x + 11}{{x}^{2} - 9 x - 2} = \frac{\left(\frac{71}{2}\right) \left(2 x - 9 + 9 + \frac{2 \cdot 11}{71}\right)}{{x}^{2} - 9 x - 2}$

that is to force into the numerator a term $\left(2 x - 9\right)$ which is the derivative of $\left({x}^{2} - 9 x - 2\right)$, enabling us to use $\int \left(\frac{\mathrm{du}}{u}\right) = \ln u + C$.

We can also use $\int \frac{\mathrm{du}}{{u}^{2} - {a}^{2}} = \frac{1}{2 a} \cdot \ln \left(\frac{u - a}{u + a}\right) + C$ afterwards

the continuation is

$\frac{71 x + 11}{{x}^{2} - 9 x - 2} = \frac{\left(\frac{71}{2}\right) \left(2 x - 9 + \frac{661}{71}\right)}{{x}^{2} - 9 x - 2}$

$\frac{71 x + 11}{{x}^{2} - 9 x - 2} = \frac{\left(\frac{71}{2}\right) \left(2 x - 9\right) + \left(\frac{71}{2}\right) \left(\frac{661}{71}\right)}{{x}^{2} - 9 x - 2}$

Now, we are ready to integrate

int(x^3−2x^2+6x−3)/(−x^2+9x+2)dx=int(-x-7-(71x+11)/(x^2-9x-2))dx

int(x^3−2x^2+6x−3)/(−x^2+9x+2)dx=

$\int \left(- x - 7 - \frac{\left(\frac{71}{2}\right) \left(2 x - 9\right) + \left(\frac{71}{2}\right) \left(\frac{661}{71}\right)}{{x}^{2} - 9 x - 2}\right) \mathrm{dx}$

$\int \left(- x - 7 - \frac{\left(\frac{71}{2}\right) \left(2 x - 9\right)}{{x}^{2} - 9 x - 2} - \frac{\left(\frac{71}{2}\right) \left(\frac{661}{71}\right)}{{x}^{2} - 9 x - 2}\right) \mathrm{dx}$

also by "completing the square"

$\int \left(- x - 7 - \frac{\left(\frac{71}{2}\right) \left(2 x - 9\right)}{{x}^{2} - 9 x - 2} - \frac{\left(\frac{661}{2}\right)}{{\left(x - \frac{9}{2}\right)}^{2} - {\left(\frac{\sqrt{89}}{2}\right)}^{2}}\right) \mathrm{dx}$

and

$- {x}^{2} / 2 - 7 x$
$- \frac{71}{2} \cdot \ln \left({x}^{2} - 9 x - 2\right) - \frac{661 \sqrt{89}}{178} \cdot \ln \left(\frac{2 x - 9 - \sqrt{89}}{2 x - 9 + \sqrt{89}}\right) + C$

God bless....I hope the explanation is useful.