Newton without derivatives, a final comparison of all five root-finding methods, and Newton's method for several equations at once: the idea behind GPS.
The game designer from Lecture 6 asks: at what launch speed does the ball land after exactly 3 seconds?
| (m/s) | (s) |
|---|---|
| 10 | 2.7752 |
| 15 | 3.3912 |
| 20 | 4.0025 |
Newton: , quadratic, but needs and a good start.
Replace by a slope through two points (secant), then generalise Newton to vectors.
input f, x0, x1, tol, N
f0 ← f(x0); f1 ← f(x1)
repeat up to N times:
if f1 = f0: stop (flat secant)
x2 ← x1 − f1·(x1 − x0) / (f1 − f0)
if |x2 − x1| < tol:
return x2
x0, f0 ← x1, f1
x1, f1 ← x2, f(x2)
stop: no convergenceStep 4 is the only difference from false position: no sign test, just keep the newest two points.
| 1 | 1 | 2 | −2 | 4 | 1.333333 | −0.962963 |
| 2 | 2 | 1.333333 | 4 | −0.962963 | 1.462687 | −0.333339 |
| 3 | 1.333333 | 1.462687 | −0.962963 | −0.333339 | 1.531169 | +0.058626 |
| 4 | 1.462687 | 1.531169 | −0.333339 | +0.058626 | 1.520926 | −0.002693 |
| 5 | 1.531169 | 1.520926 | +0.058626 | −0.002693 | 1.521376 | −0.000020 |
| 6 | 1.520926 | 1.521376 | −0.002693 | −0.000020 | 1.521380 | 0.000000 |
Row 3 uses two points with : false position would never do that. Root 1.521380 after 6 steps (false position: 12 steps for the same accuracy).
Solve , simultaneously. Linearise both with Taylor series:
input F, J, x0, tol, N
x ← x0
repeat up to N times:
solve J(x)·Δ = −F(x)
x ← x + Δ
if ‖Δ‖ < tol:
return x
stop: no convergenceSame loop as one-variable Newton; "divide by " became "solve with " (step 4).
Each value of comes from running bisection; there is nothing to substitute or rearrange. Secant: m/s in 4 steps. Most real systems (circuits, GPS, robots) are like this: many equations, no substitution trick.
scipy.optimize.brentq)Rule of thumb: no derivative → secant; no guarantee needed → plain; guarantee needed → Brent (bracket + secant + bisection).
| Method | Needs | Order | Per step | Guaranteed? | Iterations for , |
|---|---|---|---|---|---|
| Bisection | bracket | 1 (rate ½) | 1 eval | yes | 20 from [1, 2] |
| False position | bracket | 1 (often fast) | 1 eval | yes (can be slow) | 12 from [1, 2] |
| Fixed point | , | 1 (rate ) | 1 eval | only if | 7 with |
| Newton–Raphson | , | 2 | 2 evals | no (needs good ) | 3 from 1.5 |
| Secant | , | 1.618 | 1 eval | no | 7 from 1, 2 |
Practical choice: bracketing when safety matters or is noisy; Newton when is cheap and is good; secant when is unavailable. Libraries (e.g. Brent's method, scipy.optimize.brentq) combine bisection's safety with secant-like speed.
We can now solve any single equation, and small systems. Large systems need new tools:
Click a card to see Newton's method for systems, or the secant idea, inside a real system.
Where exactly: positioning. Each measured distance gives one nonlinear equation; GPS uses 4 satellites for and the clock error. Here is the 2-D version with two beacons.
From the guess (2, 2): (3, 5.25), (3, 4.1488), (3, 4.0027) → (3, 4). Real receivers do this with 4 unknowns at every position update.
Where exactly: robot control. A two-link arm with unit links reaches when the shoulder angle and elbow angle satisfy two trigonometric equations.
From (0.3, 1.0) Newton converges to x = −0.1774 rad (−10.2°), y = 1.5308 rad (87.7°). The other crossing is the "elbow-down" solution.
Where exactly: scipy.optimize.brentq, the default bracketed root finder in Python. It mixes secant (and inverse quadratic) steps with bisection.
This combination is exactly the "rule of thumb" from the profile slides of Lectures 6–10.
Where exactly: every analogue circuit simulator. Kirchhoff's current law at each node gives one equation; diodes make them nonlinear ().
Large circuits mean large sparse Jacobians: the linear algebra of Lectures 11–14 is where the time goes.
Secant on from : 11.8317, 11.8267, 11.826709 m/s. Four steps, each a full bisection run inside; no derivative was needed.
Module 3: systems of linear equations. with Cramer's rule and the inverse, and why both are too slow for real problems.