Find $$\int \frac{x^2(x-2)}{(x-1)^2} dx .$$
My attempt: $$\int \frac{x^2(x-2)}{(x-1)^2}dx = \int \frac{x^3-2x^2}{x^2-2x+1}dx $$
By applying polynomial division, it follows that $$\frac{x^3-2x^2}{x^2-2x+1} = x + \frac{-x}{x^2-2x+1}$$
Hence $$\int \frac{x^3-2x^2}{x^2-2x+1}dx = \int \left(x + \frac{-x}{x^2-2x+1}\right) dx =\int x \,dx + \int \frac{-x}{x^2-2x+1} dx \\ = \frac{x^2}{2} + C + \int \frac{-x}{x^2-2x+1} dx $$ Now using substitution $u:= x^2-2x+1$ and $du = (2x-2)\,dx $ we get $dx= \frac{du}{2x+2}$.
Substituting dx in the integral:
$$\frac{x^2}{2} + C + \int \frac{-x}{u} \frac{1}{2x-2} du =\frac{x^2}{2} + C + \int \frac{-x}{u(2x-2)} du $$
I am stuck here. I do not see how using substitution has, or could have helped solve the problem. I am aware that there are other techniques for solving an integral, but I have been only taught substitution and would like to solve the problem accordingly.
Thanks
Your last integral, $\int \frac{-x}{u(2x-2)} du$, doesn't make me happy.
You have both $x$ and $u$ in the integral. The point of the substitution is to get rid of the $x$'s and leave the integral in terms of $u$.
I'll take it from the last integral in terms of $x$, everything looks fine before and it goes astray after that.
$\int \frac{-x}{x^2-2x+1} dx = \int \frac{-x}{(x-1)^2} dx$. Let $u=x-1$ therefore $du=dx$ and $-x=-1-u$, then $\int \frac{-x}{(x-1)^2} dx=\int \frac{-1-u}{u^2} du=\int \frac{-1}{u^2} du -\int \frac{1}{u} du= \frac{1}{u}-\ln u=\frac{1}{x-1} - \ln {(x-1)}$.