Skip to main content

Romberg: 1/(1+x²) from -1 to 1

Short answer

Use trapezoidal values with halved step sizes and Richardson extrapolation. The Romberg table gives the integral as approximately 1.5712, close to the exact value pi/2 = 1.5708.

Compute integration of the following function using Romberg integration: ∫ from -1 to 1 of dx/(1 + x²)

Romberg integration applies the trapezoidal rule with halved step sizes and then Richardson extrapolation: R(i,j) = [4ʲ·R(i,j−1) − R(i−1,j−1)] / (4ʲ − 1).

Here f(x) = 1/(1+x²), a = −1, b = 1. Take h = 2, 1, 0.5, 0.25 (that is 1, 2, 4, 8 sub-intervals).

Trapezoidal values

T(h=2)    = (2/2)[f(−1)+f(1)]                    = 1.0000
T(h=1)    = ½T(2) + 1·f(0)                       = 1.5000
T(h=0.5)  = ½T(1) + 0.5[f(−0.5)+f(0.5)]          = 1.5500
T(h=0.25) = ½T(0.5) + 0.25[f(±0.25)+f(±0.75)]    = 1.5656

Romberg table

hT (order h²)R1 (order h^4)R2 (order h^6)R3 (order h^8)
2.00001.0000
1.00001.50001.6667
0.50001.55001.56671.5600
0.25001.56561.57081.57111.5712

The last row entries (1.5708, 1.5711, 1.5712) agree to 3 decimals, so the extrapolation has converged; the best value is the last entry R3.

Answer: ∫₋₁¹ dx/(1+x²) ≈ 1.5712 (exact value π/2 = 1.5708).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 5 questions →