Numerical Integration (AI HL)

The trapezoidal rule estimates the area under a curve by splitting the interval into strips of equal width and treating each strip as a trapezium. Add the trapezium areas: the first and last yy-values count once and every middle yy-value counts twice. It works from a function or a table of values. It's part of the broader Numerical Methods topic.

18 questions on this sub-topic.

Syllabus

CodeSyllabus content
SL5.8Approximating areas using the trapezoidal rule. Given a table of data or a function, make an estimate for the value of an area using the trapezoidal rule, with intervals of equal width.

Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).

Skills practised on this page:

The trapezoidal rule

The rule is given in the formula booklet, so you don't need to memorise it - you need to build the ordinates correctly and substitute them in the right places.

General rule (n strips)

∫abydx≈h2[(y0+yn)+2(y1+y2+⋯+yn−1)]\displaystyle\int_a^b y\,dx \approx \frac{h}{2}\Big[(y_0+y_n) + 2(y_1+y_2+\cdots+y_{n-1})\Big]

where h=b−anh = \dfrac{b-a}{n} is the strip width and y0,y1,…,yny_0, y_1, \ldots, y_n are the function values at each of the n+1n+1 equally spaced x-values.

Over- or under-estimate?

Concave up ⇒\Rightarrow over-estimate.
Concave down ⇒\Rightarrow under-estimate.

The straight-line tops of the trapezia sit above a curve that bulges downward (concave up), and below a curve that bulges upward (concave down) - so the estimate leans the same way each time.

Need the wider numerical-methods picture, including your GDC's built-in solvers? See Numerical Methods.

Key terms

What is the strip width h?

The width hh is the length of the interval divided by the number of intervals nn, so h=b−anh=\dfrac{b-a}{n}. Every strip has the same width.

e.g. From x=0x=0 to x=2x=2 with 44 intervals, h=24=0.5h=\dfrac{2}{4}=0.5.

What are the ordinates?

The ordinates are the yy-values at the edges of the strips, written y0,y1,…,yny_0,y_1,\dots,y_n. With nn intervals there are n+1n+1 ordinates.

e.g. With 44 intervals on [0,4][0,4], the five ordinates come from x=0,1,2,3,4x=0,1,2,3,4.

How do you use the rule with a table of values?

Check that the xx-values are equally spaced, take hh as that spacing, and put the yy-values into the rule.

e.g. For x=0,1,2,3x=0,1,2,3 and y=2,3,5,8y=2,3,5,8, h=1h=1 and the area is about 12[(2+8)+2(3+5)]=13\dfrac{1}{2}\left[(2+8)+2(3+5)\right]=13.

Why does the trapezoidal rule only give an estimate?

The tops of the trapezia are straight lines, but the curve bends, so the area of the strips differs from the true area. More strips make the gap smaller.

e.g. For y=x2y=x^2 on [0,2][0,2] with 22 intervals the rule gives 33, but the exact area is 83\dfrac{8}{3}.

Worked examples

1
Medium
GDC
[4 marks]

(a) Estimate ∫02x2dx\displaystyle\int_0^2 x^2\,dx using the trapezoidal rule with 2 intervals.

(b) State whether your estimate is an over-estimate or an under-estimate of the exact value, giving a reason.

Worked solution

(a) h=1h = 1; y=x2y = x^2 gives 0,1,4.0, 1, 4. M1
∫≈h2[y0+2y1+y2]=12[0+2+4].\int \approx \tfrac{h}{2}[y_0 + 2y_1 + y_2] = \tfrac12[0 + 2 + 4]. M1
giving 3.3. A1

(b) Exact 83≈2.67\tfrac83 \approx 2.67; estimate is an over-estimate (concave up). A1On the GDC. Trapezoidal rule estimate with step 1 for x squared from 0 to 2 The calculator shows about 3. The calculator steps below are for (a).

TI-84 Plus CE: 2nd mode then type 1/2*(0^2+2*1^2+2^2) enterCasio fx-CG50: MENU Run-Matrix then type 1/2*(0^2+2*1^2+2^2) EXECasio fx-CG100: HOME Calculate then type 1/2*(0^2+2*1^2+2^2) EXETI-Nspire CX: home Calculator then type 1/2*(0^2+2*1^2+2^2) enterFull GDC guide: Enter a calculation on the home screen Topic page

M1 hh and ordinates M1 Trapezoidal formula A1 Correct answer of 33 A1 Over-estimate
2
Medium
GDC
[3 marks]

Estimate ∫04x2dx\displaystyle\int_0^4 x^2\,dx using the trapezoidal rule with 4 intervals.

Worked solution

h=1h = 1; values of x2x^2: 0,1,4,9,160,1,4,9,16; ∫≈12[0+16+2(1+4+9)]\int \approx \tfrac12[0 + 16 + 2(1+4+9)] M1
A1
=22.= 22. A1

M1 hh, ordinates, trapezoidal formula A1 Correct Substitution A1 Correct answer of 2222
3
Easy
Calculator
[3 marks]

Use your GDC to solve 2x=3x2^x = 3x for the larger positive root, to 3 s.f.

Worked solution

Graph y=2xy = 2^x and y=3x.y = 3x. M1
Intersections near x≈0.458x \approx 0.458 A1
and x≈3.31.x \approx 3.31. A1

M1 Graph both A1 Smaller root A1 Larger root
4
Hard
No calc
[3 marks]

An iteration xn+1=g(xn)x_{n+1}=g(x_n) converges to a root α\alpha if |g′(α)|<1.|g^{\prime}(\alpha)|<1.

(a) State this condition in words.

(b) For g(x)=2x−1g(x)=2x-1, find g′(x)g^{\prime}(x) and state whether the iteration converges for a starting value other than 1.1.

Worked solution

(a) converges if |g′|<1.|g'|<1. A1

(b) g′(x)=2;g'(x)=2; M1 |2|>1,|2|>1, so the iteration diverges for any starting value other than 1.1. A1

A1 Condition for convergence, |g'|<1 M1 G'(x)=2 A1 |2|>1 so the iteration diverges

Common mistakes

  • Doubling the wrong ordinates. Only the interior y-values y1y_1 through yn−1y_{n-1} get doubled - the two end values y0y_0 and yny_n are each counted once. Doubling everything (or nothing) is the single most common slip.
  • Using the wrong number of strips. "4 intervals" means 5 ordinates (y0,…,y4)(y_0,\ldots,y_4), not 4. Miscounting here throws off both hh and the sum.
  • Not commenting on over/under-estimate when asked. If a question asks whether the estimate is too high or too low, you need the shape of the curve (concave up or down) over that interval, not just the numerical answer.

Using your GDC

Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.

Show steps for:
Solve an equation numerically (including multiple solutions)

Faster and safer than algebra for messy equations - and essential in AI, where many equations can't be solved by hand. The trick is getting all solutions, not just one.

  1. Graph f(x)f(x) first so you can see how many solutions exist and roughly where they are.
  2. Rearrange so everything is on one side: f(x)=0f(x) = 0 - or graph both sides as separate functions and find intersections.
  3. MATH → Solver: enter the expression, type a starting guess close to one root, press ALPHA + ENTER. Move the guess to near a different root and repeat for each solution.TI-84
  4. Type nSolve(f(x)=0, x, guess) - include a guess or interval e.g. nSolve(f(x)=0, x, 2) or nSolve(f(x)=0, x, {1,5}) to target a specific root.Nspire
  5. Run-Matrix → SolveN(f(x), x) returns all real roots at once; or use the Equation app for a visual approach.Casio
  6. For transcendental equations (e.g. ex=3xe^x = 3x), graph both sides, count crossings, then use the intersection tool for each one.
  7. Always verify each solution by substituting back into the original equation.

Tip: The solver finds ONE root near your starting guess - change the guess to find others. The graph shows you how many to expect.

See the full GDC guide for more calculator models and topics.

Quick questions

What is the trapezoidal rule used for?

It estimates the area under a curve (a definite integral) by splitting the region into equal-width strips and treating each strip as a trapezium: ∫abydx≈h2[(y0+yn)+2(y1+⋯+yn−1)]\int_a^b y\,dx \approx \tfrac{h}{2}[(y_0+y_n)+2(y_1+\cdots+y_{n-1})].

Does the trapezoidal rule over-estimate or under-estimate the true area?

It over-estimates when the curve is concave up and under-estimates when the curve is concave down, because the straight-line tops of the trapezia sit on the outside or inside of the curve accordingly.

Why are the middle y-values doubled?

Each middle ordinate is the edge of two neighbouring trapezia, so it appears in two area calculations. The first and last ordinates belong to only one trapezium each, so they are counted once.

Does using more intervals improve the estimate?

Generally yes, because the straight tops follow the curve more closely. For ∫02x2dx\int_0^2 x^2\,dx, 22 intervals give 33 and 44 intervals give 2.752.75, getting closer to the exact value 83≈2.67\dfrac{8}{3}\approx2.67.

How do I apply the rule when I am given a function, not a table?

Choose equally spaced xx-values, substitute each into the function to get the ordinates, then use the rule. For f(x)=x2+1f(x)=x^2+1 on [0,2][0,2] with 22 intervals, the ordinates are 1,2,51,2,5 and the estimate is 12[(1+5)+2(2)]=5\dfrac{1}{2}\left[(1+5)+2(2)\right]=5.

Ready to practise properly?

18 numerical-integration questions, marked instantly like the real exam.