I have the integral $$\int \frac{x^3+1}{x^3-5x^2+6x}dx$$ I chose to solve it in the following way : first split it for sum of two fractions and decrease the degree of the polynomial of the numerator. $$\int \frac{x^3+1}{x^3-5x^2+6x}\,dx= \int \frac{x^3}{x^3-5x^2+6x}\,dx +\int \frac{+1}{x^3-5x^2+6x}\,dx $$ \begin{align} \int \frac{x^3}{x^3-5x^2+6x}&\,dx=\int \frac{x^3+5x^2 -5x^2+6x -6x}{x^3-5x^2+6x}\,dx \\ = x + {}&\int \frac{5x^2-6x}{x^3-5x^2+6x}\,dx = x + \int \frac{5x-6}{x^2-5x+6}\,dx\\ = x +{} &\int \frac{-4}{x-2}\,dx +\int \frac{9}{x-3}\,dx = x -4\ln|x-2| + 9\ln|x-3| \end{align}
the second integral I solved in similar way and after sum them both I got the answer $$x+ \frac{1}{6}\ln|x| - \frac{9}{2}\ln|x-2| + \frac{28}{3}\ln|x-3| + c $$ wich is correct answer. But my question is if I could solve it in much shortest and efficient way? could I use long polynomial long dividing?
You don't need to split $x^3+1$ at the beginning. Performing long division you get that $$ \frac{x^3+1}{x^3-5x^2+6x}=1+\frac{5x^2-6x+1}{x^3-5x^2+6x} $$ Then write the denominator as $x(x-2)(x-3)$ and you can rewrite the fraction as $$ \frac{A}{x}+\frac{B}{x-2}+\frac{C}{x-3}=\frac{5x^2-6x+1}{x^3-5x^2+6x} $$ and you get a system in $A,B,C$ by comparing the coefficients. $$ A+B+C=5 \\ -5A-3B-2C=-6\\ 6A=1 $$
So, after you found $A,B,C$, the solution is given by $$ x+A \ln|x|+B \ln |x-2|+C\ln|x-3|+c $$