# 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.

You've bagged it. You have $${1\over (x-a)(x-b)} = {1\over b -a}\left({1\over x + a} - {1\over x + b }\right).$$ Integrate to obtain $$\int{dx\over (x-a)(x-b)} = {1\over b -a}(\ln|x + a| - \ln|x + b|) + C$$ Don't become afraid of all of the constants running around.

• Thank you so much. Also that can be also written as this right? $\frac{ln|x+a|}{b-a} + \frac{ln|x+b|}{a-b} + C$ – Sc4r Dec 16 '13 at 3:01

First, it is easy to see there are two cases,(the problem has implied that $x\neq -a,\,-b$)

Case 1, if $a=b$, then the integration is $\int \frac{1}{(x+a)^2}=-\frac{1}{x+a}$.

Case 2, if $a\neq b$, then $\int \frac{1}{(x+a)(x+b)}=\int \frac{1}{b-a}\left(\frac{1}{x+a}-\frac{1}{x+b}\right)=\frac{1}{b-a}\left(\int \frac{1}{x+a}-\int \frac{1}{x+b}\right)=\frac{1}{b-a}\ln \left|\frac{x+a}{x+b}\right|+C$.

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)$$

$$\displaystyle {1\over (x+a)(x+b)}={1\over (b-a)}\left[{1\over x+a}-{1\over x+b}\right]$$