A5 · Lesson 34 · Newton's method
Follow the tangent to the root
Every circuit simulator, from SPICE to the one in this course, solves its nonlinear equations the same way. Guess the answer, replace each nonlinear part by its tangent line at that guess, solve the now-linear problem, and repeat. Each round roughly doubles the number of correct digits. For a single equation it's Newton's method, and it's the most important numerical idea in this course.
- The curve is ; its positive root is . The dashed line is the tangent at your guess .
- The tangent hits zero at the next guess, . Move and watch .
- Start at . How close is to ? Then imagine starting again from .
Predict
Starting from , one Newton step for (on ) gives what?
1.5. . The next step gives 1.41667, then 1.4142157: the number of correct digits roughly doubles each time.
Name it
The method
At a guess , replace by its tangent line and find where the tangent is zero:
Repeat until the change, or , is small enough.
For square roots (), the step simplifies to : the averaging rule from A4.
How fast it converges
Close to a simple root, the error roughly squares each step: . Errors of , , , : four steps from two correct digits to full double precision. That's quadratic convergence, and it's why simulators converge in a handful of iterations per time step.
Bisection (lesson 6 and A4) gains one bit per step; Newton doubles the digits. But Newton needs a derivative and a decent starting guess.
How it fails
- Flat tangent: if , the step shoots off far away.
- Cycling or wandering: a bad starting point can bounce between values or head for a different root.
- Exponentials overshoot. A diode's is so steep that a guess slightly too high makes a tiny step, and one slightly too low makes a huge one. SPICE limits how far the diode voltage can move per step for exactly this reason ("junction limiting").
Practical solvers combine Newton's speed with a safeguard: bracket the root first, take Newton steps that stay in the bracket, fall back to bisection when they don't.
Worked example
Solve with Newton's method from .
Show the solution
- Set up.
- First step.
- Keep going.
- Check. Three steps give six correct digits. The root, 0.7390851, is where the cosine curve crosses the line .
Answer after three steps.
Worked example
A diode ( A, = 25.85 mV) is in series with 1 kΩ across 5 V. Take one Newton step for the diode voltage from 0.7 V.
Show the solution
- KCL. The diode's current must equal the resistor's, so the voltage is a zero of
- Derivative.
- Evaluate at 0.7 V. mA and the resistor's current is 4.30 mA, so
- Newton step.
- Check. The true answer is 0.6925 V; two more steps get it to the microvolt.
Answer one Newton step takes the diode voltage from 0.7 V to 0.6935 V.
Worked example
Find with Newton's method on , starting from .
Show the solution
- The Newton step.
- Iterate from 1.
- Check. The true value is 1.414 214. The number of correct digits roughly doubles at each step: 1, 3, 6.
Answer after three steps.
Check
Take one Newton step toward from = 1, using .
Check
Take one Newton step for from = 0.5.
Check
Near a root, Newton's error behaves like . Starting with an error of 0.01, what is the error after two steps?
Check
A diode ( A, = 25.85 mV) and 1000 Ω are in series across 3 V. With , take one Newton step from = 0.7 V.
Check
Newton's method on from gives , then , then 1, 0, ... What went wrong?
Check
Find with Newton's method on , from = 1.
(a)
What is ?
(b)
What is ?
Check
Write Newton's step for the cube root of , using .
Step 1
What is ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
Write as one fraction.
Explain why
Why do circuit simulators use Newton's method, and why do they limit how far a diode's voltage can move in one step?
Newton's method replaces each nonlinear part by its tangent at the current guess, which turns the circuit into a linear one that's easy to solve, and near the answer the error squares each round, so a handful of iterations gives full precision. But a diode's current is exponential in its voltage, so a guess that's a little too high gives an enormous current and a wild tangent, and the next step can overshoot badly. Limiting the step in the diode's voltage keeps each iteration in the region where the tangent is a good model, so the fast convergence can take over.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.