<s>[INST] integrating $\int \frac{dt}{(t+2)^2(t+1)}$ I'm practicing to solve a whole, and I am not able to solve this one, could you help me? $$\int \frac{dt}{(t+2)^2(t+1)}$$I tried $$\frac{1}{(t+2)^2(t+1)}=\frac{A}{(t+2)^2}+\frac{B}{(t+2)}+\frac{C}{(t+1)}\\1=A(t+1)+B(t+2)(t+1)+C(t+2)^2\\t=-2\Longrightarrow 1=-A\Longrightarrow \fbox{$A=-1$}\\t=-1\Longrightarrow1=C(-1)^2\Longrightarrow\fbox{$C=1$}$$Making $t = 0$ and substituting $A$ and $C$ we have $$1=A+2B+4C=-1+2B+4=2B+3\\\fbox{$B=-1$}$$THEN$$\int \frac{dt}{(t+2)^2(t+1)}=\int -\frac{1}{(t+2)^2}-\frac{1}{(t+2)}+\frac{1}{(t+1)}\;dt\\=-\int \frac{1}{(t+2)^2}-\int\frac{1}{(t+2)}+\int\frac{1}{(t+1)}\;dt=-\int u^{-2\;}du-\ln|t+2|+\ln|t+1|\\=-\frac{u^{-1}}{-1}-\ln|t+2|+\ln|t+1|=\\\fbox{$\frac{1}{t+2}-\ln|t+2|+\ln|t+1|+c$}$$Only I could not do the derivative to "take the test", can you help me? Or contains an error in my resolution?
 [/INST] Differentiating $$\frac{1}{t+2} - \ln |t + 2| + \ln|t+1| + c$$ gives you $$-\frac{1}{(t+2)^2} - \frac{1}{t + 2} + \frac{1}{t+1}$$ which is certainly what you got when you split the fraction initially. To check that your A, B and C were correct, see that this is just $$\frac{-(t + 1) - (t + 2)(t+1) + (t+2)^2}{(t+2)^2(t+1)}.$$ Simplifying, we get $$-(t+1)-(t+2)(t+1)+(t+2)^2 = -(t+1) - (t^2 + 3t + 2) + (t^2 + 4t +4) = 1,$$ as required.
</s>