<s>[INST] Evaluate: $\int \frac{1}{(x+a)(x+b)}$ Evaluate:
$$\int \frac{1}{(x+a)(x+b)}$$
My attempt:
$$\int \frac{1}{(x+a)(x+b)} = \frac{A}{x+a} + \frac{B}{x+b}$$
$$1 = A(x+b) + B(x+a)$$
$$x = -b$$
$$1 = A(-b + b) + B(-b + a)$$
$$1 = B(-b + a)$$
$$x = -a$$
$$1 = A(-a + b) + B(-a + a)$$
$$1 = A(-a + b)$$
At this point I have no idea how to proceed. Can someone help me with this? Please.
 [/INST] starting from $1=A(x+b)+B(x+a)=(A+B)x+(Ab+Ba)$, you should get
$$
A+B=0, \quad Ab+Ba=1
$$
and then the solution is
$$
A=1/(b-a),\quad B=1/(a-b)
$$
which means
$$
\frac{1}{(x+a)(x+b)}=\frac{1}{b-a}\left(\frac{1}{x+a}-\frac{1}{x+b}\right)
$$
</s>