---
title: "Romberg: 1/(1+x²) from -1 to 1"
subject: "Numerical Method"
chapter: 5
key: "semester_4/numerical_method:romberg-1-over-1-x2"
source: https://www.bctengineer.com/q/semester_4/numerical_method/romberg-1-over-1-x2
site: BCT Engineering
---

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

Numerical Method · Chapter 5: Numerical Differentiation and Integration

- Asked in: 2071 Magh, 6 marks
- Video: [Numerical Integration Part 13: Romberg Integration](https://www.youtube.com/watch?v=_BgF_b1MFSU) — Shree Ram Khaitu
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/romberg-1-over-1-x2
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-5

## Question

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

## 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.

## Answer

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
```text
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
| h | T (order h²) | R1 (order h^4) | R2 (order h^6) | R3 (order h^8) |
|---|---|---|---|---|
| 2.0000 | 1.0000 |  |  |  |
| 1.0000 | 1.5000 | 1.6667 |  |  |
| 0.5000 | 1.5500 | 1.5667 | 1.5600 |  |
| 0.2500 | 1.5656 | 1.5708 | 1.5711 | 1.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).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the Romberg extrapolation formula?
   A. R(i,j) = [R(i,j-1) + R(i-1,j-1)]/2
   B. R(i,j) = [4^j R(i,j-1) - R(i-1,j-1)]/(4^j - 1)
   C. R(i,j) = [4^j R(i-1,j-1) - R(i,j-1)]/(4^j - 1)
   D. R(i,j) = 4^j R(i,j-1) - R(i-1,j-1)
   Answer: B. The better estimate is weighted by 4^j and the coarser one subtracted. (Key point: Richardson formula)

2. How is T(h/2) formed from T(h) cheaply?
   A. T(h/2) = 2T(h)
   B. T(h/2) = T(h) + f(mid)
   C. T(h/2) = T(h)/2 + (h/2) × sum of f at the new midpoints
   D. Recompute everything with Simpson's rule
   Answer: C. Old points are reused; only new midpoints are evaluated. (Key point: Trapezoid halving)

3. What is the first R1 entry from T(2) = 1 and T(1) = 1.5?
   A. (1.5 + 1)/2 = 1.25
   B. (4×1 - 1.5)/3 = 0.8333
   C. (16×1.5 - 1)/15 = 1.5667
   D. (4×1.5 - 1)/3 = 1.6667
   Answer: D. R1 = (4T(h/2) - T(h))/3 = 5/3. (Key point: First extrapolation)

4. When is the Romberg process stopped and which value is reported?
   A. When last-row entries agree to the required decimals; take the last entry
   B. After exactly two rows; take the first entry
   C. When T values are equal; take the average
   D. Only when R equals π/2
   Answer: A. The last entry R3 = 1.5712 is the best value. (Key point: Stopping)

## Related in Numerical Method

- [Romberg: 1/x² from 1 to 2](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aromberg-1-over-x2-1-2) — Numerical Method, chapter 5
- [Romberg: (e^x + sin x)/(1+x²)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aromberg-exp-sin-over-1-x2) — Numerical Method, chapter 5, asked 2×
- [Romberg: e^(-x²) from 1 to 2](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aromberg-e-x2-1-2) — Numerical Method, chapter 5

## Related in other subjects

- [Gamma function: ∫ dx/(1−x⁶)^(1/6) = π/3](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Agamma-dx-over-1-minus-x6) — Mathematics I, chapter 2, asked 4×
- [Gamma function: ∫ sin⁶(x/2) cos⁶(x/2) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Agamma-sin6-cos6-half-x) — Mathematics I, chapter 2, asked 3×
- [Gamma function: ∫ x⁶√(1−x²) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Agamma-x6-sqrt-1-minus-x2) — Mathematics I, chapter 2
- [Change order of integration: cos y/√((a−x)(a−y))](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Achange-order-integration-cos-y) — Mathematics, chapter 2
