The math optional, made finite. Daily Practice

Newton-Raphson method (convergence, geometric meaning)

At a Glance

Why This Chapter Matters

Newton-Raphson appears in 6 of the last 13 years — always in Section B, compulsory Q5 or an optional in Q7–Q8. Four of the six questions are straightforward numerical root-finding (2–3 iterations to 4 decimal places); the remaining two ask for the algorithm/flowchart and the cases of failure. The 20-mark question (2013) asks you to write a complete algorithm with three safeguards. Knowing the standard iteration xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n)/f'(x_n) and the three failure modes covers every question in this atom.

Minimum Theory

The iteration. To solve f(x)=0f(x) = 0, starting from an initial guess x0x_0: xn+1=xnf(xn)f(xn),n=0,1,2,x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}, \qquad n = 0, 1, 2, \ldots

Geometric meaning. At the current iterate xnx_n, draw the tangent to y=f(x)y = f(x). The tangent line yf(xn)=f(xn)(xxn)y - f(x_n) = f'(x_n)(x - x_n) crosses the xx-axis at xn+1x_{n+1}. The method replaces the curve by its tangent and finds where the tangent meets the xx-axis.

Newton-Raphson: tangent at (x_n, f(x_n)) crosses the x-axis at x_{n+1}, giving quadratic convergence to the root \alpha.

Convergence. Near a simple root α\alpha (where f(α)=0f(\alpha)=0, f(α)0f'(\alpha)\neq 0), the method has quadratic convergence: xn+1αMxnα2,M=maxf2minf near α.|x_{n+1} - \alpha| \le M|x_n - \alpha|^2, \quad M = \frac{\max|f''|}{2\min|f'|} \text{ near } \alpha. In practice: once the iterate is close, the number of correct decimal digits roughly doubles each step. Three to four iterations are enough for 4–8 significant figures.

Three safeguards (required in algorithm questions).

  1. Derivative bound: if f(xn)<δ|f'(x_n)| < \delta (user-supplied lower bound), the update would divide by nearly zero — abort and report failure.
  2. Iteration cap: after nmaxn_{\max} iterations without convergence, exit with a warning.
  3. Relative tolerance: convergence declared when xn+1xnεxn+1|x_{n+1} - x_n| \le \varepsilon|x_{n+1}| (relative form, not absolute, to handle roots of very different magnitudes).

Cases of failure.

Failure modeCauseExample
Division by zerof(xn)0f'(x_n) \approx 0 (extremum of ff near iterate)Tangent horizontal
DivergenceBad initial guess; curvature pulls iterate awayf(x)=x1/3f(x) = x^{1/3}: xn+1=2xnx_{n+1} = -2x_n
OscillationIterate cycles between two valuesf(x)=arctanxf(x) = \arctan x, large x0x_0
Slow convergenceMultiple root (ff and ff' both vanish at root)Linear convergence instead of quadratic
Wrong rootInitial guess in basin of a different rootMust check the found root

Question Archetypes

ArchetypeYou are seeing this when…
newton-raphson-root”Apply Newton-Raphson to find a root … correct to kk decimal places.”
newton-raphson-algorithm”Develop an algorithm / write a flow chart … describe cases of failure.”

newton-raphson-root (4 question(s); 2014, 2019, 2020, 2021)

Recognition Cues

Solution Template

  1. Define f(x)f(x). Rewrite the equation as f(x)=LHSRHS=0f(x) = \text{LHS} - \text{RHS} = 0.
  2. Compute f(x)f'(x). Apply product rule, chain rule carefully; watch for log10\log_{10} vs ln\ln.
  3. Bracket the root. Evaluate ff at a few integers/simple fractions to find a sign change. Quote: “By IVT, a root exists in (a,b)(a, b).” Start with x0x_0 near the midpoint of the bracket.
  4. Iterate. Apply xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n)/f'(x_n). Carry at least 5–6 significant figures internally.
  5. Stop when successive iterates agree to the required decimal places. State the final answer rounded to the requested precision.

Worked Example(s)

2014 Paper 2, 2014-P2-Q5b (10 marks)

Apply Newton-Raphson to determine a root of cosxxex=0\cos x - xe^x = 0 correct to four decimal places.

f(x)=cosxxexf(x) = \cos x - xe^x, f(x)=sinx(1+x)ex\quad f'(x) = -\sin x - (1 + x)e^x.

Bracket: f(0)=1>0f(0) = 1 > 0, f(1)=cos1e2.18<0f(1) = \cos 1 - e \approx -2.18 < 0. Root in (0,1)(0,1). Refine: f(0.5)0.053>0f(0.5) \approx 0.053 > 0. Start x0=0.5x_0 = 0.5.

nnxnx_nf(xn)f(x_n)f(xn)f'(x_n)xn+1x_{n+1}
00.50000.05322−2.95250.51803
10.51803−0.00081−3.043580.51776
20.51776≈ 0converged

x0.5178.\boxed{x \approx 0.5178.}

Key trap: f(x)=sinxexxex=sinx(1+x)exf'(x) = -\sin x - e^x - xe^x = -\sin x - (1+x)e^x. The product rule on xexxe^x is easily forgotten.

2019 Paper 2, 2019-P2-Q5b (10 marks)

Apply Newton-Raphson to find a real root of xlog10x=1.2x\log_{10} x = 1.2, correct to three decimal places.

f(x)=xlog10x1.2f(x) = x\log_{10} x - 1.2, f(x)=log10x+1ln10=log10x+0.43429\quad f'(x) = \log_{10} x + \dfrac{1}{\ln 10} = \log_{10} x + 0.43429.

Bracket: f(2)=2(0.30103)1.2=0.598<0f(2) = 2(0.30103) - 1.2 = -0.598 < 0, f(3)=3(0.47712)1.2=+0.231>0f(3) = 3(0.47712) - 1.2 = +0.231 > 0. Start x0=2.5x_0 = 2.5.

nnxnx_nf(xn)f(x_n)f(xn)f'(x_n)xn+1x_{n+1}
02.5000−0.205150.832232.74650
12.746500.005110.873052.74065
22.74065≈ 0converged

x2.741 (to 3 d.p.).\boxed{x \approx 2.741 \text{ (to 3 d.p.)}.}

Key trap: The derivative of xlog10xx\log_{10} x uses ddxlog10x=1xln10\dfrac{d}{dx}\log_{10} x = \dfrac{1}{x\ln 10}, contributing the modulus M=1/ln10=0.43429M = 1/\ln 10 = 0.43429. Dropping this gives a wrong ff'.

2020 Paper 2, 2020-P2-Q5b (10 marks)

Show that f(x)=cosπ(x+1)8+0.148x0.9062=0f(x) = \cos\tfrac{\pi(x+1)}{8} + 0.148x - 0.9062 = 0 has a root in (1,0)(-1,0) and in (0,1)(0,1). Calculate the negative root to four decimal places by Newton-Raphson.

Existence: f(1)=cos00.1480.9062=0.0542<0f(-1) = \cos 0 - 0.148 - 0.9062 = -0.0542 < 0; f(0)=cos(π/8)0.9062=+0.0177>0f(0) = \cos(\pi/8) - 0.9062 = +0.0177 > 0; f(1)=cos(π/4)+0.1480.9062=0.0511<0f(1) = \cos(\pi/4) + 0.148 - 0.9062 = -0.0511 < 0. Sign changes at (1,0)(-1,0) and (0,1)(0,1) confirm two roots by IVT.

f(x)=π8sinπ(x+1)8+0.148f'(x) = -\dfrac{\pi}{8}\sin\dfrac{\pi(x+1)}{8} + 0.148.

Start x0=0.5x_0 = -0.5 for the negative root:

nnxnx_nf(xn)f(x_n)f(xn)f'(x_n)xn+1x_{n+1}
0−0.500000+0.0005850.071388−0.508199
1−0.508199−0.0000050.072629−0.508129
2−0.508129≈ 0converged

x0.5081.\boxed{x \approx -0.5081.}

2021 Paper 2, 2021-P2-Q5b (10 marks)

Find the positive root of 3x=1+cosx3x = 1 + \cos x to 8 significant figures using Newton-Raphson.

f(x)=3x1cosxf(x) = 3x - 1 - \cos x, f(x)=3+sinx\quad f'(x) = 3 + \sin x.

Bracket: f(0)=2<0f(0) = -2 < 0, f(π/2)+3.71>0f(\pi/2) \approx +3.71 > 0. Linear interpolation gives x00.55x_0 \approx 0.55.

nnxnx_nf(xn)f(x_n)f(xn)f'(x_n)xn+1x_{n+1}
00.5500−0.20253.52270.60749
10.60749+0.001363.570820.60711
20.60711≈ −0.000013.570640.60711

Further iteration: x0.60710165x \approx 0.60710165 (converged to 8 significant figures).

x0.60710165.\boxed{x \approx 0.60710165.}

Common Traps


newton-raphson-algorithm (2 question(s); 2013, 2017)

Recognition Cues

Solution Template

  1. State the iteration formula xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n)/f'(x_n) and its geometric basis (tangent at xnx_n meets xx-axis at xn+1x_{n+1}).
  2. Write the algorithm with all three safeguards:
    • Input: x0x_0, nmaxn_{\max}, ε\varepsilon (relative tolerance), δ\delta (derivative lower bound).
    • For k=1,,nmaxk = 1, \ldots, n_{\max}: evaluate ff, ff'; if f<δ|f'| < \delta abort; compute xnewx_{\text{new}}; if xnewxoldεxnew|x_{\text{new}} - x_{\text{old}}| \le \varepsilon|x_{\text{new}}| declare convergence.
    • If loop exhausted: output warning.
  3. For a flow chart: include two decision boxes — ”f(xn)<δ|f'(x_n)| < \delta?” and “converged?” — before the iteration cap check.
  4. Enumerate all failure modes (see table in Minimum Theory). Quote a concrete divergence example (f(x)=x1/3f(x) = x^{1/3}, where xn+1=2xnx_{n+1} = -2x_n) and an oscillation example. Distinguish failure from slow convergence at a multiple root.

Worked Example(s)

2013 Paper 2, 2013-P2-Q7a (20 marks)

Develop an algorithm for Newton-Raphson to solve f(x)=0f(x) = 0, starting from x0x_0, with nn iterations allowed, relative error eps, derivative bound delta.

INPUT:  f, f'              (function and derivative)
        x0                 (initial iterate)
        n                  (maximum iterations)
        eps                (relative convergence tolerance)
        delta              (lower bound on |f'|)

1. x_prev ← x0;  converged ← FALSE

2. FOR k = 1, 2, ..., n DO:
   2.1  f_val  ← f(x_prev);   fp_val ← f'(x_prev)
   2.2  IF |fp_val| < delta THEN
            PRINT "Derivative too small at step k — method fails"; EXIT
   2.3  x_curr ← x_prev − f_val / fp_val
   2.4  IF |x_curr − x_prev| ≤ eps · |x_curr| THEN
            converged ← TRUE; EXIT loop
   2.5  x_prev ← x_curr
   END FOR

3. IF converged: OUTPUT x_curr   (success)
   ELSE:         PRINT "No convergence in n iterations"; OUTPUT x_curr (warning)

Explanation of safeguards:

Convergence property: near a simple root α\alpha, errors satisfy en+1Men2|e_{n+1}| \le M|e_n|^2, so the number of correct digits roughly doubles each step. Two iterations starting from x0=1.5x_0 = 1.5 for f(x)=x22f(x) = x^2 - 2: x1=1.416x_1 = 1.4\overline{16}, x2=1.41421x_2 = 1.41421\ldots — four more correct digits in one step.

2017 Paper 2, 2017-P2-Q8b (15 marks)

Write a flow chart for Newton-Raphson method. Describe the cases of failure.

Flow chart (text representation):

START


READ x0, ε, δ, N


n ← 0

  ▼  ┌────────────────────────────────┐
  └──►  Compute f(xn) and f'(xn)      │
        │                              │
        ▼                              │
   |f'(xn)| < δ ? ──YES──► PRINT "f'≈0, method fails"; STOP
        │ NO

   x_{n+1} ← xn − f(xn)/f'(xn)


   |x_{n+1} − xn| < ε ? ──YES──► PRINT root x_{n+1}; STOP
        │ NO

   n + 1 ≥ N ? ──YES──► PRINT "no convergence in N steps"; STOP
        │ NO

   xn ← x_{n+1}; n ← n + 1

        └──────────────────────────────┘

Cases of failure:

  1. Zero/near-zero derivative (f(xn)0|f'(x_n)| \approx 0): the tangent is horizontal; xn+1=xnf/fx_{n+1} = x_n - f/f' flies off to infinity. Occurs when the iterate lands near a turning point of ff.

  2. Divergence from bad initial guess: convergence is only local. For f(x)=x1/3f(x) = x^{1/3}, the derivative f(x)=13x2/3f'(x) = \tfrac{1}{3}x^{-2/3}, so xn+1=xnxn1/3/(13xn2/3)=xn3xn=2xnx_{n+1} = x_n - x_n^{1/3}/(\tfrac{1}{3}x_n^{-2/3}) = x_n - 3x_n = -2x_n. The iterate doubles in magnitude and diverges.

  3. Oscillation (cycling): for f(x)=x32x+2f(x) = x^3 - 2x + 2 with x0=0x_0 = 0: x1=1x_1 = 1, x2=0x_2 = 0, x3=1x_3 = 1, \ldots — a 2-cycle with no convergence.

  4. Multiple root: if f(α)=f(α)=0f(\alpha) = f'(\alpha) = 0, convergence degrades from quadratic to linear (slow). Round-off near f(xn)0f'(x_n) \approx 0 can stall convergence entirely.

  5. Non-differentiability: the tangent construction is invalid if ff is not differentiable near the root.

Common Traps

Marks-Aware Writing

10-mark root-finding question: 4–5 lines of iteration table, with f(xn)f(x_n), f(xn)f'(x_n), xn+1x_{n+1} shown. State the bracket (IVT) before starting. End with the root rounded to the requested precision. Do not truncate — 2.740652.74065 rounded to 3 d.p. is 2.7412.741.

15-mark algorithm/flowchart: the flowchart earns about half the marks; the failure modes earn the other half. Name each failure mode, give its cause, and quote a concrete example for at least divergence and oscillation.

20-mark algorithm (2013 style): write pseudocode with all variable names, the three safeguards explicitly labelled (derivative bound, relative tolerance, iteration cap), a step-by-step explanation, and a brief discussion of quadratic convergence and its caveats.

Practice Set

We've mapped all 13 years of this exam. Get new chapters, tools, and solutions as we release them — free.