Daily Chess Puzzle – Train your tactical vision with fresh puzzles. Click any card, think, and then reveal the solution in the post body.

Simpson’s one-third rule

Simpson's 1/3 Rule: An Interactive Masterclass
The parabolic arc of a suspension bridge, representing the core shape of Simpson's Rule

Simpson's 1/3 Rule: A Masterclass on Parabolic Integration

Go beyond straight lines and discover how approximating curves with parabolas gives us a surprisingly powerful and astonishingly accurate integration tool.

The Limits of Straight Lines

In our journey through numerical integrationThe process of finding an approximate value for a definite integral, essential when the exact mathematical solution is impossible or impractical to find., we made a smart upgrade from clunky rectangles to the much more adaptable Trapezoidal Rule. By using straight, slanted lines to connect our data points, we created a much better approximation of the area under a curve. But a straight line, by its very nature, will always fail to capture a curve's, well, curviness.

A trapezoid will always cut a corner on a curve that bends away from it, or overestimate the area for a curve that bends towards it. While we can reduce this error by using more and more tiny trapezoids, this can still be computationally expensive. The logical next question is: can we do better? Can we upgrade our approximating shape from a simple line to something that can actually bend?

The answer is a resounding yes. By taking not two, but three points at a time and fitting a parabolaThe U-shape you get from a simple x² equation. It's the most basic kind of curve and is a second-degree polynomial. through them, we can create an approximation that hugs the true function with astonishing accuracy. This is the simple, brilliant idea behind Simpson's 1/3 Rule, the gold standard for general-purpose numerical integration.


The Single-Panel Simpson's 1/3 Rule

Let's start by focusing on a single "panel" of our area. Unlike the Trapezoidal rule which uses one interval, Simpson's 1/3 Rule requires **two adjacent, equally-sized intervals**. This gives us three points: a start point $x_0$, a midpoint $x_1$, and an endpoint $x_2$.

The Formal Derivation: Integrating a Parabola

The method works by finding the unique parabola that passes through the three points $(x_0, y_0), (x_1, y_1), (x_2, y_2)$ and then calculating the exact integral under that parabola. This is a direct application of the Newton-Cotes philosophy for a second-degree ($n=2$) polynomial.

While the full derivationIn math, a derivation is a step-by-step logical process to show how a formula is created from more basic principles. involves integrating a Lagrange polynomial, the result is surprisingly simple and elegant. The area under the parabola is given by:

$$ I \approx \frac{h}{3}(y_0 + 4y_1 + y_2) $$

This is the famous **Simpson's 1/3 Rule**. The name comes from the $h/3$ factor. Notice the strange weighting: the middle point is considered four times more important than the endpoints! This weighting is the precise value that gives the exact area under the fitted parabola.

Error Analysis: The Magic of the Fourth Derivative

Here is where something truly remarkable happens. Since we are using a second-degree polynomial, we would expect the error to be related to the third derivative, giving us a third-order method. But when mathematicians analyzed the error term, they found something amazing. The error term for a single panel is:

$$ E_t = -\frac{1}{90} h^5 f^{(4)}(c) $$

The error depends on the fourth derivative! Due to the symmetry of the parabola over the interval, the error term from the third derivative magically cancels out to zero. This makes Simpson's Rule "unreasonably accurate." We get the accuracy of a third-degree polynomial for the price of a second-degree one. This is what makes the method so powerful.


The Powerhouse: The Composite Simpson's 1/3 Rule

Using one wide parabola is better than one wide trapezoid, but the real power is unlocked when we apply the rule in its composite form. We break our large interval $[a, b]$ into $n$ smaller intervals (where $n$ must be an even number) and apply the 1-4-1 rule to each pair of intervals, then add up the results.

When we sum the areas, we see that points like $y_2, y_4, \dots$ are the endpoints of one panel and the start points of the next, so their weights get combined. This results in the famous Composite Simpson's 1/3 Rule formula with its unique "1-4-2-4-...-4-1" weighting pattern:

$$ I \approx \frac{h}{3} [f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + \dots + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n)] $$

Error Analysis of the Composite Rule

The total error of the composite rule is the sum of the individual panel errors. The total error is proportional to $h^4$. This means Simpson's Rule is a fourth-order method ($O(h^4)$). This is a spectacular improvement over the Trapezoidal Rule's $O(h^2)$ error. It means that if you double the number of intervals (halving the step size $h$), you will reduce the total error by a factor of $2^4 = 16$! This rapid reduction in error is why Simpson's Rule is a favorite in scientific and engineering computations.


The Simpson's Rule Visualizer

See the power of the parabola for yourself. In this lab, you can control the number of intervals (`n`) used to approximate the area under the curve. The visualizer will draw the approximating parabolas and calculate the resulting error. Compare the tiny error here to the error from the Trapezoidal Rule for the same number of intervals to see the massive improvement.

Simpson's 1/3 Rule in Action


Solving Numerical Problems

Problem 1: Manual Calculation with Simpson's 1/3 Rule

Question: Use the composite Simpson's 1/3 Rule with $n=4$ intervals to estimate the integral of $f(x) = \frac{1}{x}$ from $x=1$ to $x=2$.

Step 1: Setup
The interval is $[1, 2]$ and $n=4$. The step size is $h = (2-1)/4 = 0.25$. Our x-values (nodes) are $x_0=1, x_1=1.25, x_2=1.5, x_3=1.75, x_4=2$.

Step 2: Evaluate the function at the nodes
$y_0 = f(1) = 1/1 = 1$
$y_1 = f(1.25) = 1/1.25 = 0.8$
$y_2 = f(1.5) = 1/1.5 \approx 0.66667$
$y_3 = f(1.75) = 1/1.75 \approx 0.57143$
$y_4 = f(2) = 1/2 = 0.5$

Step 3: Apply the Composite Formula
The formula is $I \approx \frac{h}{3} [y_0 + 4y_1 + 2y_2 + 4y_3 + y_4]$. $$ I \approx \frac{0.25}{3} [1 + 4(0.8) + 2(0.66667) + 4(0.57143) + 0.5] $$ $$ I \approx 0.08333 [1 + 3.2 + 1.33334 + 2.28572 + 0.5] $$ $$ I \approx 0.08333 [8.31906] \approx 0.69325 $$

Conclusion:
The true value of the integral is $\ln(2) \approx 0.69315$. Our approximation of 0.69325 is extremely close, with an error of only about 0.01%!


Test Your Intuition!

Simpson's Rule Quiz

No comments

No comments yet. Be the first!

Post a Comment

Search This Blog

Explore More Topics

Loading topics…