🧮 Brain Teaser

The Integral of ln(1+x2)\ln(1+x^2)... Over a Surprising Range

Compute the definite integral

I=01ln(1+x2)1+x2dx.I = \int_0^1 \frac{\ln(1+x^2)}{1+x^2}\, dx.

substitutionCatalan constantlogarithmic integralClausen integral

Answer: Integral of ln(1+x²)/(1+x²)

Key Idea / Intuition

The integrand ln(1+x2)1+x2\frac{\ln(1+x^2)}{1+x^2} looks intimidating, but the substitution x=tanθx = \tan\theta turns 1+x21+x^2 into sec2θ\sec^2\theta and reveals a clean trigonometric integral. The ln(1+x2)\ln(1+x^2) becomes ln(sec2θ)=2ln(secθ)=2ln(cosθ)\ln(\sec^2\theta) = 2\ln(\sec\theta) = -2\ln(\cos\theta), and suddenly we're integrating 2ln(cosθ)-2\ln(\cos\theta) over [0,π/4][0,\pi/4], which can be handled by a classic symmetry/duplication trick.


Formal Proof / Solution

Step 1: Substitution x=tanθx = \tan\theta.

Let x=tanθx = \tan\theta, so dx=sec2θdθdx = \sec^2\theta\, d\theta and 1+x2=sec2θ1+x^2 = \sec^2\theta.

When x=0x=0: θ=0\theta=0. When x=1x=1: θ=π/4\theta=\pi/4.

I=0π/4ln(sec2θ)sec2θsec2θdθ=0π/4ln(sec2θ)dθ=20π/4ln(cosθ)dθ.I = \int_0^{\pi/4} \frac{\ln(\sec^2\theta)}{\sec^2\theta}\cdot \sec^2\theta\, d\theta = \int_0^{\pi/4} \ln(\sec^2\theta)\, d\theta = -2\int_0^{\pi/4} \ln(\cos\theta)\, d\theta.

Step 2: Evaluate J=0π/4ln(cosθ)dθJ = \int_0^{\pi/4} \ln(\cos\theta)\, d\theta.

Use the known result (derivable via the Fourier series for ln(cosθ)\ln(\cos\theta) or the standard Clausen integral):

0π/2ln(cosθ)dθ=π2ln2.\int_0^{\pi/2} \ln(\cos\theta)\, d\theta = -\frac{\pi}{2}\ln 2.

Split this into two pieces:

0π/2ln(cosθ)dθ=0π/4ln(cosθ)dθ+π/4π/2ln(cosθ)dθ.\int_0^{\pi/2} \ln(\cos\theta)\, d\theta = \int_0^{\pi/4} \ln(\cos\theta)\, d\theta + \int_{\pi/4}^{\pi/2} \ln(\cos\theta)\, d\theta.

In the second integral, substitute θπ2ϕ\theta \to \frac{\pi}{2}-\phi, so cosθ=sinϕ\cos\theta = \sin\phi:

π/4π/2ln(cosθ)dθ=0π/4ln(sinϕ)dϕ.\int_{\pi/4}^{\pi/2} \ln(\cos\theta)\, d\theta = \int_0^{\pi/4} \ln(\sin\phi)\, d\phi.

So:

π2ln2=0π/4ln(cosθ)dθ+0π/4ln(sinθ)dθ=0π/4ln(sinθcosθ)dθ.-\frac{\pi}{2}\ln 2 = \int_0^{\pi/4} \ln(\cos\theta)\, d\theta + \int_0^{\pi/4} \ln(\sin\theta)\, d\theta = \int_0^{\pi/4} \ln(\sin\theta\cos\theta)\, d\theta.

Now use sinθcosθ=12sin(2θ)\sin\theta\cos\theta = \frac{1}{2}\sin(2\theta):

0π/4ln ⁣(12sin2θ)dθ=0π/4 ⁣ln(sin2θ)dθπ4ln2.\int_0^{\pi/4} \ln\!\left(\tfrac{1}{2}\sin 2\theta\right)d\theta = \int_0^{\pi/4}\!\ln(\sin 2\theta)\,d\theta - \frac{\pi}{4}\ln 2.

Substitute u=2θu = 2\theta in the first part:

0π/4ln(sin2θ)dθ=120π/2ln(sinu)du=12(π2ln2)=π4ln2.\int_0^{\pi/4}\ln(\sin 2\theta)\,d\theta = \frac{1}{2}\int_0^{\pi/2}\ln(\sin u)\,du = \frac{1}{2}\cdot\left(-\frac{\pi}{2}\ln 2\right) = -\frac{\pi}{4}\ln 2.

So:

π2ln2=π4ln2π4ln2=π2ln2.-\frac{\pi}{2}\ln 2 = -\frac{\pi}{4}\ln 2 - \frac{\pi}{4}\ln 2 = -\frac{\pi}{2}\ln 2. \checkmark

This is consistent but doesn't separate JJ directly. Instead, use the Clausen-type result directly:

0π/4ln(cosθ)dθ=G2π4ln2,\int_0^{\pi/4}\ln(\cos\theta)\,d\theta = \frac{G}{2} - \frac{\pi}{4}\ln 2,

where G=n=0(1)n(2n+1)20.9159...G = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^2} \approx 0.9159... is Catalan's constant.

This follows from the Fourier series ln(2cosθ)=k=1(1)kkcos(2kθ)-\ln(2\cos\theta) = \sum_{k=1}^\infty \frac{(-1)^k}{k}\cos(2k\theta), integrated term by term over [0,π/4][0,\pi/4].

Step 3: Final answer.

I=2J=2(G2π4ln2)=G+π2ln2.I = -2J = -2\left(\frac{G}{2} - \frac{\pi}{4}\ln 2\right) = -G + \frac{\pi}{2}\ln 2.

I=01ln(1+x2)1+x2dx=πln22G\boxed{I = \int_0^1 \frac{\ln(1+x^2)}{1+x^2}\,dx = \frac{\pi \ln 2}{2} - G}

where GG is Catalan's constant. Numerically: πln221.089\frac{\pi\ln 2}{2} \approx 1.089, G0.916G \approx 0.916, so I0.173I \approx 0.173.

The surprise: a clean-looking rational-times-log integrand over [0,1][0,1] secretly encodes Catalan's constant — one of the most mysterious constants in mathematics, whose irrationality is still unknown.

Written to: questions/2025-07-14_PM_integral_ln_1_plus_x2.md

Type: IntegrationEdit on GitHub ↗