Numerical Methods (AI HL)

Some equations and integrals can't be solved exactly with algebra - numerical methods find a solution by calculation instead of by formula. This topic covers the trapezoidal rule for estimating the area under a curve, and the Newton-Raphson and bisection methods for locating roots of an equation, along with the error analysis that goes with any estimate. Every technique here is designed to be used with a GDC.

What the syllabus says

This topic maps onto the official IB Applications & Interpretation syllabus, with content spanning one numbered subtopic and the general expectation - stated throughout the calculus and number topics - that technology is used to solve equations that cannot be handled algebraically.

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.
Technology useRoot-finding by bisection or Newton-Raphson iteration is not listed under its own numbered subtopic, but is examined as a direct application of the syllabus-wide expectation that students use their GDC's numerical solver to find roots of equations that resist algebraic methods - a skill referenced throughout the Number and Calculus topics.

Numerical methods questions on this site are calculator-permitted (Paper 2), consistent with how they're examined.

Key terms

Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.

What is the trapezoidal rule?

The trapezoidal rule estimates the area under a curve by dividing the region into equal-width strips, joining the tops with straight lines to form trapezia, and adding up their areas. It's used when a curve can't be integrated exactly, or when you only have a table of data points.

e.g. For \(y=x^2\) on \([0,2]\) with \(h=1\): \(\int_0^2 x^2\,dx \approx \tfrac{1}{2}[0+4+2(1)] = 3\).

What is the Newton-Raphson method?

Newton-Raphson finds a root of \(f(x)=0\) by starting at a guess \(x_0\) and repeatedly following the tangent line down to where it crosses the x-axis: \(x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}\). It converges very quickly when the starting guess is close to the root.

e.g. \(f(x)=x^2-2,\ x_0=1.5\): \(x_1 = 1.5 - \dfrac{0.25}{3} \approx 1.4167\), close to \(\sqrt2\approx1.4142\).

What is the bisection method?

The bisection method traps a root inside an interval where \(f\) changes sign, then repeatedly halves the interval - keeping whichever half still contains the sign change - until the interval is as narrow as required. It's slower than Newton-Raphson but never fails to converge.

e.g. \(f(x)=x^2-3\) on \([1,2]\): midpoint \(1.5\), \(f(1.5)=-0.75<0\), so the root is in \([1.5,2]\).

What is percentage error?

Percentage error measures how far an estimate is from the true value, as a proportion of the true value: \(\dfrac{|v_A-v_E|}{v_E}\times100\%\). It's the standard way to judge how good a numerical estimate is once the exact value is known.

e.g. Estimate \(1.167\), exact \(\ln3\approx1.0986\): error \(\approx\dfrac{0.0684}{1.0986}\times100\approx6.2\%\).

What does concavity tell you about the trapezoidal rule's error?

If a curve is concave up (convex), the straight chords used by the trapezoidal rule lie above the curve, so the estimate is too big - an over-estimate. If the curve is concave down, the chords lie below it, giving an under-estimate.

e.g. \(y=x^2\) is convex, so the trapezoidal estimate \(2.75\) for \(\int_0^2 x^2\,dx = 2.6667\) is an over-estimate.

Key formulas

Two named methods and one error formula cover almost every question on this topic. The tables below summarise all of them at a glance - the explanations underneath go into more depth on each one.

Formula reference

The trapezoidal rule, the Newton-Raphson formula and the percentage error formula are all on the official formula booklet. The bisection method has no formula to quote - it's a step-by-step procedure you carry out and describe.

FormulaUsed forBooklet?
\(\displaystyle\int_a^b y\,dx \approx \frac{h}{2}\big[(y_0+y_n)+2(y_1+\cdots+y_{n-1})\big]\)Trapezoidal rule, \(h=\tfrac{b-a}{n}\)✓ Yes
\(x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}\)Newton-Raphson iteration✓ Yes
\(\left|\dfrac{v_A-v_E}{v_E}\right|\times100\%\)Percentage error✓ Yes
Halve the interval, check the sign of \(f\) at the midpointBisection methodNot in booklet - procedure, not a formula

Trapezoidal rule vs Newton-Raphson

These two methods solve different problems, so it's worth being clear on when each one applies.

FeatureTrapezoidal ruleNewton-Raphson
What it findsAn estimate of a definite integral (area)An estimate of a root of \(f(x)=0\)
What you needFunction values (or data) at equally-spaced points\(f(x)\), \(f'(x)\), and a starting guess
Typical errorOver- or under-estimate depending on concavityCan fail if \(f'(x_n)\approx0\) or the guess is poor
Number of stepsOne calculation using all the stripsRepeated until successive values agree to the required accuracy

The trapezoidal rule

Every interval must have the same width \(h\) - the rule assumes equally-spaced x-values.

Setting up \(h\)

\[h = \frac{b-a}{n}\]

Divide the total width by the number of strips to get the strip width.

Not in the formula booklet - prior knowledge

Applying the rule

\[\frac{h}{2}\big[(y_0+y_n)+2(y_1+\cdots+y_{n-1})\big]\]

Add the two end values, double the interior values, then multiply by \(h/2\).

✓ In the formula booklet

Reading the error direction

Concave up (convex) → over-estimate. Concave down (concave) → under-estimate, because the chord sits on the opposite side of the curve in each case.

Root-finding by iteration

Both methods need a first estimate of where the root is - usually found by sketching or by checking a sign change.

Newton-Raphson

\[x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}\]

Follow the tangent at \(x_n\) down to the x-axis to get a better estimate.

✓ In the formula booklet

Bisection

Start with an interval \([a,b]\) where \(f(a)\) and \(f(b)\) have opposite signs. Find the midpoint, evaluate \(f\) there, and keep the half where the sign change still occurs.

When Newton-Raphson fails

If \(f'(x_n)\approx0\) the next step divides by (almost) zero and shoots off to a wildly different value. A starting guess near a turning point or a point of inflexion is the usual cause.

Worked examples

Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.

1
Medium
Calculator
[5 marks]

Use Newton-Raphson on \(f(x)=x^2-5\) with \(x_0=2.\)

(a) State the iteration formula.
(b) Find \(x_1.\)
(c) Find \(x_2\) (to 4 d.p.).

Worked solution

(a) \(x_{n+1} = x_n - \dfrac{x_n^2 - 5}{2x_n}.\) M1

(b) \(x_1 = 2 + 0.25\) M1
\(= 2.25.\) A1

(c) \(x_2 = 2.25 - \dfrac{0.0625}{4.5}\) M1
\(\approx 2.2361.\) A1

M1 NR formula M1 Iteration A1 Correct answer of \(2.25\) A1 Correct answer of \(\approx2.2361\)
2
Hard
Calculator
[6 marks]

Estimate \(\displaystyle\int_0^2 e^{x}\,dx\) with the trapezoidal rule using 2 intervals.

(a) Find the estimate.
(b) Find the exact value.
(c) Explain the direction of the error using concavity.

Worked solution

(a) \(h = 1\); \(\int \approx \tfrac12[1 + 7.389 + 2(2.718)]\) M1
\(\approx 6.91.\) A1

(b) \([e^x]_0^2 = e^2 - 1\) M1
\(\approx 6.389.\) A1

(c) \(e^x\) is concave up, so trapezia lie above ⇒ over-estimate. M1 A1

M1 Trapezoidal A1 Correct answer of \(\approx6.91\) M1 Exact A1 Correct answer of \(\approx6.389\) M1 Concavity A1 Over-estimate

Common mistakes

The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.

  • Mixing up which half to keep in bisection. After evaluating \(f\) at the midpoint, the new interval is the half where the sign change still occurs - not automatically the left or right half.
  • Sign errors in Newton-Raphson. The formula subtracts \(f(x_n)/f'(x_n)\) - a common slip is adding it instead, or miscalculating \(f'(x_n)\) and carrying the error through every later iteration.
  • Using unequal strip widths in the trapezoidal rule. The formula only works with equal-width intervals - if a table has unevenly-spaced x-values, the standard formula can't be applied directly.
  • Getting the over-/under-estimate direction backwards. Concave up (convex) gives an over-estimate; concave down gives an under-estimate - it's easy to state the opposite under exam pressure.

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)\) first so you can see how many solutions exist and roughly where they are.
  2. Rearrange so everything is on one side: \(f(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. \(e^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.

Ready to practise properly?

Numerical methods questions, marked instantly like the real exam.

Quick answers

The questions students on this topic ask most often.

What's the difference between the trapezoidal rule and Newton-Raphson?

The trapezoidal rule estimates the area under a curve (a definite integral) by adding up trapezium areas. Newton-Raphson finds a root of an equation by repeatedly following the tangent line down to the x-axis. They solve different problems - one estimates an area, the other locates a solution.

When does the trapezoidal rule over-estimate or under-estimate?

If the curve is concave up (convex), the straight-line chords sit above the curve, so the trapezoidal rule over-estimates the area. If the curve is concave down, the chords sit below the curve, so it under-estimates.

Why does Newton-Raphson sometimes fail to converge?

Newton-Raphson divides by \(f'(x_n)\), so it fails if the gradient is zero or very small near your starting guess - the next estimate can shoot off far from the root. A poor starting value, especially near a turning point or a point of inflexion, is the usual cause.

Can I use my GDC for numerical methods questions?

Yes - these questions are calculator-permitted on Paper 2. Your GDC has a numerical equation solver and can evaluate definite integrals directly, but you still need to show the trapezoidal or Newton-Raphson method by hand when the question asks for it. See the GDC guide for model-specific instructions.

Sub-topics

Numerical Methods broken down into its individual skills, each with its own focused page.

Related topics

More Calculus topics from the same AI HL syllabus unit, in case you want to keep going.