Need help with $\int_0^\infty\frac{\log(1+x)}{\left(1+x^2\right)\,\left(1+x^3\right)}dx$

I need you help with this integral: $$\int_0^\infty\frac{\log(1+x)}{\left(1+x^2\right)\,\left(1+x^3\right)}dx.$$ Mathematica says it does not converge, which is apparently false.


Huge pain in the rump, but in the end, fairly straightforward. First observe that

$$\begin{align}\int_0^{\infty} dx \frac{\log{(1+x)}}{(1+x^2)(1+x^3)} &= \int_0^{1} dx \frac{\log{(1+x)}}{(1+x^2)(1+x^3)} + \int_1^{\infty} dx \frac{\log{(1+x)}}{(1+x^2)(1+x^3)}\\ &= \int_0^{1} dx \frac{\log{(1+x)}}{(1+x^2)(1+x^3)} + \int_0^{1} dx \, x^3 \frac{\log{(1+x)}-\log{x}}{(1+x^2)(1+x^3)}\\ &= \int_0^1 dx \frac{\log{(1+x)}}{1+x^2} - \int_0^1 dx \frac{x^3 \log{x}}{(1+x^2)(1+x^3)}\end{align} $$

The first integral may be evaluated by subbing $x=\tan{t}$:

$$\begin{align} \int_0^1 dx \frac{\log{(1+x)}}{1+x^2} &= \int_0^{\pi/4} dt \, \log{(1+\tan{t})}\\ &= \int_0^{\pi/4} dt \, \log{(\sin{t}+\cos{t})} - \int_0^{\pi/4} dt \, \log{(\cos{t})}\\ &= \int_0^{\pi/4} dt \, \log{(\sqrt{2} \cos{(t-\pi/4)})} - \int_0^{\pi/4} dt \, \log{(\cos{t})}\\ &= \frac{\pi}{8} \log{2} + \int_0^{\pi/4} dt \, \log{(\cos{(t-\pi/4)})} - \int_0^{\pi/4} dt \, \log{(\cos{t})}\\ &= \frac{\pi}{8} \log{2}\end{align}$$

The second integral is messy but still doable. First, we may use partial fractions. Then we will get a series of zeta-like sums. Some of them we will immediately recognize. To the rest, we may apply the residue theorem.

$$\begin{align}\int_0^1 dx \frac{x^3 \log{x}}{(1+x^2)(1+x^3)} &= \frac12 \int_0^1 dx \left [\frac{1-x}{1+x^2} - \frac{1-x-x^2}{1+x^3} \right ] \log{x}\\ &= \frac12 \sum_{k=0}^{\infty} (-1)^k \int_0^1 dx \left (x^{2 k}-x^{2 k+1}-x^{3 k}+x^{3 k+1}+x^{3 k+2} \right ) \log{x}\\ &= -\frac12 \sum_{k=0}^{\infty} (-1)^k \left [ \frac1{(2 k+1)^2} - \frac1{(2 k+2)^2} - \frac1{(3 k+1)^2}\\ + \frac1{(3 k+2)^2}+\frac1{(3 k+3)^2}\right ] \\ &= \frac{5}{72} \frac{\pi^2}{12} - \frac12 G + \frac12 \sum_{k=0}^{\infty} (-1)^k \left [\frac1{(3 k+1)^2} - \frac1{(3 k+2)^2}\right ] \end{align} $$

where $G$ is Catalan's constant. As for the sum:

$$\begin{align} \frac12 \sum_{k=0}^{\infty} (-1)^k \left [\frac1{(3 k+1)^2} - \frac1{(3 k+2)^2}\right ] &= \frac14 \sum_{k=-\infty}^{\infty} (-1)^k \left [\frac1{(3 k+1)^2} - \frac1{(3 k+2)^2}\right ] \\ &= -\frac{\pi}{4} \frac1{3^2} \left [\operatorname*{Res}_{z=-1/3} \frac{\csc{\pi z}}{(z+1/3)^2} \\- \operatorname*{Res}_{z=-2/3} \frac{\csc{\pi z}}{(z+2/3)^2} \right ]\\ &= \frac{\pi^2}{36} \left [\frac{\cos{\pi/3}}{\sin^2{\pi/3}} - \frac{\cos{2 \pi/3}}{\sin^2{2 \pi/3}} \right ]\\ &= \frac{\pi^2}{27}\end{align} $$

Therefore

$$\int_0^1 dx \frac{x^3 \log{x}}{(1+x^2)(1+x^3)} = \frac{5 \pi^2}{864} - \frac12 G + \frac{\pi^2}{27} = \frac{37 \pi^2}{864} - \frac{G}{2}$$

and finally...

$$\int_0^{\infty} dx \frac{\log{(1+x)}}{(1+x^2)(1+x^3)} = \frac{G}{2} + \frac{\pi}{8} \log{2} - \frac{37 \pi^2}{864} \approx 0.307524\cdots$$


We can use the parametric integral to evaluate the integral. Let $$ I(\alpha)=\int_0^\infty\frac{\ln(1+\alpha x)}{(1+x^2)(1+x^3)}dx. $$ Then it is easy to see \begin{eqnarray*} I'(\alpha)&=&\int_0^\infty\frac{x}{(1+\alpha x)(1+x^2)(1+x^3)}dx\\ &=&\pi\frac{(9+8\sqrt{3})\alpha^2+(8\sqrt{3}-9)}{(\alpha^2+1)(\alpha^2+\alpha+1)}-\frac{\alpha^3\ln\alpha}{(1+\alpha^2)(1-\alpha^3)} \end{eqnarray*} and hence \begin{eqnarray*} I(1)&=&\int_0^1I'(\alpha)d\alpha\\ &=&\pi\int_0^1\frac{(9+8\sqrt{3})\alpha^2+(8\sqrt{3}-9)}{(\alpha^2+1)(\alpha^2+\alpha+1)}d\alpha+\int_0^1\frac{\alpha^3\ln\alpha}{(1+\alpha^2)(1-\alpha^3)}d\alpha\\ &=&I_1+I_2. \end{eqnarray*} It is not hard to get $$ I_1=\frac{\pi(5\pi+54\ln 2)}{432}. $$ Note \begin{eqnarray*} \frac{\alpha^3}{(1+\alpha^2)(1-\alpha^3)} &=&-\frac{1}{2}\frac{1+\alpha}{1+\alpha^2}+\frac12\frac{1+\alpha-\alpha^2}{1-\alpha^3} \end{eqnarray*} and hence \begin{eqnarray*} I_2&=&\int_0^1\frac{\alpha^3\ln\alpha}{(1-\alpha)(\alpha^2+1)(\alpha^2+\alpha+1)}d\alpha\\ &=&-\frac{1}{2}\int_0^1\frac{(1+\alpha)\ln\alpha}{1+\alpha^2}d\alpha+\frac{1}{2}\int_0^1\frac{(1+\alpha-\alpha^2)\ln\alpha}{1-\alpha^3}d\alpha \end{eqnarray*} But \begin{eqnarray*} \int_0^1\frac{(1+\alpha)\ln\alpha}{1+\alpha^2}d\alpha&=&\int_0^1\frac{\ln\alpha}{1+\alpha^2}d\alpha+\int_0^1\frac{\alpha\ln\alpha}{1+\alpha^2}d\alpha\\ &=&\sum_{n=0}^\infty\int_0^1(-\alpha^2)^n\ln\alpha d\alpha+\sum_{n=0}^\infty\int_0^1\alpha(-\alpha^2)^n\ln\alpha d\alpha\\ &=&-\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^2}-\sum_{n=0}^\infty\frac{(-1)^n}{4(n+1)^2}=-G-\frac{\pi^2}{48}\\ \int_0^1\frac{(1+\alpha-\alpha^2)\ln\alpha}{1-\alpha^3}d\alpha &=&\int_0^1\frac{\ln\alpha}{1-\alpha^3}d\alpha+\int_0^1\frac{\alpha\ln\alpha}{1-\alpha^3}d\alpha-\int_0^1\frac{\alpha^2\ln\alpha}{1-\alpha^3}d\alpha\\ &=&\sum_{n=0}^\infty\int_0^\infty\alpha^{3n}\ln\alpha d\alpha+\sum_{n=0}^\infty\int_0^\infty\alpha^{3n+1}\ln\alpha d\alpha-\sum_{n=0}^\infty\int_0^\infty\alpha^{3n+2}\ln\alpha d\alpha\\ &=&-\sum_{n=0}^\infty\frac{1}{(3n+1)^2}-\sum_{n=0}^\infty\frac{1}{(3n+2)^2}+\frac{1}{9}\sum_{n=0}^\infty\frac{1}{(n+1)^2}\\ &=&-\sum_{n=0}^\infty\frac{1}{(3n+1)^2}-\sum_{n=0}^\infty\frac{1}{(3n+2)^2}-\frac{1}{9}\sum_{n=0}^\infty\frac{1}{(n+1)^2}+\frac{2}{9}\sum_{n=0}^\infty\frac{1}{(n+1)^2}\\ &=&-\frac{7\pi^2}{54}. \end{eqnarray*} Putting everything together, we have $$ I(1)=\frac{G}{2}-\frac{37\pi}{864}+\frac{1}{8}\pi\ln 2. $$