Evaluate $\int \frac{x^2}{x-1} \,dx$ Evaluate $\int \frac{x^2}{x-1} \,dx$
(A) $2x^2+x+\ln|x-1|+C$
(B) $\frac{x^2}{2}+x+\ln|x+1|+C$
(C) $\frac{x^2}{2}+x+\ln|x-1|+C$
(D) $x^2+x+\ln|x-1|+C$
My attempt :
Let $u=x-1$, so : $du=dx$ and $u+1$
$\int \frac{(u+1)^2}{u}\,du\\
=\int u +2+\frac{1}{u}\,du\\
=\frac{u^2}{2}+2u+\ln|u|+C\\
=\frac{(x-1)^2}{2}+2(x-1)+\ln|x-1|+C$
Simplify :
$\frac{x^2-3}{2}+x+\ln|x-1|+C$
It's not on the option.

After some rather basic algebraic manipulations, all you're left with is a pretty simple u-substantiation problem:
$$
\begin{align}
\int \frac{x^2}{x-1} \,dx
&=\int \frac{x^2-1+1}{x-1} \,dx\\
&=\int \left(\frac{x^2-1}{x-1}+\frac{1}{x-1}\right) \,dx\\
&=\int \frac{(x-1)(x+1)}{x-1}\,dx+\int\frac{1}{x-1} \,dx\\
&=\int \left(x+1\right)\,dx+\int\frac{1}{x-1}\frac{d}{dx}\left(x-1\right) \,dx\\
&=\frac{x^2}{2}+x+\int\frac{1}{x-1}\,d\left(x-1\right)\\
&=\frac{x^2}{2}+x+\ln{\left|x-1\right|}+C.\\
\end{align}
$$
