1. Match the rule to the information
A numerical integral is a weighted sum, not a new antiderivative. To approximate , first identify the interval, the sample locations and the units. The number n counts subintervals, not data points. With equal spacing, there are n+1 endpoints but n midpoints.
The midpoint rule uses one value at the centre of each interval. The trapezoidal rule joins successive endpoint values by straight segments and integrates that piecewise-linear model. Interior endpoints get full weight because they touch two trapezoids. Simpson’s composite one-third rule fits a quadratic over each pair of intervals: its endpoint weights alternate 1, 4, 2, 4, …, 2, 4, 1. It requires equal spacing and a positive even n. For n=2, the sum with coefficient 2 is empty and equals zero.
A table of endpoint values does not supply the midpoint values. Do not invent them silently. Likewise, more digits in the sum do not establish more accuracy. A numerical integral keeps signed contributions: integrating velocity estimates displacement, not automatically distance.
2. Worked example: compare rules on the same interval
Let on , with and . The endpoint values are ; the midpoint values at are .
Therefore , while . Simpson’s rule gives .
Here an antiderivative provides a check: . The midpoint and trapezoidal absolute errors are and , respectively. The graph is convex because , so midpoint underestimates and trapezoids overestimate. Simpson is exact for this quadratic. It is also exact for cubics, but not for an arbitrary curved function.
These are three different sampling recipes. In particular, M₂ needs values that T₂ and S₂ do not use. A fair data-cost comparison must count the function evaluations, not just compare the subscript.
3. Worked example: unequal time steps and signed velocity
A sensor records times seconds and velocities metres per second. Assume velocity varies linearly between each pair of readings. Use the individual widths, not a single averaged step.
The first contribution is m; the second is m. The displacement is therefore m for this model.
In general, still works with unequal widths. This is exact for the piecewise-linear model, not necessarily for the unknown motion between measurements. The positive and negative velocity portions cancel in displacement; distance requires integrating , splitting at each zero crossing. Standard composite Simpson weights cannot be applied directly to these unequally spaced readings.
4. Worked example: choose n from a guaranteed bound
For a function with continuous second derivative on , let throughout the interval. For Simpson, require a continuous fourth derivative and . With equal steps, these sufficient bounds apply:
For on , choose trapezoids with guaranteed error at most . Since , we may use . Require , giving . Thus the smallest integer certified by this bound is . Its bound is ; n=15 does not satisfy this particular sufficient inequality.
A bound is a ceiling on error, not the actual error. A smaller n might work, but this bound would not certify it. For Simpson, round upward to an even integer. Derivative bounds do not follow from a few table entries, and these formulas do not include measurement noise or arithmetic rounding.
5. Six graduated exercises
1. Count intervals
On , use . Find h, the number of endpoint readings, and the number of midpoint readings. Is n admissible for composite Simpson?
Hint
Sketch the partition before counting.
Explained solution
. There are endpoints and midpoints. Yes: 6 is positive and even. Midpoint readings lie between the listed endpoints, so the two data sets are not interchangeable.
2. An exact linear check
For on , compute and check it by integration.
Hint
The endpoint values are 1, 4 and 7.
Explained solution
. Also . A straight line equals its piecewise-linear interpolation, so the trapezoidal estimate is exact here.
3. Weights from a table
At , the values are . Find and . Does disagreement tell you which is closer to the true integral?
Hint
Use h=1/2 and write the weights before multiplying.
Explained solution
. Meanwhile . The samples alone do not identify the true curve between nodes, so they cannot tell which estimate is closer.
4. Reject an invalid recipe
A student applies Simpson weights to with values . What fails, and what trapezoidal estimate can these readings provide?
Hint
Count subintervals, not values.
Explained solution
There are subintervals, so the standard composite one-third rule does not apply to the whole interval. Trapezoids give . Do not discard a reading or change n without obtaining the required data.
5. Choose an even n
On , a function has a continuous fourth derivative with . Find the smallest even n certified by the Simpson bound for error at most .
Hint
Solve the fourth-power inequality, then enforce even parity.
Explained solution
The bound is . We need . Since and , the smallest admissible even value is . Its bound is . This is a guarantee, not a prediction of the exact error.
6. A table cannot certify accuracy
At the nodes , compare and . What do trapezoids and Simpson return? What are the true integrals on ?
Hint
Use the identity for the square of sine.
Explained solution
Both functions have values , so for both. Yet , whereas gives . Identical samples, or agreement between two rules, do not prove accuracy without further information about the function.
6. Final check
Check the widths, number of intervals, sampling locations, Simpson parity, signs and units. State whether you have computed an approximation to an unknown curve or an exact integral of an assumed interpolation. Use a justified derivative bound only when its assumptions hold.
This original general calculus lesson extends finite-sum practice; it is not a course outline or an exam prediction. Background reference: OpenStax, numerical integration. For prerequisites, review integration and finite-sum practice.
Useful for
Work on the step you’re missing.
Tell us the subject and your preferred time. Nablio confirms the details by text or email.
Request a lesson