Given. Nine equally spaced ordinates of an unknown curve, spacing $h=1.0$ on $a=-4$ to $b=4$:
$x$
−4.0
−3.0
−2.0
−1.0
0
1.0
2.0
3.0
4.0
$f(x)$
15.0
13.0
12.0
12.0
14.0
17.0
19.0
20.0
17.0
Find. $\displaystyle\int_{-4}^{4}f(x)\,dx$ by Romberg’s algorithm, carried as far as the tabulated data allow.
The nine tabulated ordinates and the region whose area is required. Nine points support four halvings of the interval, hence a four-row Romberg array terminating at $R(4,4)$.
Approach. Build the first Romberg column as successively halved trapezoidal rules (each reusing the previous estimate plus only the new midpoints), then apply Richardson extrapolation across the rows to cancel successive powers of $H^2$. Nine ordinates permit $H=8,4,2,1$, so the array is $4\times4$ and terminates at $R(4,4)$.
First column, $k=1$ — the crude trapezoid. With $H_1=(b-a)/2^0=8$,
$$R(1,1)=\dfrac{H_1}{2}\big[f(-4)+f(4)\big]=\dfrac{8}{2}\big[15.0+17.0\big]=128.000000$$
Refine to $k=2$ and $k=3$. Each step halves $H$ and adds only the newly sampled midpoints, weighted by the previous spacing. With $H_2=4$ the single new abscissa is $a+H_2=0$:
$$R(2,1)=\tfrac12\big[128.000000+8\cdot f(0)\big]=\tfrac12\big[128+8(14.0)\big]=120.000000$$
With $H_3=2$ the two new abscissae are $a+H_3=-2$ and $a+3H_3=2$:
$$R(3,1)=\tfrac12\big[120.000000+4\big(f(-2)+f(2)\big)\big]=\tfrac12\big[120+4(12.0+19.0)\big]=122.000000$$
Refine to $k=4$. With $H_4=1$ the four new abscissae are $-3,-1,1,3$:
$$R(4,1)=\tfrac12\big[122.000000+2\big(13.0+12.0+17.0+20.0\big)\big]=\tfrac12\big[122+2(62.0)\big]=123.000000$$
This exhausts the table — every one of the nine ordinates has now been used, so no fifth row is possible.
Richardson extrapolation across the rows. The second column removes the leading $O(H^2)$ error using $j=2$, for which $4^{j-1}-1=3$:
$$R(2,2)=120+\dfrac{120-128}{3}=117.333333,\qquad R(3,2)=122+\dfrac{122-120}{3}=122.666667$$
$$R(4,2)=123+\dfrac{123-122}{3}=123.333333$$
(These second-column entries are exactly the composite Simpson estimates; $R(4,2)=123.333333$ agrees with Simpson’s rule applied directly at $h=1$, a useful independent check.)
Third and fourth columns. With $j=3$ the divisor is $4^2-1=15$, and with $j=4$ it is $4^3-1=63$:
$$R(3,3)=122.666667+\dfrac{122.666667-117.333333}{15}=123.022222$$
$$R(4,3)=123.333333+\dfrac{123.333333-122.666667}{15}=123.377778$$
$$R(4,4)=123.377778+\dfrac{123.377778-123.022222}{63}=123.383422$$
Assemble the array and state the result. The completed triangular array is
$k$
$H_k$
$R(k,1)$
$R(k,2)$
$R(k,3)$
$R(k,4)$
1
8
128.000000
2
4
120.000000
117.333333
3
2
122.000000
122.666667
123.022222
4
1
123.000000
123.333333
123.377778
123.383422
The best estimate is the last entry of the leading diagonal,
$$\boxed{\int_{-4}^{4}f(x)\,dx\approx R(4,4)=123.3834\approx123.38}$$
The rapid settling of the final column — $123.02$, $123.38$, $123.383$ — indicates roughly four significant figures of accuracy, which is as much as nine data points can justify for a curve of unknown form.