<s>[INST] Divide $(x+1)^2$ by $x-1$ without using longdivision. Dividing a polynomial of degree $n$ with a polynomial of degree $n-1$ gives a polynomial of degree $1$. So,
$$\frac{(x+1)^2}{x-1}=ax+b\Leftrightarrow x^2+2x+1=ax^2+(b-a)x-b$$
Gives $a=1, \quad a-b=2, \quad -b=1$. So $a=1$ and $b=-1.$ The result I get is that $$\frac{(x+1)^2}{x-1}=x-1.$$ Which is far from the correct answer. I can't spot my mistake. I feel that the more I sit and study, the worse at math I become.
 [/INST] Write $(x+1)^2 = (x-1)(ax+b)+c$ and plug in $x=1$, you get $4=0+c$ so $c=4$. Now 
$$ (x+1)^2-4 = x^2+2x-3 = (x-1)(x+3)$$ so $a= 1$ and $b=3$. 
</s>