Solving Equations Numerically

Stage 15 of 23 Strand 4 of 4 3 lessons

3 illustrated lessons, each teaching the why before the how.

Start with Solving Equations by Iteration in the app →
Revise Solving Equations Numerically with flashcards →

Jump to a lesson

Solving Equations by Iteration

Rearrange to x = g(x), then keep substituting.

Rearranging an equation into x = g(x) turns solving it into repeated substitution

Read the full lesson →

move the 4x across
divide by 4

Rearrange until a single x stands alone on the left. The right side is g(x), the expression to iterate.

xyy = xroot

Where y = (x² + 1)/4 meets y = x, the input equals the output. That value of x is a root of the equation.

xy

Go down to the curve, across to the line, and repeat. The steps close in on the crossing.

put x₀ into the right side
put x₁ in
, ,

Feed each answer back in. The values settle on 0.2679, the root of the equation.

Now you

Iterating xₙ₊₁ = (xₙ² + 1)/6 from x₀ = 3, what is x₂?

Iterating xₙ₊₁ = (xₙ² + 4)/4 from x₀ = 3, what is x₂?

The Newton-Raphson Method

Slide down the tangent to the axis.

The tangent at a guess crosses the axis much closer to the root than the guess did

Read the full lesson →

xy
root

Take f(x) = x² − 2 and guess x₀ = 2. Then f(2) = 2, a long way from 0.

xytangent

Follow the tangent down to the x-axis. It crosses at x = 1.5, much nearer the root than 2.

the tangent at the guess
the axis is where y = 0
solve for x

Set y = 0 in the equation of the tangent and solve for x: that is the Newton-Raphson formula.

f(2) = 2 and f′(2) = 4
√2 ≈ 1.4142136

Three steps from a poor guess and the first five decimal places are already right.

Now you

, f'(x) = 2x

f(x) = x² − 8 with x₀ = 3. What is x₁, to 4 decimal places?

, f'(x) = 2x

f(x) = x² − 5 with x₀ = 3. What is x₁, to 4 decimal places?

When Newton-Raphson Fails

A flat tangent has nowhere to send the guess.

A flat or nearly flat tangent sends the next guess far away from the root

Read the full lesson →

xytangent

Guess at the bottom of the curve, a stationary point, and the tangent is horizontal. It never reaches the x-axis.

the tangent is horizontal there
f′(0) = 0nothing can be divided by zerothe fraction has no value

The formula agrees: a flat tangent means f' = 0, and the method cannot divide by zero.

xytangent

A nearly flat tangent is little better: from 1.1 the next guess jumps out to 4.2.

,
f(0) = 2 and f′(0) = −2
straight back to where it began

The method can also cycle: 0 gives 1 and 1 gives 0 again, so the guesses never reach a root.

Now you

xy

A tangent is nearly flat at the guess. What happens to the next guess?

,

f(x) = x³ − 2x + 2 with x₀ = 0. What is x₂?

Continue your journey in the app — save your progress