Newton’s method and pseudocode: VCE Mathematical Methods Units 3 & 4

Loav · VCE Mathematical Methods · Units 3 & 4

D06 · Differential calculus · Current curriculum

Use a tangent to improve a root estimate, trace the iteration accurately, and explain what an algorithm’s stopping rule actually establishes.

1. Turn the equation into a root problem

Newton’s method is a numerical procedure for solving f(x) = 0. If the original equation is g(x) = h(x), define f(x) = g(x) − h(x) first. The derivative in the iteration must be the derivative of that entire difference. A numerical answer should ultimately be checked in the original equation, especially if rearrangement or domain restrictions could introduce misleading candidates.

The method starts from an estimate x₀ and repeatedly constructs a new estimate. It often converges quickly when the starting point is suitably close to an appropriate root, but this is not guaranteed. The initial estimate, the function’s shape and its domain all matter. Graphical information can help locate a suitable starting region; it does not replace verifying the final numerical result.

2. Derive the update from the tangent

At the current estimate xₙ, the tangent to y = f(x) passes through (xₙ, f(xₙ)) and has gradient f′(xₙ). Its equation is y − f(xₙ) = f′(xₙ)(x − xₙ). Newton’s method takes the x-intercept of this tangent as the next estimate. Set y = 0 and solve for x, assuming the gradient is non-zero.

xn+1 = xn − f(xn)/f′(xn)

The correction f(xₙ)/f′(xₙ) combines the current vertical discrepancy with the tangent’s slope. If the function is well approximated by that tangent near the root, the intercept is a better estimate. The curve’s actual root and the tangent’s intercept are not generally identical, so the process repeats. This geometric interpretation also explains why a horizontal tangent creates a problem: it has no useful intercept unless it already lies on the axis.

All values in a single update must use the same current estimate. Calculate f(xₙ) and f′(xₙ), form their quotient and then replace xₙ. Accidentally updating x before evaluating the denominator produces a different algorithm. Writing a separate variable named next is a clear way to keep the sequencing correct.

Worked example 1: approximate a positive square root

Use Newton’s method for x² − 7 = 0, starting at x₀ = 3. Here f(x) = x² − 7 and f′(x) = 2x, so xₙ₊₁ = xₙ − (xₙ² − 7)/(2xₙ) = (xₙ + 7/xₙ)/2.

The first update is x₁ = 3 − 2/6 = 8/3. The second is x₂ = (8/3 + 21/8)/2 = 127/48. Using retained precision gives x₃ ≈ 2.645751312336 and x₄ ≈ 2.645751311065.

Thus the positive root is approximately 2.645751 to six decimal places. The exact root is √7, so this example permits an independent check. The negative root is −√7, but the positive starting value here follows the positive branch. A single Newton run does not claim to have found every root of the equation.

3. Trace iterations without premature rounding

An iteration table should identify the index n, the current estimate xₙ and, when useful, the residual f(xₙ). The starting value is row zero; x₁ is the result of one update. If a question asks for three iterations, distinguish x₃ from a table containing three displayed rows including the starting value. Off-by-one counting is an algorithmic error even when each arithmetic step is correct.

Retain internal precision and round only displayed values or the final answer. Feeding a rounded table entry back into the next update changes the sequence and can stop its improvement. On a calculator, use a stored variable or previous-answer value rather than repeatedly typing a shortened decimal. When exact fractions are manageable, they can document early steps precisely before switching to numerical evaluation.

Worked example 2: an equation with an exponential

Solve e−x = x numerically from x₀ = 0.5. Define f(x) = e−x − x, with f′(x) = −e−x − 1. The update is xₙ₊₁ = xₙ − [e−xₙ − xₙ]/[−e−xₙ − 1].

Newton estimates with unrounded values retained internally
nxₙf(xₙ), approximately
00.5000000000000.106530659713
10.5663110031970.001304509806
20.5671431650350.000000196480
30.567143290410about 4 × 10⁻¹⁵

The root is approximately 0.567143 to six decimal places. Substitution gives e−0.567143290410 ≈ 0.567143290410. Since f′(x) is strictly negative for every real x, f is strictly decreasing and can have at most one root. Moreover f(0) = 1 and f(1) = e−1 − 1 < 0, so continuity establishes a root between 0 and 1. These checks support the numerical result and its uniqueness.

4. Read pseudocode as an exact sequence of instructions

Pseudocode describes an algorithm without depending on a particular programming language. Assignment, such as x ← next, replaces the stored value of x; it is not a permanent algebraic equation. A loop repeats a group of instructions, while a condition determines whether to continue. Trace the stored values in their execution order rather than treating all displayed statements as simultaneous equations.

A fixed-count loop is suitable when a question requests a specified number of Newton updates. A tolerance-based loop is suitable when it requests a stopping condition. In either case, the function and derivative must be defined before use. The following version assumes a positive tolerance and a non-negative integer maximum_passes. It checks the residual, guards against a zero derivative and prevents an unlimited loop. Domain means the domain on which the chosen function and required derivative can be evaluated.

input x, tolerance, maximum_passes
passes ← 0
repeat
    if x is outside the valid domain
        output "Invalid estimate" and stop
    end if
    if |f(x)| ≤ tolerance
        output x, passes, "Residual condition met" and stop
    end if
    if passes = maximum_passes
        output "Iteration limit reached" and stop
    end if
    if f′(x) = 0
        output "Zero derivative" and stop
    end if
    next ← x − f(x)/f′(x)
    x ← next
    passes ← passes + 1
end repeat

The residual test comes before division, so an exact root is accepted even if its derivative also happens to be zero. The count increases after each update. If the next estimate leaves the domain, the next pass stops before trying to evaluate the function there. A practical implementation should also detect numerical overflow or non-finite values rather than treating them as ordinary estimates.

5. Understand what the stopping rule measures

The residual |f(x)| measures how close the function value is to zero. The step |xₙ₊₁ − xₙ| measures how much the estimate changed. Neither is automatically the actual input error |x − α|, where α is the true root. A problem may specify one of these tests; implement the given condition exactly and describe the result in the corresponding terms.

A small residual can coexist with a substantial input error when the function is very flat or scaled by a small constant. A tiny step can indicate successful convergence, but it can also reflect limited numerical precision. Checking both the residual and the stability of displayed digits is useful evidence, while an interval known to contain the root can provide an additional accuracy check. Do not turn a numerical stopping rule into a stronger proof than it supplies.

When a condition is |f(x)| > ε, a negative residual of large magnitude must still trigger another iteration. Using f(x) > ε alone would wrongly accept many estimates lying below the axis. Equivalent logical wording is f(x) > ε or f(x) < −ε. The absolute-value form is usually shorter and less error-prone.

6. Newton’s method can fail without the equation failing

A zero derivative makes the update undefined unless the current point already satisfies the root condition. A very small derivative can create a large jump. An estimate can move outside a logarithm’s or square root’s domain, approach the wrong root, move away from a root or cycle between values. These outcomes describe the chosen iteration, not necessarily whether the original equation has a solution.

Worked example 3: a two-value cycle

Apply Newton’s method to f(x) = x³ − 2x + 2 from x₀ = 0. The derivative is f′(x) = 3x² − 2. At zero, f(0) = 2 and f′(0) = −2, so x₁ = 0 − 2/(−2) = 1.

At one, f(1) = 1 and f′(1) = 1, so x₂ = 1 − 1/1 = 0. The sequence repeats 0, 1, 0, 1, … and does not converge. Both derivative values are non-zero, showing that avoiding division by zero alone does not guarantee success.

The equation does have a root: f(−2) = −2 and f(−1) = 3, so continuity gives a root between −2 and −1. A graph-informed starting estimate in that region is more appropriate. If the task specifically asks you to analyse the run from zero, report its cycle rather than silently replacing the starting value.

7. Report the equation, method and checked conclusion

A complete solution states f and f′, the starting value, the update rule and enough iterations to justify the reported approximation or stopping condition. Finish with the requested rounding and domain. If the run fails, name the observed failure and explain why the update cannot continue or converge as required. Avoid reporting the last displayed estimate as a root merely because an iteration limit was reached.

Technology can automate repeated substitution, but it does not choose the intended root, interpret the original context or certify every displayed decimal on its own. Check the result against the original equation and any contextual restrictions. These steps make a numerical method a mathematical solution rather than just a sequence of calculator outputs.

One Newton step uses the tangent interceptFor f(x) = x² − 7, the tangent at x₀ = 3 is y = 6x − 16. Its x-intercept x₁ = 8/3 is the next estimate; it lies near, but does not equal, the root √7.2-32.3-1.22.60.62.92.43.24.23.56Current pointx₁ = 8/3Green: functionOrange: tangent at x₀ = 3x
For f(x) = x² − 7, the tangent at x₀ = 3 is y = 6x − 16. Its x-intercept x₁ = 8/3 is the next estimate; it lies near, but does not equal, the root √7.

Practice: seven original questions

  1. For f(x) = x² − 11 and x₀ = 3, write the Newton update and find x₁ and x₂ exactly.
  2. For f(x) = x³ − x − 3 and x₀ = 1.5, find the first Newton estimate exactly and approximately.
  3. For ln x = 1 with x₀ = 2, derive the update, calculate x₁ and state the domain restriction.
  4. Explain what happens when Newton’s method is started at x₀ = 0 for x³ − 4 = 0. Does this prove that no real root exists?
  5. An algorithm repeats while f(x) > 0.001. Explain why this can stop incorrectly and write a suitable absolute-residual condition.
  6. Apply Newton’s method to x³ − 5 = 0 from x₀ = 2. Stop at the first estimate satisfying |f(x)| ≤ 0.01. State the number of updates and the stopping estimate.
  7. For f(x) = 10−6(x − 1000), the estimate x = 0 satisfies |f(x)| < 0.01. Explain why this does not mean the input estimate is accurate to 0.01.
Worked answers and reasoning
  1. f′(x) = 2x, so xₙ₊₁ = (xₙ + 11/xₙ)/2, requiring xₙ ≠ 0. From 3, x₁ = (3 + 11/3)/2 = 10/3. Then x₂ = (10/3 + 33/10)/2 = 199/60. These are successive estimates of the positive root, with no intermediate rounding.
  2. f(3/2) = −9/8 and f′(3/2) = 23/4. Thus x₁ = 3/2 − (−9/8)/(23/4) = 3/2 + 9/46 = 39/23 ≈ 1.695652174. Both the numerator and denominator must be evaluated at the same starting input.
  3. Set f(x) = ln x − 1, so f′(x) = 1/x. The update is xₙ₊₁ = xₙ − xₙ(ln xₙ − 1). At x₀ = 2, x₁ = 4 − 2 ln 2 ≈ 2.613705639. Every estimate used in the real logarithm must be positive; a later non-positive estimate would invalidate the run.
  4. f(0) = −4 but f′(0) = 3(0)² = 0. The update requires division by zero and cannot proceed from this starting value. The equation still has the real root ∛4. Failure of this initial tangent is a failure of the chosen run, not a non-existence proof.
  5. A residual such as −2 is not greater than 0.001, so the loop would stop despite being far from zero in function value. Continue while |f(x)| > 0.001, subject to the domain, derivative and iteration safeguards. This treats positive and negative residuals symmetrically.
  6. The update is xₙ₊₁ = xₙ − (xₙ³ − 5)/(3xₙ²). The first estimate is x₁ = 1.75 with residual 0.359375. The second is x₂ ≈ 1.710884353741 with residual approximately 0.007972829096. The specified condition is first met after two updates. This is the stopping estimate, not a claim that all its displayed digits are correct root digits.
  7. The true root is 1000, so x = 0 has input error 1000. Its residual is only −0.001 because the whole function is multiplied by 10−6. A residual tolerance controls function-value discrepancy, whose scale depends on the function. It does not automatically impose the same numerical tolerance on x.

Curriculum and further study

Aligned to the current VCAA VCE Mathematics Study Design, Mathematical Methods Units 3 and 4, Calculus area of study and relevant outcome knowledge and skills. The VCAA Mathematical Methods FAQ, updated February 2026, clarifies inflection points and strict increasing or decreasing behaviour. See the VCAA pseudocode guidance for algorithm conventions and applications. Curriculum checked 15 October 2026. Unit 3 is the suggested teaching sequence; the official design specifies combined Units 3 and 4 coverage.

Further study: Evans, Lipson and Greenwood, Cambridge Senior Mathematics VCE: Mathematical Methods Units 3 & 4, second edition (2023), sections 10H, 12D and Appendix A. Independent Loav teaching material, not a VCAA or Cambridge publication. Explanations, worked examples, practice questions, answers and diagrams are original.