Numerical methods in context

Numerical methods in context

Spec 9.5 · Edexcel A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Model the situation: define the variable, write the relationship and rearrange to f(x)=0f(x)=0.
  • Keep the domain from the context in mind.
  • Locate a root by a sign change of a continuous ff; trap it in an interval to the accuracy asked.
  • Rearrange to x=g(x)x=g(x) and iterate; a limit α\alpha satisfies α=g(α)\alpha=g(\alpha).
  • Convergence needs ∣g′(α)∣<1|g'(\alpha)|<1. Give the answer in context, with units.

From a context to an equation

Define the variable, write the relationship and move everything to one side.

Many real problems end in an equation that cannot be solved by algebra, such as x3−4x−7=0x^3-4x-7=0 or t=5e−0.4tt=5\mathrm{e}^{-0.4t}. First model the situation, then state the domain.

Open box from a 3030 cm by 2020 cm sheet, squares of side xx removed: V=x(30−2x)(20−2x)=4x3−100x2+600xV=x(30-2x)(20-2x)=4x^3-100x^2+600x.

  1. 1

    Define

    Say what the variable means.

  2. 2

    Relate

    Write the relationship between the quantities.

  3. 3

    Rearrange

    Move everything to one side to make f(x) = 0.

  4. 4

    Domain

    State the sensible range for the variable.

Setting up the equation

Worked example

Form an equation for a box volume of 900900 cm³.

Why does the box problem need 0<x<100<x<10?

Locating a root

Show a change of sign of a continuous function, then trap the root in an interval to the accuracy asked.

If ff is continuous and changes sign on [a,b][a,b], there is a root there. State the values, the continuity and the conclusion. For f(x)=x3−4x−7f(x)=x^3-4x-7, f(2)=−7f(2)=-7 and f(3)=8f(3)=8.

For the box, f(2.295)<0f(2.295)<0 and f(2.305)>0f(2.305)>0 give x=2.30x=2.30. A discontinuity, such as f(x)=1xf(x)=\frac1x on [−1,1][-1,1], can fake a sign change.

12345678910−250−200−150−100−5050100xyx ≈ 2.30x ≈ 5.77y = x³ − 25x² + 150x − 225
The box equation crosses the x-axis at about 2.30 and 5.77.

f(x)=1xf(x)=\frac1x has f(−1)=−1f(-1)=-1 and f(1)=1f(1)=1. Is there a root in [−1,1][-1,1]?

Iteration formulae

Rearrange f(x)=0f(x)=0 into x=g(x)x=g(x); if xn+1=g(xn)x_{n+1}=g(x_n) converges, it converges to a root α=g(α)\alpha=g(\alpha).

Use the iterative formula xn+1=g(xn)x_{n+1}=g(x_n) from a starting value x0x_0. The same equation can be rearranged in several ways. From x3−4x−7=0x^3-4x-7=0: x=4x+73x=\sqrt[3]{4x+7}, x=4+7xx=\sqrt{4+\frac7x} or x=x3−74x=\frac{x^3-7}{4}.

Show each step of a rearrangement in a ‘show that’ question.

0.511.522.533.540.511.522.533.54xyα ≈ 2.589y = xy = ∛(4x + 7)
The root of x³ − 4x − 7 = 0 is where y = x meets y = ∛(4x + 7), at x ≈ 2.589
  • Limit α\alphaα=g(α)\alpha=g(\alpha)

Worked example

Use xn+1=4xn+73x_{n+1}=\sqrt[3]{4x_n+7} with x0=2x_0=2.

If xn+1=g(xn)x_{n+1}=g(x_n) converges to α\alpha, what is true of α\alpha?

Convergence and choosing a rearrangement

The sequence converges to α\alpha when ∣g′(α)∣<1|g'(\alpha)|<1.

A positive gradient gives a staircase approaching from one side; a negative gradient gives a cobweb spiralling in.

For θ−sin⁡θ=0.6\theta-\sin\theta=0.6, use θn+1=0.6+sin⁡θn\theta_{n+1}=0.6+\sin\theta_n. Here g′=cos⁡θ≈0g'=\cos\theta\approx0 near 1.61.6, so it converges quickly: 1.5→1.5975→1.59961.5\to1.5975\to1.5996. But x=x3−74x=\frac{x^3-7}{4} has a large gradient near the root and diverges.

0.511.522.530.511.522.53xyθ ≈ 1.6y = xy = 0.6 + sin x
g(x) = 0.6 + sin x is shallow at the root, so the iteration converges quickly (θ ≈ 1.6)

Staircase

  • 0<g′<10<g'<1
  • One side

Cobweb

  • −1<g′<0-1<g'<0
  • Alternating

Diverges

  • ∣g′∣>1|g'|>1
  • Moves away

For x=x3−74x=\frac{x^3-7}{4}, g′(x)=3x24g'(x)=\frac{3x^2}{4}. At x≈2.59x\approx2.59 what happens?

Solving a contextual problem

Locate the root, iterate, then state the answer with its meaning and units.

For t=5e−0.4tt=5\mathrm{e}^{-0.4t} take f(t)=t−5e−0.4tf(t)=t-5\mathrm{e}^{-0.4t}. Always give the final answer in the units and with the meaning of the context.

0.511.522.533.54−5−4−3−2−1123xy(2, −0.247)(3, 1.494)α ≈ 2.13y = t − 5e^(−0.4t)
f(t) = t − 5e^(−0.4t) crosses zero near t = 2.13.

Worked example

Solve t=5e−0.4tt=5\mathrm{e}^{-0.4t}, where tt is in hours.

Why does the iteration for tt oscillate either side of the root?

Try an exam question

Show that x3−4x−7=0x^3-4x-7=0 has a root between 22 and 33, and use xn+1=4xn+73x_{n+1}=\sqrt[3]{4x_n+7} with x0=2x_0=2 to find x1x_1 and x2x_2 to 3 decimal places.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which statement correctly justifies that f(x)=0f(x)=0 has a root between x=2x=2 and x=3x=3?

1 mark, marked against the mark scheme

Revision notes