Numerical integration: 6 exam questions solved step by step
What this lesson covers
- When a function cannot be integrated, or only data is given, the area is estimated from ordinates.
- The strip width h is the interval width divided by the number of strips, not the number of ordinates.
Estimating an area with strips
- Strip width h = (b − a) ÷ number of strips.
- Find every ordinate (y value), to 4 d.p.
- Use the formula booklet's rule, with its weights.
- Round only at the end.
Question 1 · Achieved
- Use the trapezium rule with 4 strips
- To estimate ∫₀² √(1 + x³) dx.
Q1: h and the ordinates
- 4 strips: 5 ordinates.
- Write each one down.
- h = (2 − 0)/4 = 0.54 strips
- x = 0, 0.5, 1, 1.5, 25 ordinates
- y₀ = √1 = 1
- y₁ = √1.125 = 1.0607
- y₂ = √2 = 1.4142
- y₃ = √4.375 = 2.0917
- y₄ = √9 = 3
Q1: the trapezium rule
- Ends once, middle twice.
- Then multiply by h/2.
- y: 1, 1.0607, 1.4142, 2.0917, 3
- A ≈ (h/2)[ends + 2 × middle]
- h/2 = 0.25
- ends: 1 + 3 = 4
- middle: 1.0607 + 1.4142 + 2.0917
- = 4.5666
- bracket = 4 + 2(4.5666) = 13.1332
- A ≈ 0.25 × 13.1332 = 3.2833
- ≈ 3.283 s.f.
Try it: more strips
Question 2 · Achieved
- Now use Simpson's rule with 4 strips
- For the same ∫₀² √(1 + x³) dx.
Q2: Simpson's rule
- Odd ordinates × 4.
- Even ordinates × 2.
- y: 1, 1.0607, 1.4142, 2.0917, 3
- A ≈ (h/3)[ends + 4 odd + 2 even]
- h/3 = 0.5/3 = 1/6
- ends: 1 + 3 = 4
- 4(1.0607 + 2.0917) = 12.6096y₁, y₃
- 2(1.4142) = 2.8284y₂
- bracket = 4 + 12.6096 + 2.8284
- A ≈ 19.4380 ÷ 6 = 3.2397
- ≈ 3.243 s.f.
Question 3 · Merit
- Use Simpson's rule with 5 ordinates
- To estimate ∫₀¹ e^(−x²) dx.
- Careful: 5 ordinates is not 5 strips.
Q3: strips, not ordinates
- Strips = ordinates − 1.
- x² first, then e.
- h = (1 − 0)/5 = 0.25 is the ordinates
- h = (1 − 0)/4 = 0.254 strips
- x = 0, 0.25, 0.5, 0.75, 1
- y₀ = e⁰ = 1
- y₁ = e^(−0.0625) = 0.9394
- y₂ = e^(−0.25) = 0.7788
- y₃ = e^(−0.5625) = 0.5698
- y₄ = e^(−1) = 0.3679
Q3: Simpson's rule
- Weights 1, 4, 2, 4, 1.
- Then multiply by h/3.
- h = 0.25, so h/3 = 1/12
- ends: 1 + 0.3679 = 1.3679y₀ + y₄
- 4(0.9394 + 0.5698) = 6.0368y₁, y₃
- 2(0.7788) = 1.5576y₂
- bracket = 8.9623
- A ≈ 8.9623 ÷ 12 = 0.7469
- ≈ 0.7473 s.f.
- h = 0.2 gives 0.597wrong h
Question 4 · Merit, in context
- Depths across a 12 m wide stream,
- Every 2 m. Use Simpson's rule to
- Estimate the cross-section area.
| Across (m) | Depth (m) |
|---|---|
| 0 | 0 |
| 2 | 0.8 |
| 4 | 1.5 |
| 6 | 1.9 |
| 8 | 1.6 |
| 10 | 0.9 |
| 12 | 0 |
Q4: the stream
- 7 depths: 6 strips, even.
- Area in m².
- h = 2, so h/3 = 2/36 strips
- ends: 0 + 0 = 0banks
- 4(0.8 + 1.9 + 0.9) = 14.4x = 2, 6, 10
- 2(1.5 + 1.6) = 6.2x = 4, 8
- bracket = 0 + 14.4 + 6.2 = 20.6
- A ≈ (2/3)(20.6) = 13.733
- about 13.7 m²3 s.f.
Question 5 · Excellence
- Use the trapezium rule with 4 strips
- To estimate ∫₀^π sin x dx.
- Compare it with the exact value,
- And explain the difference.

Q5: the estimate
- h = π/4, in radians.
- Exact values first.
- h = (π − 0)/4 = π/44 strips
- y: 0, √2/2, 1, √2/2, 0sin x, radians
- ends: 0 + 0 = 0
- middle: √2/2 + 1 + √2/2 = 1 + √2
- A ≈ (π/8)[0 + 2(1 + √2)]h/2 = π/8
- = π(1 + √2)/4 ≈ 1.8961
- ≈ 1.903 s.f.
Q5: compare and explain
- Integrate exactly.
- Why under, not over?
- trapezium ≈ 1.8961
- ∫₀^π sin x dx = [−cos x]₀^πexact
- = −cos π − (−cos 0)
- = 1 + 1 = 2
- 1.8961 < 2: an under-estimate
- error ≈ 0.104, about 5.2%
- concave down on 0 < x < π(sin x)″ = −sin x < 0
- strip tops sit below the curve
Try it: the exact area
Question 6 · Excellence, in context
- Water flows into a farm tank at r L/min.
- Estimate the volume in 50 minutes,
- Using Simpson's rule where you can.
| t (min) | r (L/min) |
|---|---|
| 0 | 0 |
| 10 | 40 |
| 20 | 64 |
| 30 | 72 |
| 40 | 60 |
| 50 | 36 |
Q6: count the strips
- 6 readings: 5 strips.
- Simpson's needs even.
- volume = area under the r graph
- 6 readings, so 5 stripsh = 10 min
- Simpson's on all 5 stripsneeds an even number
- Simpson's for t = 0 to 404 strips
- trapezium for t = 40 to 50the last strip
Try it: strips, weights and splits
Q6: two rules, then add
- Weights 1, 4, 2, 4, 1.
- Litres = L/min × min.
- h = 10, so h/3 = 10/3
- ends: 0 + 60 = 60t = 0, 40
- 4(40 + 72) = 448t = 10, 30
- 2(64) = 128t = 20
- (10/3)(636) = 2120 LSimpson's, 0 to 40
- (10/2)(60 + 36) = 480 Ltrapezium, 40 to 50
- V ≈ 2120 + 480 = 2600 L
- about 2600 litres in 50 min
Common mistakes
- 5 ordinates means 5 strips.Ordinates are the heights. 5 ordinates make 4 strips.
- Simpson's rule works with any number of strips.It needs an even number of strips.
- Simpson's rule uses the weights 1, 2, 2, 2, 1.Those are the trapezium weights. Simpson's alternate: 1, 4, 2, 4, 1.
The method that solved all six
- h from the strips, every ordinate, the right weights.
| Step | How |
|---|---|
| Strip width | h = (b − a) ÷ strips |
| Ordinates | one more than the strips |
| Trapezium | (h/2)[ends + 2 × middle] |
| Simpson's | (h/3)[ends + 4 odd + 2 even] |
| Odd strips | Simpson's on an even part |
| Accuracy | round only at the end |
Challenge
A cyclist's speed was read every 2 seconds for 8 seconds: 0, 7, v, 15 and 16 m s⁻¹. The reading v was lost, but Simpson's rule on all five readings estimated the distance as 84 m. Find v, then estimate the distance with the trapezium rule on the same readings.
Hint
Write Simpson's rule with v left in the bracket, set it equal to 84 and solve. Check which weight v gets: it is the middle ordinate, y₂.
Answer
v = 11 m s⁻¹; trapezium estimate 82 m
Step by step
- Five readings make 4 strips, with h = 2, so h3 = 23.
- Simpson's weights 1, 4, 2, 4, 1: the ends are 0 and 16, the odd ordinates 7 and 15 get × 4, and v gets × 2.
- (23)(16 + 88 + 2v) = 84, so 104 + 2v = 126 and v = 11.
- Trapezium: (h2)[ends + 2 × middle] = 1 × [16 + 2(7 + 11 + 15)] = 82 m.
- The two estimates differ by 2 m, because they join the same points in different ways (straight lines against parabolas).
Full working
- h = 84 = 2, h3 = 234 strips
- (23)[0 + 16 + 4(7 + 15) + 2v] = 84Simpson's, v is y₂
- 104 + 2v = 126× 32
- v = 11 m s⁻¹
- T = (22)[0 + 16 + 2(7 + 11 + 15)]trapezium
- = 16 + 66 = 82 m
- v = 11 m s⁻¹; trapezium estimate 82 m
The exact value of ∫ from 1 to 3 of (1x) dx is ln 3. Find, as exact fractions, the trapezium estimates T₂ (2 strips) and T₄ (4 strips) and the Simpson's estimate S₄ (4 strips). Show that S₄ = 4T₄ − T₂3, explain why both trapezium estimates are too big, and find the percentage error in S₄.
Hint
With 4 strips, h = 12 and the ordinates are 1, 23, 12, 25, 13. T₂ uses only every second one. For the 'too big' part, look at which way 1x bends.
Answer
T₂ = 76, T₄ = 6760, S₄ = 1110 = 4T₄ − T₂3; trapezia sit above the curve because 1x is concave up; S₄ is about 0.126% too big
Step by step
- T₂: h = 1, ordinates 1, 12, 13, so T₂ = (12)[1 + 13 + 2(12)] = 76.
- T₄: h = 12, so T₄ = (14)[1 + 13 + 2(23 + 12 + 25)] = 6760.
- S₄ = (16)[1 + 13 + 4(23 + 25) + 2(12)] = 1110, and (4 × 6760 − 76)/3 = (19860)/3 = 1110 too.
- The second derivative of 1x is 2x³ > 0, so the curve is concave up. Each straight strip top lies above the curve, so the trapezium rule over-estimates, less so with more strips.
- ln 3 ≈ 1.098612, so S₄ is too big by about 0.00139, which is about 0.126%.
Full working
- T₂ = (12)[1 + 13 + 2(12)] = 76 ≈ 1.1667h = 1
- T₄ = (14)[43 + 2(4730)] = 6760 ≈ 1.1167h = 12
- S₄ = (16)[43 + 4(1615) + 2(12)] = 1110weights 1, 4, 2, 4, 1
- 4T₄ − T₂3 = (26860 − 7060)/3 = 6660 = 1110shown
- (1x)″ = 2x³ > 0 on 1 ≤ x ≤ 3concave up, so trapezia over-estimate
- 1.1 − 1.0986121.098612 × 100 ≈ 0.126%percentage error
- T₂ = 76, T₄ = 6760, S₄ = 1110; S₄ about 0.126% too big
Rain flows into a 1500 litre tank. The flow rate r litres per minute was recorded at uneven times: t = 0, 5, 10, 15, 20, 30 and 40 minutes, with r = 0, 12, 20, 26, 30, 32 and 30. The tank held 550 litres at t = 0. Use Simpson's rule wherever the readings allow to estimate the total inflow, and decide whether the tank overflows by t = 40.
Hint
Simpson's rule needs equal strip widths and an even number of strips. Split the data where the spacing changes, and check each part has an even number of strips.
Answer
Inflow ≈ 370 + 626.7 ≈ 997 litres, so about 1547 litres in total: the tank overflows, by about 47 litres
Step by step
- Volume is the area under the rate graph. The spacing is 5 minutes up to t = 20, then 10 minutes, so one h cannot be used for all of it.
- From 0 to 20: 4 strips with h = 5 (even), so Simpson's works: (53)[0 + 30 + 4(12 + 26) + 2(20)] = 370 litres.
- From 20 to 40: 2 strips with h = 10 (also even), so Simpson's again: (103)[30 + 30 + 4(32)] ≈ 626.7 litres.
- Total inflow ≈ 996.7 litres. Added to the 550 litres already there, that is about 1546.7 litres.
- That is more than 1500, so the estimate says the tank overflows, by about 47 litres.
Full working
- 0 to 20: h = 5, 4 stripseven, Simpson's
- (53)[0 + 30 + 4(12 + 26) + 2(20)] = (53)(222) = 370 Lweights 1, 4, 2, 4, 1
- 20 to 40: h = 10, 2 stripseven, Simpson's
- (103)[30 + 30 + 4(32)] = (103)(188) ≈ 626.7 Lweights 1, 4, 1
- 370 + 626.7 ≈ 996.7 Ltotal inflow
- 550 + 996.7 ≈ 1546.7 L > 1500 Ladd the starting volume
- About 997 L flows in; the tank overflows by about 47 L
Practise this
Report a mistake
More in AS 91579
The integration toolkit: surds, e, trig and the chain rule10 min
Integrating fractions: when it is ln, and when it is not9 min
The constant of integration: find c, never assume it9 min
Definite integrals and area, including between two curves11 min
Trapezium and Simpson's rules: numerical areas10 min
Differential equations: growth, decay and Newton's cooling11 min
Integration toolkit: 7 exam questions solved step by step10 min
Integrating fractions: 7 exam questions solved step by step10 min
Constant of integration: 7 exam questions solved step by step11 min
Definite integrals: 7 exam questions solved step by step11 min
Numerical integration: 6 exam questions solved step by step11 min
Differential equations: 6 exam questions solved step by step11 min