## Mathematica v9.0.1 states that this integral does not converge.

The problem is to evaluate the following integral:

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

This one turned out to be messy but straightforward. What did surprise is the way in which I would need to employ the residue theorem. Clearly, the integral is more amenable to real methods than a contour integration. What happens, though, is that the real methods produce a few sums, and we will find that we may evaluate a pair of those sums by invoking the residue theorem.

I should note before we begin, however, that Mathematica is not only unable to evaluate this integral, but it incorrectly states that this integral fails to converge. The convergence of the integral is easily established by comparison with the integral of $1/x^4$ at $\infty$, for example, while there are no real poles on the positive real line. In response, I sent the following email to Wolfram Research technical support:

On: 03/04/2014 06:09am rlgordonma@gmail.com submitted the following Case:
Name: Ron Gordon
email: [email withheld]
Account:
The following integral

Integrate[Log[1 + x]/((1 + x^2) (1 + x^3)), {x, 0, Infinity}]

Returns

Integrate::idiv: Integral of Log[1+x]/(1+x^2+x^3+x^5) does not converge on {0,\[Infinity]}. >>

A quick inspection, however, indicates that the integral does converge. In fact, it has a nifty analytical result, as derived here:

http://math.stackexchange.com/questions/698062/need-help-with-int-0-infty-frac-log1x-left1x2-right-left1x3-ri/698334#698334

In response:

Hello Ron Gordon,

A suggestion has been filed with our development team to implement the solution you recommended.

Sincerely,

[name withheld]
Technical Support
Wolfram Research, Inc.
http://support.wolfram.com

Without further ado, here is that solution. One wonders how they will implement it, or if I will see a royalty. (Of course not, I published it on math.SE already!)

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$$

I like this result. It’s not pretty, but anything with a fraction like $37/864$ is far from obvious.

• user91500 wrote:

Sometimes Mathematica says this such of integrals doesn’t converge, but if you write it of the following form(but not in Latex form!!!)

Limit[\int_0^n\frac{Log[1+x]}{(1+x^2)(1+x^3)},n\to\infty]

Then you can see that Mathematica can find it’s value!

• rlgordonma@yahoo.com wrote:

@user91500: sure, but as Mathematica is a rather expensive piece of commercial software, it should work as advertised. Nobody should have to guess what bandaid will make Mathematica put out the right answer – I should be able to say Integrate[f[x],{x,0,Infinity}] and it should put out the right answer; at the very least, it should know that it converges! So, while I’m glad you were able to find some manipulation to get a matching answer, your reply is hardly a valid defense of Mathematica.

• user91500 wrote:

You are pretty right. I wrote previous comment since when I had Mathematica 8, It was very strange for me that Mathematica answer for famous integral, indeed I think following integral
Integrate[xe^{-x}sin[x],{x,0,Infinity}]
also was “it’s doesn’t converge”!!!

• Daniel R wrote:

0.30752438842250124 – 9.25185853854297*^-17 I