Today @integralsbot at twitter posted an interesting integral relation for complicated integral that gives $\pi$ as a result. I don't know how this bot works or where does it take the relation it posts from, but some of the problems are really difficult to prove and interesting. Such as this example.

$$\int_{0}^{\infty} \frac{\left(\frac{\pi x}{2}-\log (x)\right)^3}{\left(x^2+1\right)^2 \left(\log^2(x)+\frac{\pi ^2}{4}\right)} = \pi \tag{1}\label{eq1}$$

I've tried to calculate this and it appears to be very difficult (for starters wolfram alpha can't calculate it). The plot of the function under the integral doesn't look very extraordinarily:


Using partial fraction decomposition the integral can be transformed to the following form:

$$\int_{0}^{\infty} \left( \frac{3 \pi x}{2 \left(x^2+1\right)^2}-\frac{\log (x)}{\left(x^2+1\right)^2}+\frac{\pi^3 x^3-6 \pi ^2 x^2 \log (x)-3 \pi ^3 x+2 \pi ^2 \log (x)}{2 \left(x^2+1\right)^2 \left(4\log ^2(x)+\pi ^2\right)} \right)$$

The first two terms of the integral can be more $$ \int_{0}^{\infty} \frac{3 \pi x}{2 \left(x^2+1\right)^2} = \frac{3 \pi}{4} $$ or less easily solved $$ \int_{0}^{\infty} -\frac{\log (x)}{\left(x^2+1\right)^2} = \frac{\pi}{4} $$ to yield: $$ \int_{0}^{\infty} \left( \frac{3 \pi x}{2 \left(x^2+1\right)^2} - \frac{\log (x)}{\left(x^2+1\right)^2} \right) = \pi \tag{2}\label{eq2} .$$

This is interesting by itself, since plot of the integrated function has interesting shape with two inflection points of the first derivative, which I wouldn't expect to be equal to $\pi$ (of course the algebra clearly shows that it is)


What's however even more interesting is that, if I'm not mistaken, it follows from \eqref{eq1} and \eqref{eq2} that

$$ \int_{0}^{\infty} \frac{\pi^3 x^3-6 \pi ^2 x^2 \log (x)-3 \pi ^3 x+2 \pi ^2 \log (x)}{2 \left(x^2+1\right)^2 \left(4\log ^2(x)+\pi ^2\right)} = 0 \tag{3}\label{eq3}.$$

This seems to be correct when checked with numerical integration (I've checked in relatively high precision of ~100 decimal digits) but seem to be very hard to prove. Plot of the function under the integral \eqref{eq3} doesn't appear (to me) to suggest any trivial solution: zero_integral_function_plot

The most obvious way to transform integral \eqref{eq3} is to expand the numerator which gives:

$$ \int_{0}^{\infty} \left( -\frac{3 \pi ^2 x^2 \log (x)}{\left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}-\frac{3 \pi ^3 x}{2 \left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}+\frac{\pi ^2 \log (x)}{\left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}+\frac{\pi ^3 x^3}{2 \left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)} \right), $$

but the resulting integrals are also very difficult, perhaps too difficult to directly attack the problem in this way (I've tried to solve the second one, since it seems to have the simplest numerator, but didn't managed to get any results yet) and neither their numerical values (-1.93789..., 3.229820..., -0.322982..., -0.968946...) nor the plots indicate any obvious cancellations. Maybe there is some indirect way? Perhaps the integral \eqref{eq3} can be shown to be equal to $0$ without directly solving the integral at all?

As I mentioned in the beginning of this post, I don't know where does this \eqref{eq1} relation come from but it seems to be true and interesting and must've been found somehow. Therefore I believe some solution of this problem exists. I post it as an interesting challenge/puzzle. Maybe someone knows some of the relations, can solve some of the unsolved integrals, sees clever substitution or can provide any interesting insight into this problem. So, to finally pose the question.

How to prove/solve either \eqref{eq1} or \eqref{eq3}?

  • 1
    $\begingroup$ I scrolled down on the twitter profile you linked and it seems like the majority of the integrals are from this site (perhaps with small modifications). Which is not a problem, but (re)posting them might create many duplicates. $\endgroup$
    – Zacky
    May 18, 2021 at 23:18
  • $\begingroup$ @Zacky I've tried to search following similar topics that where shown when I was asking this question and I checked first few pages of results from approach0 but the thread you linked didn't come up in search. Sorry. $\endgroup$
    – tpk
    May 19, 2021 at 11:59
  • $\begingroup$ I also wonder how does this work. If it's truly a bot it is indeed transforming the original questions quite cleverly. I'll look into that, thank you for the observation. $\endgroup$
    – tpk
    May 19, 2021 at 12:00
  • $\begingroup$ If it's a fully automated bot, it would have to have a way to check whether the asked question is true, know which equation from question to copy, and transform the original question to similar form (constants elimination in this case?). I suppose that's hardly the case. More likely it's some person that finds the formulas and checks them and bot only posts them on twitter account. $\endgroup$
    – tpk
    May 19, 2021 at 12:08
  • $\begingroup$ The question is reopened. It is nice because, between your work and mine, the solution has been obtained in a very simple manner. $\endgroup$ May 19, 2021 at 13:38

1 Answer 1


Let $$f(x)= \frac{\pi^3 x^3-6 \pi ^2 x^2 \log (x)-3 \pi ^3 x+2 \pi ^2 \log (x)}{2 \left(x^2+1\right)^2 \left(4\log ^2(x)+\pi ^2\right)} $$ that is to say $$f(x)=\frac{\pi ^2 \left(\pi x \left(x^2-3\right)-2\left(3x^2-1\right) \log (x)\right)}{2 \left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}$$ and write $$I=\int_0^\infty f(x)\,dx=\int_0^1 f(x)\,dx+\int_1^\infty f(x)\,dx$$ For the second integral, let $x=\frac 1 x$. So, now we have $$I=\int_0^1 f(x) \,dx-\int_0^1 g(x) \,dx=\int_0^1 [f(x)- g(x)] \,dx$$ with $$g(x)=\frac{\pi ^2 \left(\pi \left(3 x^2-1\right)+2 x \left(x^2-3\right) \log (x)\right)}{2 x \left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}$$ $$f(x)-g(x)=\frac{\pi ^2 \left(\pi \left(x^4-6 x^2+1\right)-8 x \left(x^2-1\right) \log (x)\right)}{2 x \left(x^2+1\right)^2 \left(4 \log ^2(x)+\pi ^2\right)}$$ and, numerically, $$\int_0^1 [f(x)- g(x)] \,dx=0$$ which still needs to be proved.

In fact, what happens if that $$\int_0^a [f(x)- g(x)] \,dx=-\int_a^1 [f(x)- g(x)] \,dx$$ where $a$ is the solution of $$\pi \left(x^4-6 x^2+1\right)-8 x \left(x^2-1\right) \log (x)=0$$ $$a=0.1928617994587428536765548799193482174970163765555\cdots$$ which is not recognized by inverse symbolic calculators.

  • $\begingroup$ Thank you. Didn't manage to clearly see where $I = 0$ comes from yet, but indeed, after splitting $I$ into the two parts at x=1, the two parts cancel each other (I checked that numerically). Why is the x=1 special in that regard? Is it because it's in the $(1+x^2)^2$ in the denominator of $f(x)$? I'm trying to check that with direct computation and analysing the last log integral to be able to do so. Thanks for all your help! $\endgroup$
    – tpk
    May 19, 2021 at 11:53
  • 1
    $\begingroup$ @tpk. It had to be something like that (which is quite common with logarithms). After $x\to \frac 1y$, you have the same expression with a minus sign. If anything is not clear, just tell ! Cheers :-) $\endgroup$ May 19, 2021 at 12:00
  • 2
    $\begingroup$ Claude, Quite an intriguing integral indeed. I had no problem with the first ibtegrals but failed to show that the third one is nil, even after perfotming the change you ate suggesting. More details on your calculation will be appreciated. fjaclot; $\endgroup$
    – fjaclot
    May 19, 2021 at 19:15
  • 1
    $\begingroup$ then using logarithm properties and the fact, that $y\ge 0$ and canceling $y$'s we get $$ I_2=\int_0^1 \frac{\pi^3-3 \pi ^3 y^2+6 \pi ^2 y \log (y)-2 \pi ^2 y^3 \log (y)}{2 y \left(1+y^2\right)^2 \left(\pi ^2+4 \log ^2(y)\right)} $$ to me it still isn't clear why would $$ I = I_1 + I_2 = \int_0^1 f(x) + I_2 = 0 $$ maybe there's some trick with substitution and/or integration by parts to cleverly shift $y$ from denominator to numerator and then equality/canceling of the integrals would be clear, but I'm unable to see one. $\endgroup$
    – tpk
    May 20, 2021 at 15:24
  • 1
    $\begingroup$ @tpk. Back to the problem, I wonder about a possible mistake of mine. As you did, numerically it is true. Let me work again. I sahll post anything new. Cheers :-) $\endgroup$ May 22, 2021 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.