How to take the integral? $\int \frac{x^2-3x+2}{x^2+2x+1}dx$ $$\int \frac{x^2-3x+2}{x^2+2x+1}dx$$
So after all I had
$$ \frac{-5x+1}{(x+1)^2} = \frac{A}{(x+1)} + \frac{B}{(x+1)^2}$$
and of course $$ \int xdx $$
but it is easy to solve, I do not know how to act with devided things, probably solve the system, or is there easier way to find A and B?
After all steps I finally got:
$$-5x + 1 = Ax + A + B$$

HINT:
For $$\dfrac{x^2-3x+2}{(x+1)^2}$$  set $x+1=y\iff x=y-1$
