# Please help me for a substitution method to evaluate $\int\frac{dx}{(x+a)^2(x+b)^2}$ [closed]

Please help me evaluate: $$\int\frac{dx}{(x+a)^2(x+b)^2}$$

-

## closed as off-topic by Jonas Meyer, Claude Leibovici, Najib Idrissi, Tom-Tom, 91500May 27 '15 at 8:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Jonas Meyer, Claude Leibovici, Najib Idrissi, Tom-Tom, 91500
If this question can be reworded to fit the rules in the help center, please edit the question.

Try $y=x+a$ or $y=x+b$ - and then follow Marvis. – Mark Bennet Jul 7 '12 at 19:02

HINT: Use partial fractions. Move your mouse over the gray area below on how to obtain the partial fraction decomposition.

$$\dfrac1{(x+a)^2(x+b)^2} = \dfrac{A_1}{(x+a)} + \dfrac{A_2}{(x+a)^2} + \dfrac{B_1}{(x+b)} + \dfrac{B_2}{(x+b)^2}$$ This gives us that $$A_1(x+a)(x+b)^2 + A_2(x+b)^2 + B_1(x+b)(x+a)^2 + B_2(x+a)^2 = 1$$ Set $x=-a$ to get $A_2 = \dfrac1{(b-a)^2}$. Set $x=-b$ to get $B_2 = \dfrac1{(a-b)^2}$. Differentiate the above to get $$A_1(x+b)^2 + 2A_1(x+a)(x+b) + 2A_2(x+b) + B_1(x+a)^2 + 2B_1(x+b)(x+a) + 2B_2(x+a) = 0$$ Now set $x=-a$, to get $A_1 = \dfrac{2A_2}{a-b}$. Set $x=-b$, to get $B_1 = \dfrac{2B_2}{b-a}$. Hence, we now have that $$\dfrac1{(x+a)^2(x+b)^2} = \dfrac2{(a-b)^3}\dfrac1{(x+a)} + \dfrac1{(b-a)^2}\dfrac1{(x+a)^2} + \dfrac2{(b-a)^3}\dfrac1{(x+b)} + \dfrac1{(a-b)^2}\dfrac1{(x+b)^2}$$

-

$$\int\frac{dx}{(x+a)^2(x+b)^2}$$

Since $$1\equiv\left[\frac{(x+a)-(x+b)}{a-b}\right]^2,$$ hence it follows that:

\begin{align*} \frac{1}{(x+a)^2(x+b)^2}&=\left[\frac{1}{(x+a)(x+b)}\right]^2\\ &=\left[\frac{\frac{(x+a)-(x+b)}{a-b}}{(x+a)(x+b)}\right]^2\\ &\left[\frac{(x+a)-(x+b)}{(a-b)(x+a)(x+b)}\right]^2\\ &=\frac{(x+a)^2-2(x+a)(x+b)+(x+b)^2}{(a-b)^2(x+a)^2(x+b)^2}\\ &=\frac{1}{(a-b)^2}\left[\frac{1}{(x+b)^2}-\frac{2}{(x+a)(x+b)}+\frac{1}{(x+a)^2}\right]\\ &=\frac{1}{(a-b)^2}\left[\frac{1}{(x+b)^2}-\frac{2}{(a-b)}(\frac{1}{x+b}-\frac{1}{x+a})+\frac{1}{(x+a)^2}\right]\\ &=\frac{1}{(a-b)^2}\left[\frac{(x+a)^2-2(x+a)(x+b)+(x+b)^2}{(x+a)^2(x+b)^2}\right]\\ &=\frac{1}{(a-b)^2}\left[\frac{(x+a)^2}{(x+a)^2(x+b)^2}-\frac{2(x+a)(x+b)}{(x+a)^2(x+b)^2}+\frac{(x+b)^2}{(x+a)^2(x+b)^2}\right]\\ \frac{1}{(x+a)^2(x+b)^2}&=\frac{1}{(a-b)^2}\left[\frac{(x+a)^2}{(x+a)^2(x+b)^2}-\frac{2(x+a)(x+b)}{(x+a)^2(x+b)^2}+\frac{(x+b)^2}{(x+a)^2(x+b)^2}\right]. \end{align*}

Now integrate last relation: \begin{align*} \int\frac{dx}{(x+a)^2(x+b)^2}&=\frac{1}{(a-b)^2}\int\left[\frac{(x+a)^2}{(x+a)^2(x+b)^2}-\frac{2(x+a)(x+b)}{(x+a)^2(x+b)^2}+\frac{(x+b)^2}{(x+a)^2(x+b)^2}\right]dx\\ &=\frac{1}{(a-b)^2}\int\left[\frac{1}{(x+b)^2}-\frac{2}{a-b}(\frac{1}{x+b}-\frac{1}{x+a})+\frac{1}{(x+b)^2}\right]dx\\ &=\frac{1}{(a-b)^2}\left[\int\frac{dx}{(x+b)^2}-\frac{2}{a-b}\left(\int\frac{dx}{x+b}-\int\frac{dx}{x+a}\right)-\int\frac{dx}{(x+a)^2}\right]\\ &=\frac{1}{(a-b)^2}\left[-\frac{1}{x+b}-\frac{2}{a-b}\ln\left|\frac{x+b}{x+a}\right|-\frac{1}{x+a}\right]\\ &=-\frac{1}{(a-b)^2}\left[\frac{2x+a+b}{(x+a)(x+b)}+\frac{2}{a-b}\ln\left|\frac{x+b}{x+a}\right|\right]. \end{align*}

Hence: $$\int\frac{dx}{(x+a)^2(x+b)^2}=-\frac{1}{(a-b)^2}\left[\frac{2x+a+b}{(x+a)(x+b)}+\frac{2}{a-b}\ln\left|\frac{x+b}{x+a}\right|\right]+C.$$

-

$$\frac{1}{(x + a)^2(x + b)^2} = \left(\frac{1}{\left(x + \frac{a + b}{2}\right)^2 - \left(\frac{a - b}{2}\right)^2}\right)^2$$ Let $y = x + \frac{a + b}{2}$ and $c = \frac{a - b}{2}$, therefore the integral looks like $$\int \frac{1}{(y^2 - c^2)^2}dy$$ Put $y = c\sin(\theta)$, therefore, $$\int \frac{c\cos(\theta)}{c^4\cos^4(\theta)}d\theta = \frac{1}{c^3}\int \sec^3(\theta) d\theta = \frac{1}{2c^3}\left(\sec(\theta)\tan(\theta) + \ln|\sec(\theta) + \tan(\theta)|\right) + C$$ Now, $\sec(\theta) = \frac{1}{\sqrt{1 - \sin^2(\theta)}} = \frac{c}{\sqrt{c^2 - y^2}}$ and $\tan(\theta) = \frac{sin(\theta)}{\sqrt{1 - \sin^2(\theta)}} = \frac{y}{\sqrt{c^2 - y^2}}$, therefore, $$\ln|\sec(\theta) + \tan(\theta)| = \frac{1}{2}\ln\left|\frac{c + y}{c - y}\right| = \frac{1}{2}\ln\left|\frac{x + a}{x + b}\right|$$ Similarly, you can compute the other term as well and get the final expression in terms of $x,a$ and $b$.

-
Does to a fair degree accomplish the aim of the title ("a substitution method"). Unless we are prepared to go to the complex numbers, there is a problem if $|y|\lt |c|$, because $|\sec\theta| \ge 1$ for all $\theta$. – André Nicolas Jul 7 '12 at 21:36
@AndréNicolas True. This problem is immediate once you see the substitution $y = c\sin(\theta)$. This substitution always comes with a caveat that $|y/c| \leq 1$. Also, one can notice that $\int 1/(y \sqrt{(c^2 + y^2)})dy = -(1/c)acosech(y/c) + C$, this gives an alternative to solve the intermediate integral. So, one has at least a couple of options to solve the intermediate integral (just have to be careful with the gotcha's like the one you pointed out). – TenaliRaman Jul 7 '12 at 22:06