<s>[INST] how to partial fraction $\frac{1}{(x+1)^2}$ I need to integrate $\frac{1}{(x^2+2x+1)}$, so I need to use partial fraction as the polynomial can be factored as $\frac{1}{(x+1)^2}$. This is what I've tried:
$$\frac{A}{(x+1)} + \frac{B}{(x+1)^2}$$
$$A\cdot(x+1)^2 + B\cdot(x+1)$$
$$Ax^2+2Ax+A+Bx+B$$
$$Ax^2+(2A+B)x+(A+B)$$
So,
$$A=0$$
$$2A+B=0$$
$$A+B=1$$
but that does not make sense, because if $A=0$, then $2A+B$ can't be zero, could you please tell me what's the problem?
 [/INST] You can integred it directly without partial fraction as $$\int { \frac { dx }{ { \left( x+1 \right)  }^{ 2 } } =\int { \frac { d\left( x+1 \right)  }{ { \left( x+1 \right)  }^{ 2 } }  } =-\frac { 1 }{ x+1 } +C } $$
</s>