We assume a regular subdivision with length (step) \( h = \frac{b - a}{n} \), where \( x_i = a + i h \), for \( i = 0, 1, \dots, n \).

In Thomas Simpson’s method (1710–1761), the function \( f \) is replaced, on each interval \( [x_{i-1}, x_{i+1}] \), by a second-degree polynomial \( p_2 \), defining a parabolic arc passing through the points \( (x_{i-1}, f(x_{i-1})) \), \( (x_i, f(x_i)) \), and \( (x_{i+1}, f(x_{i+1})) \).

This polynomial is given by:

\[ p_2(x) = \frac{(x - x_i)(x - x_{i+1})}{2h^2} f(x_{i-1}) - \frac{(x - x_{i-1})(x - x_{i+1})}{h^2} f(x_i) + \frac{(x - x_{i-1})(x - x_i)}{2h^2} f(x_{i+1}), \quad \text{for } x \in [x_{i-1}, x_{i+1}] \]

Since three points are needed, the number of subdivisions must be even: \( n = 2m \).

Because \( f(x) \approx p_2(x) \) on each sub-interval \( [x_{i-1}, x_{i+1}] \), we have:

\[ \int_{x_{i-1}}^{x_{i+1}} f(x)\, dx \approx \int_{x_{i-1}}^{x_{i+1}} p_2(x)\, dx = \frac{h}{3} \left[f(x_{i-1}) + 4f(x_i) + f(x_{i+1})\right] \]

Summing over all sub-intervals gives:

\[ \int_a^b f(x)\,dx \approx \frac{h}{3} \left[ f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + \dots + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n) \right] \]

In other words, Simpson’s method can be written as:

\[ \int_a^b f(x)\, dx \approx S(f) = \frac{h}{3} \left[ f(x_0) + f(x_n) + 2 \sum_{\substack{2 \leq i \leq n-2 \\ i\ \text{even}}} f(x_i) + 4 \sum_{\substack{1 \leq i \leq n-1 \\ i\ \text{odd}}} f(x_i) \right] \]

Order and Error

Simpson’s method is of order 4. If \( f \in \mathcal{C}^4([a, b]) \), then the error is given by:

\[ \left| \int_a^b f(x)\,dx - S(f) \right| \leq \frac{(b - a) h^4}{180} \cdot \sup_{x \in [a, b]} |f^{(4)}(x)| \]

Example

We revisit the previous calculation with the function \( f(x) = x^2 \) on the interval \([0, 1]\), using \( n = 4 \) subdivisions (even).

Then \( h = \frac{1 - 0}{4} = \frac{1}{4} \).

\[ S_4(f) = \frac{h}{3} \left[ f(0) + 4f\left(\frac{1}{4}\right) + 2f\left(\frac{1}{2}\right) + 4f\left(\frac{3}{4}\right) + f(1) \right] \]

\[ = \frac{1}{12} \left[ 0 + 4 \cdot \frac{1}{16} + 2 \cdot \frac{1}{4} + 4 \cdot \frac{9}{16} + 1 \right] = \frac{1}{12} \left[ 0 + \frac{4}{16} + \frac{2}{4} + \frac{36}{16} + 1 \right] = \frac{1}{12} \cdot \frac{48}{16} = \frac{1}{12} \cdot 3 = \frac{1}{3} \]

This result is exact, as expected, since Simpson’s method is of order 4 and \( f(x) = x^2 \) is a polynomial of degree 2.