Solving Equations Numerically

Stage 15 of 23 Strand 4 of 4 3 lessons

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

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

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

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

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

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

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

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

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

Three steps from a poor guess and the answer is right to six decimal places.

Now you

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

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

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

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

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

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

Now you

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