← 2017 Paper 2

UPSC 2017 Maths Optional Paper 2 Q8b — Step-by-Step Solution

15 marks · Section B

Newton-Raphson method (convergence, geometric meaning) · Numerical Analysis · asked 6× in 13 yrs · Read the full method →

Question

Write an algorithm in the form of a flow chart for Newton–Raphson method. Describe the cases of failure of this method.

Technique

State the iteration xn+1=xnf(xn)/f(xn)x_{n+1}=x_n-f(x_n)/f'(x_n); draw the flow chart (read → compute f,ff,f' → check f=0f'=0 → update → convergence test → loop/stop); enumerate failure modes.

Solution

Method. To solve f(x)=0f(x)=0, the Newton–Raphson iteration is

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

starting from an initial guess x0x_0, derived from the tangent line to y=f(x)y=f(x) at xnx_n meeting the xx-axis.

Step 1 — Algorithm (flow chart)

        ┌─────────────────────────────┐
        │            START            │
        └──────────────┬──────────────┘

   ┌───────────────────────────────────────────┐
   │  READ initial guess x0, tolerance ε,        │
   │       max iterations N                       │
   └──────────────────────┬──────────────────────┘

                   ┌─────────────┐
                   │  n ← 0       │
                   └──────┬──────┘

            ┌───────────────────────────┐
            │  Compute f(xn), f′(xn)     │
            └─────────────┬─────────────┘

                 ╱───────────────╲
                ╱  is f′(xn) = 0 ? ╲ ── yes ──►  PRINT "Failure:
                ╲   (or |f′|<δ)   ╱                derivative ≈ 0";  STOP
                 ╲───────┬───────╱
                         │ no

        ┌────────────────────────────────────┐
        │  x_{n+1} ← xn − f(xn)/f′(xn)        │
        └─────────────────┬──────────────────┘

              ╱──────────────────────╲
             ╱ |x_{n+1} − xn| < ε   ? ╲ ── yes ──►  PRINT root x_{n+1};  STOP
              ╲   (or |f(x_{n+1})|<ε) ╱
               ╲──────────┬──────────╱
                          │ no

              ╱──────────────────────╲
             ╱     n + 1 ≥ N  ?       ╲ ── yes ──►  PRINT "No convergence
              ╲                       ╱                in N iterations"; STOP
               ╲──────────┬──────────╱
                          │ no

                 ┌──────────────────┐
                 │ xn ← x_{n+1};     │
                 │ n ← n + 1         │ ──┐
                 └──────────────────┘   │
                          ▲             │
                          └─────────────┘  (loop back to "Compute f(xn), f′(xn)")

Step 2 — Cases of failure

  1. Zero (or near-zero) derivative, f(xn)=0f'(x_n)=0. The tangent is horizontal, so xn+1=xnf/fx_{n+1}=x_n-f/f' involves division by zero — the next iterate flies off to infinity. Even f(xn)0f'(x_n)\approx0 causes a huge, erratic jump. (Occurs near a turning point/extremum of ff.)

  2. Bad initial guess (far from the root). Convergence is only local; if x0x_0 is not close enough, the iteration may diverge or converge to a different root than intended.

  3. Divergence / overshoot. For functions whose curvature is unfavourable, successive tangents push the iterate further from the root, e.g. f(x)=x1/3f(x)=x^{1/3} from any x00x_0\ne0 gives xn+1=2xnx_{n+1}=-2x_n — the iterates double in magnitude and diverge.

  4. Oscillation (cycling). The iterates can fall into a repeating cycle x0x1x0x_0\to x_1\to x_0\to\cdots and never settle, when the geometry maps a point back to itself after a step or two.

  5. Root of multiplicity >1>1. At a multiple root ff and ff' vanish together; convergence degrades from quadratic to merely linear (slow), and round-off near f0f'\approx0 can stall the process.

  6. Discontinuity / non-differentiability of ff or ff' near the root invalidates the tangent construction.

Verification

python3 (illustrations):
  f(x)=x²−2, x0=1:   1 → 1.5 → 1.41667 → 1.414216 → 1.4142136  (quadratic) ✓
  f(x)=x^{1/3}, x0=1: 1 → −2 → 4 → −8 → 16 ...   (diverges, x_{n+1}=−2x_n) ✓ (failure)
  f(x)=x³−2x+2, x0=0: 0 → 1 → 0 → 1 → ...        (2-cycle, oscillation)   ✓ (failure)
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.