# Integral involving logarithm: $\int_0^\infty \frac{ \ln x}{(x+a)(x+b)} dx$

How to solve the following integral $$\int_{0}^{\infty} \frac{ \ln x}{(x+a)(x+b)} dx,$$ where $a,b>0$ and $a \neq b$. I was looking for some kind of substitution. However, I don't see an obvious one.

Thanks!

• Is complex analysis fair game? One can evaluate the integral via the residue theorem. – Daniel Fischer May 10 '16 at 20:57
• What contour are you using? If you use the 'keyhole' contour it looks promising, but it turns out that the interesting part of the integral cancels so you don't get anything useful. – user5713492 May 10 '16 at 21:02
• @user5713492 Standard keyhole contour. Integrate $\dfrac{(\log z)^2}{(z+a)(z+b)}$. The $(\log x)^2$ cancels, and you keep a $\log x$. – Daniel Fischer May 10 '16 at 22:18
• Cool. I wasn't looking for such a refinement. – user5713492 May 10 '16 at 22:23

If you make the substitution $\displaystyle u = \frac{ab}{x}$, the integral becomes $$-\int^{0}_{\infty} \frac{\ln \left(\frac{ab}{u} \right)}{(\frac{ab}{u}+a)(\frac{ab}{u}+b)} \frac{ab}{u^{2}} \, du = \int_{0}^{\infty} \frac{\ln(ab) - \ln(u)}{(u+a)(u+b)} \, du.$$

Therefore, $$\int_{0}^{\infty} \frac{\ln x}{(x+a)(x+b)} \, dx = \frac{\ln (ab)}{2} \int_{0}^{\infty} \frac{dx}{(x+a)(x+b)}.$$

You can then use partial fractions to complete the evaluation.

• Pretty fine and pretty clear. – Felix Marin May 11 '16 at 23:10
• i was given this Q, in the course of "complex functions" and was being asked to solve it using complex analysis. do you have any suggestion for this kind of problem? – Jneven Jun 20 '18 at 9:02
• if this integral is over the field of complex numbers and an answer must include using complex analysis. will the answer be different? – Jneven Jun 20 '18 at 10:15

Assuming $a<b$, $$\begin{eqnarray*} \int_{0}^{+\infty}\frac{\log x}{(x+a)(x+b)}\,dx &=& \frac{1}{b-a}\int_{0}^{+\infty}\left(\frac{x}{x+a}-\frac{x}{x+b}\right)\frac{\log(x)}{x}\,dx\\&=&\frac{1}{2(b-a)}\int_{0}^{+\infty}\left(\frac{b}{(x+b)^2}-\frac{a}{(x+a)^2}\right)\log^2(x)\,dx\end{eqnarray*}$$ by integration by parts. However, $$I(a) = \int_{0}^{+\infty}\frac{a \log^2(x)}{(x+a)^2}\,dx =2\zeta(2)+\log^2(a)$$ is straightforward to prove through the substitution $x=az$ and differentiation under the integral sign. It follows that:

$$\int_{0}^{+\infty}\frac{\log x}{(x+a)(x+b)}\,dx = \color{red}{\frac{\log^2(b)-\log^2(a)}{2(b-a)}}.$$

• i was given this Q, in the course of "complex functions" and was being asked to solve it using complex analysis. do you have any suggestion for this kind of problem? – Jneven Jun 20 '18 at 9:09

One way to integrate the $\log$ function is as follows: by parts let $u = \log x$ and $dv = 1$. Then:

$\int u \frac{dv}{dx} = uv - \int v\frac{du}{dx} = x\log x - \int \frac{x}{x} = x\log x - x$

Knowing this and that your integral is a product of three separate integrals you can then repeatedly apply integration by parts twice to the remaining terms.

• i was given this Q, in the course of "complex functions" and was being asked to solve it using complex analysis. do you have any suggestion for this kind of problem? – Jneven Jun 20 '18 at 9:09