$ \int \frac{1}{(x-a)(x+b)} dx $ Could you please explain how to integrate this integral:
$$   \int \frac{1}{(x-a)(x+b)} dx   $$
 A: Since the equation in the integral is a rational polynomial, we can simplify it or look for its partial fraction equivalent,
$$\frac{1}{(x-a)(x+b)} = \frac{A}{x-a} + \frac{B}{x+b}$$
Multiplying $(x-a)(x+b)$ to both sides, we get
$$1 = A(x+b) + B(x-a)$$
$$1 = Ax + Ab + Bx - Ba$$
$$1 = x(A+B) +(Ab-Ba)$$
From the following, we acquire the following linear equations, basically make them equal to the left hand side with the same degree. e.g. $Ab-Ba$ is of degree 0, there is a 1 on the other side with degree 0.
$$A+B = 0$$
$$Ab-Ba = 1$$
You can solve it via matrix, or just "normal algebra",
When you acquire A, and B, plug it in and solve for
$$\int \frac{A}{x-a} + \frac{B}{x+b} dx$$
$$=A\ln(x-a) + B\ln(x+b)$$
A: Hint:
Try to find values for $A$ and $B$ such that:
$$\frac{1}{(x-a)(x+b)}=\frac{A}{x-a}+\frac{B}{x+b}$$
When you have rewritten the fraction, it will be easier to integrate.
This process is known as partial fraction decomposition.
A: $$\int\frac1{(x-a)(x+b)}dx$$
Use partial fractions
$$\int\frac1{x(a+b)-a(a+b)}+\frac1{-x(a+b)-b(a+b)}dx$$
Integrate the sum by term
$$\int\frac1{x(a+b)-a(a+b)}dx+\int\frac1{-x(a+b)-b(a+b)}dx$$
Substitute $u=-x(a+b)-b(a+b)$ and $du=(-a-b)dx$
$$\int\frac1{x(a+b)-a(a+b)}dx +  \frac1{-a-b}\int\frac1u du$$
Since $\int\frac1u du=\log u$
$$\int\frac1{x(a+b)-a(a+b)}dx +  \frac{\log u}{-a-b}$$
Substitute $s=x(a+b)-a(a+b)$ and $ds=(a+b)dx$
$$\frac1{a+b}\int\frac1sds +  \frac{\log u}{-a-b}$$
Since $\int\frac1s ds=\log s$
$$\frac{\log s}{a+b} +  \frac{\log u}{-a-b}+C$$
Substitute back for $s$ and $u$
$$\frac{\log ((a+b)(x-a))}{a+b} +  \frac{\log (-(a+b)(b+x))}{-a-b}+C$$
This is equivalent to
$$\frac{\log(x-a)-\log(b+x)}{a+b}$$
Assuming $x-a>0$ and $b+x>0$ this is the same as
$$\frac{\log\frac{x-a}{b+x}}{a+b}$$
A: Just a quick note. 
$$f(x)=\frac{1}{(x-a)(x+b)}=\frac{A}{x-a}+\frac{B}{x+b}$$
where
$$A={\rm Res}(f,\ a)=\frac{1}{a+b}, \ B={\rm Res}(f, -b)=\frac{1}{-a-b}$$
A: Since there is linear factor in denominator, 
$$\int \frac{1}{(x-a)(x+b)} dx=\int \frac{1}{(x-a)(a+b)}+\frac{1}{(-b-a)(x+b)} dx$$
Factor out $\frac{1}{a+b}$,
$$=\frac{1}{a+b}\int \frac{1}{x-a}-\frac{1}{x+b} dx$$
The anti-derivatives of $\ln{(x+k)}$ is $\frac{1}{x+k}$
$$=\frac{1}{a+b}\bigg[\ln{(x-a)}-\ln{(x+b)}\bigg]+C$$
Simplify them will give you,
$$=\frac{1}{a+b}\ln{\frac{x-a}{x+b}}+C$$
