<s>[INST] Integral fraction of polynomials I have this problem:
$$\int \frac{-2x^2+6x+8}{x^4-4x+3}dx$$
I have tried using partial fractions, but I can't get solution. Thank you for any advice.
 [/INST] As one can obviously see, $x=1$ is a root of the denominator, and thus, it can be divided by $(x-1)$. Using long division, we get $(x-1)(x^3+x^2+x-3)$
Again, we can see that $x=1$ is a solution, of the second factor, so, using long division again, we get $(x-1)^2(x^2+2x+3)$
$$\frac{-2x^2+6x+8}{(x-1)^2(x^2+2x+3)}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Ex+F}{(x^2+2x+3)}$$
Thus, we have 
$$-2x^2+6x+8=A(x-1)(x^2+2x+3)+B(x^2+2x+3)+(Ex+F)(x-1)^2$$
$$-2x^2+6x+8=A(x^3+2x^2+3x-x^2-2x-3)+Bx^2+2Bx+3B+(Ex+F)(x^2-2x+1)$$
By identification, we find 
$A=-1$, $B=2$ $E=1$ $F=-1$
$$\int \frac{-1}{x-1}\,dx =-\ln(x-1)$$
$$\int \frac{2}{(x-1)^2} \,dx =\int 2(x-1)^{-2} =-2(x-1)^{-1}\,dx$$
$$\int \frac{x-1}{x^2+2x+3}\,dx=\int \frac{x+1}{x^2+2x+3}\,dx -2\int \frac{1}{x^2+2x+3}\,dx =\frac{1}{2}\ln(x^2+2x+3)-2\int \frac{1}{2+(x+1)^2} \,dx =\frac{1}{2}\ln(x^2+2x+3)-\int \frac{1}{1+(\frac{x+1}{\sqrt{2}})^2} \,dx =\frac{1}{2}\ln(x^2+2x+3)-\sqrt{2}\arctan \frac{x+1}{\sqrt{2}}$$
Not sure if I made any mistake since it's pretty late and I'm dead tired, but I hope this gets the point. 
</s>