8

Background

In this week, I am tackling the integral $$\int_{0}^{\infty} \frac{\ln \left(1-x+x^{2}\right)}{1+x^{2}} d x$$ and found that a general formula below in my post, $$ \begin{aligned} J(a)= \int_{0}^{\infty} \frac{\ln \left(1+2 x \sin a+x^{2}\right)}{1+x^{2}} d x=& \pi\left(\ln \left(2 \cos \frac{a}{2}\right)\right)+|a| \ln \left(\tan \frac{|a|}{2}\right)-2 \operatorname{sgn} (a) \int_{0}^{\frac{|a|}{2}} \ln (\tan x) d x \end{aligned} $$

by which, I found a decent formula for the quartic one, $$ \boxed{I(a)=\int_{0}^{\infty} \frac{\ln \left(x^{4}+2 x^{2} \cos 2 a+1\right)}{1+x^{2}} d x=2 \pi \ln \left(2 \cos \frac{a}{2}\right)} $$

Proof: $$ \begin{aligned} I(a)&=\int_{0}^{\infty} \frac{\ln \left(x^{4}+2 x^{2} \cos 2 a+1\right)}{1+x^{2}} d x\\ &=\int_{0}^{\infty} \frac{\ln \left[\left(x^{2}+1\right)^{2}+2 x^{2}(\cos 2 a-1)+1\right]}{1+x^{2}} d x\\ &=\int_{0}^{\infty} \frac{\ln \left[\left(x^{2}+1\right)^{2}-4 x^{2} \sin ^{2} a\right]}{1+x^{2}} d x\\ &=\int_{0}^{\infty} \frac{\ln \left(x^{2}+2 x \sin a+1\right)}{1+x^{2}}+\int_{0}^{\infty} \frac{\ln \left(x^{2}-2 x \sin a+1\right)}{1+x^{2}} d x\\& =J\left(\frac{a}{2}\right)+J\left(-\frac{a}{2}\right)\\& =2 \pi \ln \left(2 \cos \frac{a}{2}\right) \end{aligned} $$

For examples: $$ K=\int_{0}^{\infty} \frac{\ln \left(x^{4}+1\right)}{1+x^{2}} d x= I\left(\frac{\pi}{4}\right)=2 \pi \ln \left(2 \cos \frac{\pi}{8}\right)= \pi \ln (2+\sqrt{2}) $$

$$ \begin{aligned} L=\int_{0}^{\infty} \frac{\ln \left(x^{4}+x^{2}+1\right)}{1+x^{2}} d x&=I\left(\frac{\pi}{6}\right)=2 \pi \ln \left(2 \cos \frac{\pi}{12}\right)=\pi\ln (2+\sqrt{3}) \end{aligned} $$

$$ \begin{aligned} M=\int_{0}^{\infty} \frac{\ln \left(x^{4}-x^{2}+1\right)}{1+x^{2}} d x&=I\left(\frac{\pi}{3}\right)=2 \pi \ln \left(2 \cos \frac{\pi}{6}\right)=\pi\ln 3 \end{aligned} $$ $$ \begin{aligned} N=&\int_{0}^{\infty} \frac{\ln \left(x^{8}+x^{4}+1\right)}{1+x^{2}} dx = L+M=\pi \ln (6+3 \sqrt{3}) \end{aligned} $$ Last but not least,

$$ \boxed{\int_{0}^{\infty} \frac{\ln \left(x^{4}+b x^{2}+1\right)}{1+x^{2}} d x = 2 \pi \ln \left[2 \cos \left(\frac{1}{4} \cos ^{-1}\left(\frac{b}{2}\right)\right)\right]} $$

$$ \begin{aligned} \int_{0}^{\infty} \frac{\ln \left(x^{8}+1\right)}{1+x^{2}}=& \int_{0}^{\infty} \frac{\ln \left(x^{4}+\sqrt{2} x+1\right)}{1+x^{2}} d x +\int_{0}^{\infty} \frac{\ln \left(x^{4}-\sqrt{2} x+1\right)}{1+x^{2}} d x \\ =& 2 \pi \ln \left[2 \cos \frac{1}{4} \cos ^{-1}\left(\frac{\sqrt{2}}{2}\right)\right] +2 \pi \ln \left[2 \cos \frac{1}{4} \cos ^{-1}\left(-\frac{\sqrt{2}}{2}\right)\right] \\ =& 2 \pi \ln \left(2 \cos \frac{\pi}{16}\right)+2 \pi \ln \left(2 \cos \frac{3 \pi}{16}\right)\\ =& 2 \pi \ln \left(2^2 \cos \frac{\pi}{16} \cos \frac{3 \pi}{16}\right)\\=& 2 \pi \ln (\sqrt{2}+\sqrt{2+\sqrt{2}}) \end{aligned} $$

Eager to know whether it can be proved by contour integration.

Your help and solutions are highly appreciated!

Lai
  • 20,421
  • If one wanted to, here is an evaluation of $\cos\left(\frac14\cos^{-1}(x)\right)$ – Тyma Gaidash Aug 20 '22 at 03:01
  • Thank you very much! – Lai Aug 21 '22 at 21:40
  • For your contour integration, since the integrand is even, the integral will be half of $\int_{-\infty}^\infty$, which is $\lim_{R \to \infty} \int_{-R}^R$, which is the portion on the real line of a contour that can be closed with a semicircle in the upper half-plane. Show that the integral over the semi-circle goes to $0$ as $R \to 0$ (it does), then all you have to do is take the residues of the singularities in the upper half plane (there are two, and two more in the lower half plane you can ignore). – Paul Sinclair Aug 21 '22 at 22:57
  • Thank you for your good suggestion! – Lai Aug 26 '22 at 00:54
  • @PaulSinclair Are you sure? Since substituting $-x$ gives $\frac{\ln(1+x+x^2)}{x^2+1}$ – Kamal Saleh Mar 16 '23 at 16:35
  • 1
    @KamalSaleh - I was referring to the integral the OP was actually asking about (in the box), not the one they off-handedly mentioned working on in the prologue to their question. – Paul Sinclair Mar 16 '23 at 16:40
  • @PaulSinclair Oh, I see now. This is an even function. – Kamal Saleh Mar 16 '23 at 16:41
  • @KamalSaleh - It is a bit confusing, the way it is stated. – Paul Sinclair Mar 16 '23 at 16:42

2 Answers2

5

Assume that $0 \le a < \frac{\pi}{2}$.

Using the principal branch of the logarithm, we have $$ \begin{align}\int_{0}^{\infty} \frac{\ln(x^{4}+2x^{2}\cos(2a)+1)}{1+x^{2}} \, \mathrm dx &= \frac{1}{2} \int_{-\infty}^{\infty} \frac{\ln(x^{4}+2x^{2}\cos(2a)+1)}{1+x^{2}} \, \mathrm dx \\ &= \Re\int_{-\infty}^{\infty} \frac{\ln(x^{2}+e^{2ia})}{1+x^{2}} \, \mathrm dx \\ &= \Re \int_{-\infty}^{\infty} \frac{\ln \left((x+ie^{ia})(x-ie^{ia}) \right)}{1+x^{2}} \, \mathrm dx \\ &= \Re \left( \int_{-\infty}^{\infty} \frac{\ln(x+ie^{ia})}{1+x^{2}} \, \mathrm dx + \int_{-\infty}^{\infty}\frac{\ln(x-ie^{ia})}{1+x^{2}} \, \mathrm dx \right) \\ &= \Re \left( \int_{-\infty}^{\infty} f(x) \, \mathrm dx + \int_{-\infty}^{\infty}\ g(x) \, \mathrm dx \right). \end{align} $$

(The identity $\ln(z_{1}z_{2}) = \ln(z_{1}) + \ln(z_{2})$ holds if $-\pi < \arg(z_{1}) +\arg (z_{2}) \le \pi$).

The function $f(z)$ has has a branch cut in the lower half-plane, while the function $g(z)$ has a branch cut in the upper half-plane.

Therefore, we'll integrate $f(z)$ counterclockwise around a closed semicircular contour in the upper half-plane, and we'll integrate $g(z)$ clockwise around a closed semicircular contour in the lower half-plane.

We get $$ \begin{align} \int_{0}^{\infty} \frac{\ln(x^{4}+2x^{2}\cos(2a)+1)}{1+x^{2}} \, \mathrm dx &= \Re \, 2 \pi i \left( \operatorname{Res}[f(z), i] - \operatorname{Res}[g(z), -i] \right) \\ &= \Re \, 2 \pi i\left(\frac{\ln(i+ie^{ia})}{2i} - \frac{\ln(-i-ie^{ia})}{-2i} \right) \\ &= \pi \left(\frac{1}{2} \, \ln \left(2+2 \cos(a) \right) + \frac{1}{2} \, \ln \left(2+2 \cos(a) \right)\right) \\ &= \pi \ln \left(4 \cos^{2} \left(\frac{a}{2} \right) \right) \\ &= 2 \pi \ln \left(2 \cos \left(\frac{a}{2} \right) \right). \end{align}$$

  • Wonderful use of upper and lower semi-circle on quadratic to which the given quartic is reduced via $\ln(a^2+b^2)=2Re(\ln(a+bi))$! Thank you very much. – Lai Mar 17 '23 at 01:02
  • But, maybe it is possible to compute with 4 parts... – Bob Dobbs Mar 24 '23 at 11:46
2

There are four ugly branch cuts so lets try Feynman's trick. Let $I(a)$ be the given integral. Then, $$I'(a)=\int_0^\infty\frac{-4x^2\sin(2a)}{(1+x^2)(x^4+2x^2\cos2a+1)}dx.$$ By means of the contour integral around the closed counter-clockwise semicircular contour and the residue theorem we get $$\begin{align} I'(a)&=\pi i(Res_{z=\Large i}f(z)+Res_{\Large z=ie^{ai}}f(z)+Res_{\Large z=ie^{-ai}}f(z))\\ &=\pi i(-i\cot a+\frac{e^{ai}}{1-e^{2ai}}-\frac{e^{-ai}}{1-e^{-2ai}})\\ &=-\pi\tan\frac a2. \end{align}$$ Hence, $I(a)=2\pi\ln(\cos\frac a2)+c.$ But, $c=I(0)=\int_0^\infty\frac{2\ln(x^2+1)}{x^2+1}dx=2\pi\ln2.$ Hence, $I(a)=2\pi\ln(2\cos\frac a2).$

Bob Dobbs
  • 10,988