🧮 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+x2 dx.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 sec⁡2θ\sec^2\theta and reveals a clean trigonometric integral. The ln⁡(1+x2)\ln(1+x^2) becomes ln⁡(sec⁡2θ)=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=sec⁡2θ dθdx = \sec^2\theta\, d\theta and 1+x2=sec⁡2θ1+x^2 = \sec^2\theta.

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

I=∫0π/4ln⁡(sec⁡2θ)sec⁡2θ⋅sec⁡2θ dθ=∫0π/4ln⁡(sec⁡2θ) dθ=−2∫0π/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θ=−π2ln⁡2.\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:

−π2ln⁡2=∫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⁡ ⁣(12sin⁡2θ)dθ=∫0π/4 ⁣ln⁡(sin⁡2θ) dθ−π4ln⁡2.\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⁡(sin⁡2θ) dθ=12∫0π/2ln⁡(sin⁡u) du=12⋅(−π2ln⁡2)=−π4ln⁡2.\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:

−π2ln⁡2=−π4ln⁡2−π4ln⁡2=−π2ln⁡2.✓-\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−π4ln⁡2,\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)2≈0.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−π4ln⁡2)=−G+π2ln⁡2.I = -2J = -2\left(\frac{G}{2} - \frac{\pi}{4}\ln 2\right) = -G + \frac{\pi}{2}\ln 2.

I=∫01ln⁡(1+x2)1+x2 dx=πln⁡22−G\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: πln⁡22≈1.089\frac{\pi\ln 2}{2} \approx 1.089, G≈0.916G \approx 0.916, so I≈0.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 ↗