Mathematics / Simpson Quadrature Rules
FREE TO EXPLORE
LABORATORY 27 · MATHEMATICS

Simpson's 1/3 and 3/8 Rules: Parabolic Quadrature Convergence

Implement composite Simpson's 1/3 and 3/8 quadrature rules, demonstrate why quadratic interpolation gains an extra order of algebraic accuracy for cubic polynomials, and verify the fourth-order O(h⁴) truncation error convergence rate under systematic mesh halving. Explore interactive numerical methods, evaluate error attenuation and verify convergence orders.

COMPUTE · CONVERGE · ANALYSE

Your virtual mathematics laboratory.

SIMPSON QUADRATURE ERROR |I - S(H)|—
COMPUTATION STATUS

Ready to execute Step = 1.

1 step
Definite integral benchmark: ∫₀^π sin(x) dx = 2.000000000000000

Adjust Step, then execute computation.

Mathematical operations are computed deterministically using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations.

Numerical assumptions and limits

Simpson's rule requires equidistant node spacing; if data points are non-uniformly distributed, spline quadrature or Gaussian quadrature must be used. The simulation evaluates composite Simpson quadrature for step sizes h = 0.20 / 2^{k-1}. The maximum error is measured against the analytic integral of sin(x). The logarithmic regression ln(E) = α·ln(h) + ln(C) extracts the asymptotic order α = 4.000 with R² = 1.000000.

Computational tools & numerical modules.

Trigonometric Benchmark Manifold

Evaluates f(x) = sin(x) on [0, π] with exact analytic reference integral I = 2.000000.

Even-Panel Mesh Discretizer

Partitions [a, b] into N = 2·2^{k-1} panels with uniform step size h = (b - a)/N.

Simpson 1/3 Accumulator

Evaluates S_{1/3} = (h/3) [f(a) + 4 ∑_{odd} f(x_i) + 2 ∑_{even} f(x_i) + f(b)].

Simpson 3/8 Cubic Accumulator

Executes the 3/8 rule on groups of three panels, accommodating odd panel remainders.

Peano Error Kernel Evaluator

Visualizes the sign-definite Peano error kernel K(t) = ∫ (x - t)_+² dx showing fourth-order behavior.

Log-Log Regression Slope Processor

Calculates ordinary least squares slope on (ln(h), ln(E_h)) to confirm α = 4.000.

FOLLOW THE METHOD

A reason behind every step.

Implement composite Simpson's 1/3 and 3/8 quadrature rules, demonstrate why quadratic interpolation gains an extra order of algebraic accuracy for cubic polynomials, and verify the fourth-order O(h⁴) truncation error convergence rate under systematic mesh halving. Standardized input settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 step.

01

Initialize Trigonometric Integrand

Set f(x) = sin(x) on [0, π] with exact analytic reference value I = 2.000000000000000.

02

Set Even Discretization Panels

For subdivision level k = 1 to 6, set panel count N = 4 · 2^{k-1} and step size h = π / N.

03

Execute Simpson 1/3 Quadrature

Accumulate endpoint, odd, and even nodes using weights 1, 4, 2, 4, ..., 1 and scale by h/3.

04

Execute Simpson 3/8 Quadrature

Evaluate the cubic composite rule using weights 1, 3, 3, 2, 3, 3, ..., 1 and scale by 3h/8 for comparison.

05

Measure Absolute Quadrature Residual

Compute E_h = |2.0 - S(h)| and verify that halving h attenuates the error by a factor of 16 (2⁴ = 16).

06

Fit Asymptotic Order of Convergence

Plot ln(E_h) versus ln(h) and compute the linear regression gradient to verify α = 4.000.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into mathematical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Simpson Quadrature Rules mathematical scaling.

LINEAR ASYMPTOTIC FIT · y = mx + b
ln(E_h) = α · ln(h) + ln(C)
#Subdivision Level (k) (step)Simpson Quadrature Error |I - S(h)| (error)Logarithmic Panel Width ln(h)Logarithmic Quadrature Error ln(E_h)Remove

No readings yet. Execute a computation and record it.

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the mathematical metrics mean.

What is the degree of algebraic precision of Simpson's 1/3 rule (the highest polynomial degree for which it is exact)?

What is the asymptotic convergence order α of composite Simpson's 1/3 rule as panel spacing h → 0?

What constraint must the total number of panels N satisfy to apply composite Simpson's 1/3 rule?

Why does Simpson's 3/8 rule use the weighting sequence [1, 3, 3, 2, 3, 3, ..., 1]?