Integral of $\int \frac{-x^2+2x-3}{x^3-x^2+x-1}dx$ I have this simple integral: $\int \frac{-x^2+2x-3}{x^3-x^2+x-1}dx$ and I can't come up with the correct answer.
Here's what I did:
I found the roots for $x^3-x^2+x-1$ so I could do partial fractions:
$\frac{-x^2+2x-3}{x^3-x^2+x-1}=\frac{A}{x-1}+\frac{Bx+C}{x^2+1}=\frac{A(x^2+1)+(Bx+C)(x-1)}{(x-1)(x^2+1)}$
I then found the values for $A$, $B$ and $C$:
$x^2(A+B)+x(-B+C)+A-C=-x^2+2x-3$
$
\left\{ 
\begin{array}{c}
A+B=-1 \\ 
-B+C=2 \\ 
A-C=-3
\end{array}
\right. 
$
$A=-1$, $B=0$, $C=2$
So now back again with the integral:
$\int \frac{-1}{x-1}dx+\int \frac{2}{x^2+1}dx=-\int \frac{1}{x-1}dx + 2 \int \frac{1}{x^2+1}dx=-\ln|x-1|+2|x^2+1|=2\ln|\frac{x^2+1}{x-1}|+C$
But why the correct answer is $2 \arctan(x)-\ln|x-1|+C$? Where does the $arctan$ come from?

You have calculated the problem correctly but you made a small mistake while taking the integral of $\int\dfrac{2}{x^2+1}$
To solve such integrals,
take the constant out and then simplify:
$$2\cdot \int \:\frac{1}{x^2+1}dx$$
We know, $$\int \:\frac{1}{x^2+1}dx  = \arctan(x) $$
So, 
$$\int\dfrac{2}{x^2+1} = 2\cdot \arctan \left(x\right)$$
As you progress in Calculus, you have to have these kinds of integrals memorized. See derivatives of inverse trig functions.
