# Evaluate the following integral?

Evaluate the following integral.

$\int\frac1{(x+a)(x+b)}~dx$

${a}\neq{b}$

I do not know where to being solving this integral.

#### Solutions Collecting From Web of "Evaluate the following integral?"

Hint

$$\frac{1}{(x+a)(x+b)}=\frac1{b-a}\left(\frac{1}{x+a}-\frac{1}{x+b}\right)$$

The first thing is to simplify the integrand to: $$\int \frac {b + x}{a + x} dx$$
Now, we have to rewrite the numerator as $b + x = a + x + (-a + b)$: $$\int \frac {b + x}{a + x} dx = \int \left(\frac {-a + b}{a + x} + 1 \right) dx$$ Then, we have to integrate term by term to get: $$\int 1 dx + \int \left(\frac {-a + b}{a + x} \right) dx$$ After that, we have to apply the constant rule when dealing with integrals for $c = 1$: $$\int 1 dx + \int \left(\frac {-a + b}{a + x} \right) dx = \color {RED}{x} + \int \left(\frac {-a + b}{a + x} \right) dx$$ Next, we apply the constant multiple rule: $$\int cf(x) dx = c \int f(x) dx$$ for $c = -a + b$ and $f(x) = \frac {1}{a + x}$: $$x + \int \left(\frac {-a + b}{a + x} \right) dx = x + \color {RED}{\left((-a + b) \int \frac {1}{a + x} dx \right)}$$ Now, let’s let $u = a + x$. Then, $du = (a + x)’ = dx$ and $dx = du$. The integral turns into $$x + (-a + b) \color {RED}{\int \frac 1u du}$$ Then, we use the rule: $$\int \frac 1u du = \ln |u|$$ And we get: $$x + (- a + b) \ln |u|$$ We’ll substitute $a + x$ for $u$: $$x + (-a + b) \ln |\color {RED}{a + x}|$$ When we simplify, we get: $$x – (a – b) \ln |a + x|$$ Let’s not forget about the constant of integration: $$x – (a – b) \ln |a + x| + C$$
So, our final answer is: $$\int \frac {b + x}{a + x} dx = x – (a – b) \ln |a + x| + C$$