Foundations to Frontier
Tests
A. Mathematical Foundations › A8 Numerical Methods and Scientific Computing

Root Finding: Bisection, Newton–Raphson and Friends

Solving f(x) = 0 is everywhere: equilibrium points, inverse kinematics, implicit time steps, orbit propagation. This topic covers bisection (guaranteed, linear), Newton–Raphson (quadratic near a simple root, but fragile), the secant method (superlinear, derivative-free) and safeguarded hybrids such as Brent's method. You will prove the convergence rates, measure them experimentally, see Newton diverge and fix it with a bracket, and solve Kepler's equation for highly eccentric orbits, where the starting guess decides between 9 iterations and failure.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Higher or lower?

In the game “guess my number between 1 and 100”, the smart strategy is to guess 50, then 25 or 75, halving the range each time. That’s bisection, and it always works. If you also know which way and how steeply the answer changes, you can jump much closer each time. That’s Newton’s method: blindingly fast when you start nearby, but liable to fly off if you start in the wrong place.

Hunting for a root
012
|error|: 9.1e-1 → 2.7e-1 → 3.3e-2
Bisection halves a sign-change bracket: guaranteed, but only one bit per step. Newton follows the tangent; near a simple root the number of correct digits doubles each step, but from a poor start (try atan from x₀ = 1.5) it can overshoot and diverge. The secant method replaces the derivative with a slope through the last two points, at order ≈ 1.618. Robust solvers (Brent, safeguarded Newton) combine a bracket with fast steps.
Why engineers care

Every orbit propagator solves Kepler’s equation; every implicit integrator solves a nonlinear system each step; inverse kinematics and trajectory shooting are root-finding problems. Robustness matters: a solver that diverges on board can’t be restarted by hand.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Bisection on [0, 1] after 10 steps narrows the root to an interval of length…
  2. 2. Newton's method uses…
  3. 3. Which method is guaranteed to converge given a sign change?

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

Bisection

If ff is continuous and f(a)f(b)<0f(a)f(b) < 0, a root lies in [a,b][a, b]. Halve the interval, keeping the half with the sign change. After kk steps the error is at most (b−a)/2k+1(b - a)/2^{k+1}. For tolerance τ\tau you need ⌈log⁡2((b−a)/τ)⌉\lceil\log_2((b - a)/\tau)\rceil steps.

Newton–Raphson

Linearize at xkx_k and solve the linear model:

xk+1=xk−f(xk)f′(xk)x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)}

Secant

Replace f′f' by the slope through the last two iterates:

xk+1=xk−f(xk)xk−xk−1f(xk)−f(xk−1)x_{k+1} = x_k - f(x_k)\frac{x_k - x_{k-1}}{f(x_k) - f(x_{k-1})}
📝 Quick check (Level 1)
0/3 answered
  1. 1. Bisection steps to shrink [0, 1] below 10⁻⁶:
  2. 2. One Newton step for x² − 2 from x = 1 gives…
  3. 3. The secant method needs…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

Orders of convergence

With error ek=xk−re_k = x_k - r, convergence has order pp if ∣ek+1∣≈C∣ek∣p\lvert e_{k+1}\rvert\approx C\lvert e_k\rvert^p.

Method Order Cost per step Guarantee
Bisection 1 (C = ½) 1 f yes, with a bracket
Secant 1.618 1 f local only
Newton 2 f and f′ local only

Measure the order from data with p≈log⁡(ek+1/ek)/log⁡(ek/ek−1)p\approx\log(e_{k+1}/e_k)/\log(e_k/e_{k-1}).

Failure modes and safeguards

Newton can diverge (e.g. arctan⁡x\arctan x from ∣x0∣≳1.39\lvert x_0\rvert\gtrsim1.39), cycle, or stall where f′≈0f'\approx0. At a root of multiplicity mm it slows to linear convergence. Safeguarded Newton keeps a bracket and falls back to bisection whenever the Newton step leaves it. Brent’s method (1973) combines bisection, secant and inverse quadratic interpolation; it’s the default in SciPy (brentq).

🐍 Exercise 1: three root finders and their rates
Implement bisection, Newton, secant and a safeguarded Newton. On x³ − 2x − 5 = 0, measure the convergence orders. Show plain Newton diverging on atan(x) and the safeguarded version converging.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The secant method's order is…
  2. 2. At a double root, Newton converges…
  3. 3. Brent's method combines…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Quadratic convergence of Newton

Taylor-expand about xkx_k: 0=f(r)=f(xk)+f′(xk)(r−xk)+12f′′(ξ)(r−xk)20 = f(r) = f(x_k) + f'(x_k)(r - x_k) + \frac12f''(\xi)(r - x_k)^2. Divide by f′(xk)f'(x_k) and use the Newton update:

ek+1=f′′(ξ)2f′(xk)ek2e_{k+1} = \frac{f''(\xi)}{2f'(x_k)}e_k^2

So if f′(r)≠0f'(r)\ne0 and x0x_0 is close enough, ∣ek+1∣≤C∣ek∣2\lvert e_{k+1}\rvert\le C\lvert e_k\rvert^2. ∎

Secant order

A similar expansion gives ek+1≈Cekek−1e_{k+1}\approx Ce_ke_{k-1}. Trying ∣ek+1∣∼∣ek∣p\lvert e_{k+1}\rvert\sim\lvert e_k\rvert^p gives p2=p+1p^2 = p + 1, so p=(1+5)/2p = (1 + \sqrt5)/2. ∎

Efficiency

Per function evaluation, the secant method’s efficiency index 1.61811.618^1 beats Newton’s 21/2≈1.4142^{1/2}\approx1.414 when f′f' costs as much as ff.

Exercise 3.1: Newton for √a

With f=x2−af = x^2 - a, the update is xk+1=12(xk+a/xk)x_{k+1} = \frac12(x_k + a/x_k). That’s Heron’s method; from x0=1x_0 = 1, a=2a = 2: 1.5, 1.41667, 1.4142157, …

📝 Quick check (Level 3)
0/3 answered
  1. 1. Newton's error recursion is e_(k+1) ≈
  2. 2. The secant order solves…
  3. 3. Newton for √2 from x₀ = 1, second iterate:

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

Kepler’s equation for eccentric orbits

To propagate an elliptical orbit, solve M=E−esin⁡EM = E - e\sin E for the eccentric anomaly EE at each time. Newton’s update is E←E−(E−esin⁡E−M)/(1−ecos⁡E)E\leftarrow E - (E - e\sin E - M)/(1 - e\cos E). For near-circular orbits, E0=ME_0 = M works in 3 iterations. For a highly eccentric orbit (e = 0.99, as for comets, Molniya-like or high-apogee transfer orbits), E0=ME_0 = M sometimes lands where 1−ecos⁡E≈01 - e\cos E\approx0 and Newton diverges. Starting from E0=πE_0 = \pi (Danby, 1987; Charles and Tatum, 1998) converges for every M in at most 9 iterations.

🐍 Exercise 2 (research): robust Kepler solver
Solve Kepler's equation with vectorized Newton for 2000 mean anomalies at e = 0.1–0.99. Compare a naive start with a robust start, count iterations and failures, and convert to true anomaly.

Root finding in AI, robotics and aerospace

  • Orbit mechanics: Kepler and Lambert solvers (Izzo, 2015) are the core of mission design and onboard propagators.
  • Implicit integration and constrained dynamics: Newton iterations inside implicit Runge–Kutta, BDF and contact solvers (a8-9).
  • Inverse kinematics: Newton or Gauss–Newton on the pose error with Jacobians from a8-4 and a8-5.
  • Optimization: Newton’s method for optimization is root finding on ∇f=0\nabla f = 0 (A6). Line searches use bracketing.

References

  1. R. Brent (1973). Algorithms for Minimization without Derivatives. Prentice Hall.
  2. J. Nocedal, S. Wright (2006). Numerical Optimization, 2nd ed. Springer. Ch. 11.
  3. R. Burden, J. Faires (2010). Numerical Analysis, 9th ed. Brooks/Cole. Ch. 2.
  4. J. M. A. Danby (1987). “The solution of Kepler’s equation, III.” Celestial Mechanics, 40.
  5. E. Charles, J. Tatum (1998). “The convergence of Newton–Raphson iteration with Kepler’s equation.” Celestial Mechanics and Dynamical Astronomy, 69.
  6. D. Izzo (2015). “Revisiting Lambert’s problem.” Celestial Mechanics and Dynamical Astronomy, 121.
  7. D. Vallado (2013). Fundamentals of Astrodynamics and Applications, 4th ed. Microcosm Press.
  8. T. Ypma (1995). “Historical development of the Newton–Raphson method.” SIAM Review, 37(4).