Loav · VCE Mathematical Methods · Units 3 & 4
M34-INT-04 · Integration · Current study design
1. Why approximate an integral?
A function may be available only as measured values, or its antiderivative may not be one of the standard forms available in the course. Numerical integration estimates the accumulated contribution from a finite set of heights. The goal is a controlled approximation with stated interval, spacing and assumptions, rather than an unexplained decimal from a calculator.
For a continuous function on [a, b], increasingly fine sums of narrow strips lead to the definite integral. A finite sum is an approximation to that limiting value. More strips usually improve a well-behaved example, but a particular finite grid can miss rapid changes between its sample points. State what was sampled and avoid claiming exactness solely because a calculator prints many digits.
Before choosing a rule, decide whether the desired quantity is a signed integral or a geometric area. Heights below the axis must remain negative when estimating signed accumulation. For total area or total movement, sign changes must be handled deliberately. A numerical procedure follows its inputs faithfully; it cannot infer which interpretation the question intended.
2. Rectangle sums make the limiting idea visible
Divide [a, b] into n equal strips, with width h = (b − a)/n and nodes xi = a + ih for i = 0, 1, …, n. There are n strips but n + 1 nodes. Left rectangles use the first n nodes; right rectangles use the last n nodes. Write the node list if the distinction is unclear.
The left sum is Ln = h[f(x0) + … + f(xn−1)], and the right sum is Rn = h[f(x1) + … + f(xn)]. Both multiply a collection of heights by a width. Omitting h changes the units and stops the expression from being an area or accumulated quantity.
For an increasing function, a left height is no larger than the intervening function values, while a right height is no smaller. Thus Ln ≤ ∫f ≤ Rn. For a decreasing function, the inequality reverses between the two sums. This comparison concerns monotonicity over each strip; it does not apply unchanged to a function that rises and falls within the same strip.
3. The trapezium rule joins neighbouring heights
Over one strip, approximate the curve by the straight segment joining its endpoint values. The signed contribution is h[f(xi) + f(xi+1)]/2. Adding the strips gives the composite trapezium rule: Tn = (h/2)[f(x0) + 2f(x1) + … + 2f(xn−1) + f(xn)].
The endpoint weights are one, while each interior height has weight two. An interior node is shared by two neighbouring trapeziums; an outer endpoint belongs to only one. This geometric explanation is safer than memorising a coefficient pattern without understanding it. For equal spacing, Tn = (Ln + Rn)/2, because averaging the two rectangle sums produces the same weights.
If the actual function is linear across every strip, the trapezium result is exact. If a graph bends so that each chord lies above the curve, the estimate is too large; if the chords lie below it, the estimate is too small. Inspect the shape or use information supplied in the question. A list of sampled values alone does not establish what happens between them.
Worked example 1: Compare three approximations with an exact result
Estimate ∫02 x2 dx using four equal strips. Here h = 1/2 and the five heights are 0, 1/4, 1, 9/4 and 4. The left sum is (1/2)(0 + 1/4 + 1 + 9/4) = 7/4. The right sum is (1/2)(1/4 + 1 + 9/4 + 4) = 15/4.
The trapezium estimate is (1/4)[0 + 2(1/4 + 1 + 9/4) + 4] = 11/4 = 2.75. The exact integral is [x3/3]02 = 8/3. The increasing graph explains 7/4 < 8/3 < 15/4; its chords lie above the curve, so the trapezium estimate exceeds the exact value by 1/12.
Using eight equal strips gives T8 = 43/16 = 2.6875, with error 1/48. The refinement improves this example. The observed factor-of-four error reduction is a property of this calculation, not a general accuracy guarantee to apply without checking the function and method.
4. Measured data require a sampling decision
When the input is a table, check that the independent-variable values are equally spaced before using the composite equal-width formula. If spacing varies, calculate each contribution separately as (xi+1 − xi)[yi + yi+1]/2, then add. Using a single invented width for uneven observations changes the weighting of the data.
The trapezium rule assumes straight-line interpolation between successive samples. It does not prove that the actual process followed straight lines. A sensor may miss a short peak between measurements, and rounding the data introduces another source of uncertainty. Distinguish the approximation method from the quality and frequency of the observations.
Units come from height multiplied by interval width. A cross-sectional depth in metres integrated over horizontal metres estimates square metres. A flow rate in litres per minute integrated over minutes estimates litres. If a result is an average rate, divide the accumulated quantity by the full elapsed time after applying the rule.
Worked example 2: Integrate a sampled flow rate
A meter records a non-negative flow rate at times 0, 2, 4 and 6 min. The corresponding rates are 1, 4, 5 and 2 L min−1. With h = 2, the estimated volume is (2/2)[1 + 2(4) + 2(5) + 2] = 21 L.
The same calculation strip by strip gives 2(1 + 4)/2 = 5 L, 2(4 + 5)/2 = 9 L and 2(5 + 2)/2 = 7 L. Their total is 21 L. Dividing by six minutes gives an estimated average rate of 3.5 L min−1.
The table alone does not show whether this overestimates or underestimates the true volume. The process could curve above or below its straight interpolation. Report “approximately 21 L using the trapezium rule” unless straight-line behaviour between observations is explicitly part of the model.
5. Translate the method into a reliable algorithm
A useful algorithm makes the interval, strip count and weighting visible. Require b > a, a positive integer n, and a function defined at every node. Calculate h once. Initialise a running sum with the two endpoint values, then add twice each interior value. Finally multiply by h/2. Do not round the heights individually when full-precision evaluation is available.
The pseudocode below implements the mathematical formula. The loop begins at 1 and ends at n − 1 so that the endpoints are not counted again. For n = 1 there are no interior nodes, and the loop performs no iterations. This edge case is a useful test: the algorithm must reduce to one trapezium.
INPUT function f, lower bound a, upper bound b, positive integer n
h ← (b − a) / n
S ← f(a) + f(b)
FOR i FROM 1 TO n − 1
x ← a + i × h
S ← S + 2 × f(x)
END FOR
T ← h × S / 2
OUTPUT TTest an implementation against a constant function and a linear function, for which the rule is exact. Then compare a curved test function with a known integral. A result that changes unexpectedly when n increases may reveal an incorrect loop endpoint, a misplaced bracket or a function entered in the wrong angle mode. Testing a few meaningful cases is more informative than trusting a long block of code.
Worked example 3: Preserve signs or split for total area
For f(x) = x − 1 on [0, 3], unit-spaced heights are −1, 0, 1 and 2. The trapezium rule gives (1/2)[−1 + 2(0) + 2(1) + 2] = 3/2. Because f is linear, this is the exact signed integral.
The geometric area is different. Split at the zero x = 1: the triangle below the axis has area 1/2, and the triangle above has area 2. Total area is 5/2. Applying the rule separately to 1 − x on [0, 1] and x − 1 on [1, 3] gives the same exact result.
If only the magnitudes of endpoint heights at 0 and 3 were used, the single-trapezium estimate would be 3(1 + 2)/2 = 9/2, which is wrong as an exact area. The original graph crosses the axis at the missing zero. Splitting at that sign-change point repairs the area calculation; taking the magnitude of a signed sum does not.
6. Refine without making unsupported accuracy claims
When a function rule is available, comparing estimates for n and 2n strips can indicate stability. If they differ materially at the requested precision, refine further. If they agree closely, that is useful evidence, but it is not a proof that both are close to the true value: a shared sampling pattern can miss features.
Keep any stopping criterion tied to the task. A requested number of strips should be used as stated, even if a calculator could generate more. When asked to design a process, state a tolerance for successive estimates and a maximum strip count, then report failure to settle if needed. Do not silently relabel a tolerance between approximations as a certified bound on the true error.
In written solutions, show h, the ordered heights or their defining rule, and the weighted sum before giving the decimal. This makes an off-by-one error visible and explains the approximation. State the method and units, and distinguish a numerical estimate from an exact expression obtained by the fundamental theorem.
Practise, then check
Show the mathematical reason for each answer. Decide whether the result is a function, a signed quantity or a non-negative area before calculating.
- Use the trapezium rule for f(x) = 5 on [1, 4] with eight equal strips. Is the result exact?
- Estimate ∫01 x2 dx with two equal strips and compare with the exact integral.
- At x = 0, 1, 2, 3, a function has values 2, 3, 6, 11. Estimate its integral. Can these values alone establish the direction of the error?
- For f(x) = 4 − x on [0, 2] with four equal strips, find L4, R4 and T4.
- An algorithm starts S = f(a) + f(b), then adds 2f(a + ih) for i = 0, …, n. What is wrong, and how should the loop change?
- For f(x) = 2x − 1 on [0, 1], explain why one trapezium gives the exact signed integral but not the exact geometric area when applied to the magnitudes of the endpoint heights.
- An interval [2, 5] uses width 0.25. How many strips and nodes are needed? If two successive estimates agree to three decimals, what can you safely conclude?
Reasoned answers
- h = 3/8. The weighted heights total 5 + 2(7 × 5) + 5 = 80. Thus T8 = (3/16) × 80 = 15. It is exact because the function is constant, so every trapezium matches the region.
- h = 1/2 and heights are 0, 1/4, 1. T2 = (1/4)[0 + 2(1/4) + 1] = 3/8. The exact value is 1/3, so the estimate is too large by 1/24.
- With h = 1, the estimate is (1/2)[2 + 2(3) + 2(6) + 11] = 31/2. No error direction follows from the samples alone: different curves can pass through all four points.
- The five heights are 4, 3.5, 3, 2.5 and 2. L4 = 6.5, R4 = 5.5 and T4 = 6. The decreasing function makes the left sum larger. The trapezium value is exact because the function is linear.
- The loop counts both endpoints a second time, adding twice their values after they were already included once. Use i = 1, …, n − 1. This keeps endpoint weights one and interior weights two.
- The signed endpoint heights −1 and 1 give zero, the exact signed integral of the linear function. Their magnitudes give a trapezium area of 1, but the actual two triangular areas total 1/2. Split at the zero x = 1/2 and calculate each area with a positive integrand.
- n = (5 − 2)/0.25 = 12 strips, requiring 13 nodes. Agreement is evidence of numerical stability for those grids, not a guaranteed three-decimal accuracy statement about the true integral without further justification.
Curriculum and sources
Prepared for the current VCE Mathematical Methods Units 3 and 4 course. Scope follows the VCAA Mathematics Study Design 2023–2027, Mathematical Methods Units 3 and 4, Area of Study 3: Calculus, with the current VCAA clarification. Curriculum checked 15 October 2026. Independent teaching material, not a VCAA publication. Teaching reference: Cambridge Senior Mathematics VCE Mathematical Methods 3&4, second edition (2023), Chapter 11; algorithm conventions also draw on the VCAA pseudocode guidance. All teaching prose, questions, numerical datasets and diagrams are original.