9

I derived some integrals a while ago $$I(t)=\int_0^\infty\frac{\ln{(x^4+t(x^2+1))}}{x^2+1}dx$$ $$I(i)=\int_0^\infty\frac{\ln{(x^4+i(x^2+1)}}{x^2+1}dx=2\pi\ln{(1+\sqrt{i}+\sqrt{i+2\sqrt{i}})}$$ I then took the real and imaginary parts of each side and got interesting results $$\int_0^\infty\frac{\ln{(x^8+x^4+2x^2+1)}}{x^2+1}dx$$$$=\pi\ln{\left(2+\sqrt2+\sqrt{5+2\sqrt2}+2(46+32\sqrt2)^{1/4}\cos{\left(\frac{\pi}{8}-\frac{1}{2}\arctan{\left(1+\frac{1}{\sqrt2}\right)}\right)}\right)}$$ and $$\int_0^\infty\frac{1}{x^2+1}\arctan{\left(\frac{x^2+1}{x^4}\right)}dx=\pi\arctan{\left(\frac{1+\sqrt{\sqrt{5+2\sqrt2}-\sqrt2}}{1+\sqrt2+\sqrt{\sqrt{5+2\sqrt2}+\sqrt2}}\right)}$$ I checked the numerical answers on WolframAlpha to ensure that they match my answers.

I want to know whether there is a way to directly solve the integrals, and I am most interested in the second integral

phi-rate
  • 2,345

2 Answers2

9

We could even compute the antiderivative $$I=\int\frac{\log{(x^8+x^4+2x^2+1)}}{x^2+1}dx=\sum_{i=1}^4\int\frac{\log(x^2-r_i)}{x^2+1}dx$$ where $$r_1=\frac{-i-\sqrt{-1-4 i}}{2}\qquad \qquad r_2=\frac{-i+\sqrt{-1-4 i}}{2} $$ $$r_3=\frac{i-\sqrt{-1-4 i}}{2} \qquad \qquad r_4=\frac{i+\sqrt{-1-4 i}}{2} $$

and $$I_a=\int\frac{\log(x^2-a)}{x^2+1}dx$$ is known (have a look here)

For complex $a$ ( provided that $\Re(a)<0$) $$J_a=\int_0^\infty \frac{\log(x^2-a)}{x^2+1}dx=\frac{\pi}{2} \left(\log (a+1)+2 i \tan ^{-1}\left(\sqrt{a}\right)\right)$$ and the fact that $r_1+r_4=r_2+r_3=0$ must lead to a lot of simplifications. $$J_{+a}+J_{-a}=\frac{\pi}{2} \left(\log \left(1-a^2\right)+2 i \tan ^{-1}\left(\frac{(1+i) \sqrt{a}}{1-i a}\right)\right)$$

I did not have the patience to finish the simplications as you did but the results are exactly the same.

6

Solution to the second integral

Integrate by parts to get

$$\begin{align*} I &= \int_0^\infty \frac{1}{1+x^2} \tan^{-1}\left(\frac{1+x^2}{x^4}\right) \, dx \\[1ex] &= 2 \int_0^\infty \frac{x^5+2x^3}{x^8+x^4+2x^2+1} \tan^{-1}(x) \, dx \\[1ex] &= \int_{-\infty}^\infty \frac{x^5+2x^3}{x^8+x^4+2x^2+1} \tan^{-1}(x) \, dx \end{align*}$$


Now we integrate $f(z)=\frac{z^5+2z^3}{z^8+z^4+2z^2+1} \tan^{-1}(z)$ along a positively oriented, semicircular contour $C$ in the upper imaginary half-plane with radius $R>1$, and with an indentation surrounding the branch cut along $[i,i\infty)$ and encircling the branch point at $z=i$. On the principal branch, we have

$$\tan^{-1}(z) = -\frac i2 \log\left(\frac{i-z}{i+z}\right) = -\frac i2 \log\left|\frac{i-z}{i+z}\right| + \frac12 \arg\left(\frac{i-z}{i+z}\right)$$

enter image description here

It's easy to show the integrals along the circular arcs vanish as $R\to\infty$ and $\varepsilon\to0$ (the radius of the small circle). The integral along the real axis converges to $I$. This leaves us with the contribution of the integrals along the vertical line segments.


Parameterize the right and left paths, respectively, by

$$A : z = \varepsilon + it , t\in[R,1+\varepsilon] \\ B : z = -\varepsilon + it , t\in[1+\varepsilon,R]$$

As $\varepsilon\to0$, the integral along $A$ converges to

$$\begin{align*} \lim_{\varepsilon\to0} \int_A f(z) \, dz &= -\int_1^\infty f(it) \, i \, dt \\[1ex] &= -\int_1^\infty \frac{(it)^5+2(it)^3}{(it)^8+(it)^4+2(it)^2+1} \left(-\frac i2 \log\left|\frac{i-it}{i+it}\right| + \frac\pi2\right) \, i \, dt \\[1ex] &= -\frac i2 \int_1^\infty \frac{t^5-2t^3}{t^8+t^4-2t^2+1} \log\left|\frac{1-t}{1+t}\right| \, dt + \frac\pi2 \int_1^\infty \frac{t^5-2t^3}{t^8+t^4-2t^2+1} \, dt \end{align*}$$

while the integral along $B$ converges to

$$\begin{align*} \lim_{\varepsilon\to0} \int_B f(z) \, dz &= \int_1^\infty f(it) \, i \, dt \\[1ex] &= \int_1^\infty \frac{(it)^5+2(it)^3}{(it)^8+(it)^4+2(it)^2+1} \left(-\frac i2 \log\left|\frac{i-it}{i+it}\right| - \frac\pi2\right) \, i \, dt \\[1ex] &= \frac i2 \int_1^\infty \frac{t^5-2t^3}{t^8+t^4-2t^2+1} \log\left|\frac{1-t}{1+t}\right| \, dt + \frac\pi2 \int_1^\infty \frac{t^5-2t^3}{t^8+t^4-2t^2+1} \, dt \end{align*}$$

so that by the residue theorem,

$$2\pi i \sum_{\rm poles} \operatorname{Res} f(z) = I + \pi \int_1^\infty \frac{t^5 - 2t^3}{t^8 + t^4 - 2t^2 + 1} \, dt$$


The remaining integral vanishes:

$$\begin{align*} J &= \int_1^\infty \frac{t^5 - 2t^3}{t^8 + t^4 - 2t^2 + 1} \, dt \\[1ex] &= \frac12 \int_1^\infty \frac{t^2 - 2t}{t^4+t^2-2t+1} \, dt \tag{1} \\[1ex] &= \frac12 \int_0^\infty \frac{t^2 - 1}{t^4+4t^3+7t^2+4t+1} \, dt \tag{2} \\[1ex] &= \frac12 \int_0^1 \frac{t^2 - 1}{t^4+4t^3+7t^2+4t+1} \, dt + \frac12 \int_1^\infty \frac{t^2 - 1}{t^4+4t^3+7t^2+4t+1} \, dt \\[1ex] &= \frac12 \int_0^1 \frac{t^2 - 1}{t^4+4t^3+7t^2+4t+1} \, dt + \frac12 \int_0^1 \frac{1 - t^2}{1+4t+7t^2+4t^3+t^4} \, dt \tag{3} \\[1ex] &= 0 \end{align*}$$

  • $(1)$ : $t\mapsto\sqrt t$
  • $(2)$ : $t\mapsto t+1$
  • $(3)$ : $t\mapsto \frac1t$ in the second integral

All that remains is to find the poles and compute the residues. Observe that

$$z^8 + z^4 + 2z^2 + 1 = (z^4 + iz^2 + i) (z^4 - iz^2 - i)$$

and the rest can be factorized with the quadratic theorem, so finding the poles is easy. The $4$ that fall within $C$ are

$$z = \sqrt{\pm \frac i2 \pm \frac{\sqrt{-1\pm4i}}2} \qquad \qquad \bigg((+,+,+)\text{ and }(-,-,-)\bigg)\\ z = -\sqrt{\pm \frac i2 \mp \frac{\sqrt{-1\pm4i}}2} \qquad\qquad \bigg((+,-,+)\text{ and }(-,+,-)\bigg)$$

Computing the residues is tedious, but ultimately we find that their sum simplifies to

$$\sum_{\rm poles} \operatorname{Res} f(z) = -\frac i4 \cot ^{-1}\left(\sqrt{\frac{1-\sqrt{2}+\sqrt{14-8 \sqrt{2}}}{2} }\right)$$

(I cheated with Mathematica to get this nice closed form)

Hence we conclude that

$$I = \boxed{\frac\pi2 \cot ^{-1}\left(\sqrt{\frac{1-\sqrt{2}+\sqrt{14-8 \sqrt{2}}}{2} }\right)}$$

user170231
  • 19,334
  • This is a clever approach. I love this! I never could have thought of this on my own – phi-rate Nov 16 '22 at 17:10
  • 1
    This is a beautiful solution. It evokes this: https://math.stackexchange.com/questions/562694/integral-int-11-frac1x-sqrt-frac1x1-x-ln-left-frac2-x22-x1/565626#565626 – Ron Gordon Aug 25 '23 at 19:50
  • @RonGordon Wow, thank you! I'm honored to hear that from the author of that post. Allow me to take a moment and express my own appreciation for your contributions, I've learned a lot from your work and website! – user170231 Aug 28 '23 at 15:41