Skip to main content

6.3 Newton–Raphson search

Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §6.3–6.3.1. Rewritten in original wording — not a paste of NewtonCD.py. Continues 6.2 Bisection search. Labs: 6.3b Newton–Raphson labs.

Tangent intercept​

Bisection is reliable but only halves the bracket each step. Newton–Raphson is usually faster when you already have a rough guess near a root of f(x)=0f(x)=0.

Graphically (Fig. 6.2): at the current guess x0x_0, draw the tangent line to ff, then take the intercept of that line with the xx-axis as the next guess. If ff were exactly linear, one step would finish; otherwise you repeat.

Figure 6.2 — new guess = zero of the tangent at the old guess.

Write the update as an old guess plus a correction, Taylor-expand to first order, and force the linear model through zero. Pick each equation among lookalikes.

Repeat with the improved xx until ∣f(x)∣|f(x)| or ∣Δx∣|\Delta x| falls below a chosen ε\varepsilon.

Derivative, failure modes, and backtracking​

If you know f′f' in closed form, use it. For messy residuals (including the square-well g(E)g(E)), approximate f′f' by a forward difference, and backtrack when ∣f∣|f| grows after a step. Pick each formula among lookalikes.

Newton assumes the local picture is nearly linear. Fig. 6.3 shows two classic traps:

Figure 6.3 — flat derivative (left) and a cycling search (right).

Flat f′f' blows up ∣Δx∣|\Delta x|; cycling searches escape the nearly-linear neighborhood. A practical hybrid: bisect until the bracket is small, then switch to Newton for the last digits.

Square-well reminder​

Use the even residual from §6.1,

g(E)=E cot⁡V0−E−V0−E,g(E)=\sqrt{E}\,\cot\sqrt{V_0-E}-\sqrt{V_0-E},

with a close start (e.g. x0=8.5x_0=8.5 for V0=10V_0=10, or x0=6.0x_0=6.0 for the first even root at V0=20V_0=20). Far starts can land near cot⁡\cot poles — plot first, or start with bisection.

Quiz

Newton–Raphson

1 / 4

The Newton correction is…

Pick an answer to see if you are right.

Next: 6.3b Newton–Raphson labs — cubic and square-well roots, iteration counts vs bisection, backtracking. Then 6.4 Magnetization search.