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!


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.


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


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.