Recipe
Run Newton's method
Use when: you have a formula for f and f', and a starting guess x_0 reasonably close to a root
Goal: a sequence of guesses converging rapidly to a root, each one the x-intercept of the tangent line at the last
Taught in Newton's Method: derivation from the tangent line
Quick recipe
-
1
Differentiate f before you plug in any numbers. Reuse that same formula for f' at every step.
Example
For f(x)=x^3-x-2: f'(x)=3x^2-1.
Why: Newton's method is built from the tangent line at each guess. A tangent line's slope IS f' evaluated there. Nothing else about the formula changes step to step.
-
2
Plug the current x_n into both f and f'.
Example
x_0=1.5: f(1.5)=1.5^3-1.5-2=-0.125. f'(1.5)=3(1.5)^2-1=5.75.
Why: These two numbers pin down the tangent line — a point on the curve, and the slope through it.
-
3
Divide f(x_n) by f'(x_n). Subtract the result from x_n.
Example
x_1 = 1.5 - \dfrac{-0.125}{5.75} = 1.5+0.02174 \approx 1.52174.
- f'(x_n)=0 (or very close to it) — the tangent line is flat, or nearly flat. Its x-intercept is undefined, or far away. Newton's method breaks down here; the next section covers this failure in full.
- f'(x_n)\ne0 and reasonably sized — proceed as above.
Why: This step is the recipe's whole mechanism. Swap the curve for its tangent line, locally, and let that line's zero stand in for f's.
-
4
Go back to Step 2 with x_{n+1} in place of x_n. Stop once |f(x_n)| (or |x_{n+1}-x_n|) is below the tolerance you need.
Example
Continuing: x_2=1.52174-\dfrac{0.002137}{5.94707}\approx1.521380; x_3\approx1.5213797068 — already correct to 10 decimal places after only 3 steps. Bisection needs far more steps for far less precision.
⚡ Shortcut
When f(x)=x^2-a (finding \sqrt a), Newton's formula collapses to something far older than Newton. Here f'(x)=2x, so x_{n+1}=x_n-\frac{x_n^2-a}{2x_n}=\frac{x_n}{2}+\frac{a}{2x_n}=\frac12\left(x_n+\frac{a}{x_n}\right) — the Babylonian method (also called Heron's method) for computing square roots by hand. People used it for thousands of years before Newton's general formula existed. It says: average your current guess with a divided by your current guess. Nothing more than that. Example: \sqrt{10} from x_0=3. x_1=\frac12(3+\frac{10}{3})\approx3.16667; x_2=\frac12(3.16667+\frac{10}{3.16667})\approx3.16228; x_3\approx3.162277660 — matching \sqrt{10}=3.1622776602\ldots to 9 decimal places after only 3 steps of averaging.
Why: Each pass repeats Step 3 at the newest point. The next section proves this converges fast (quadratic convergence), which is why so few passes are usually enough. The shortcut above proves "guess, average, repeat" for square roots is this same procedure, with f(x)=x^2-a plugged in and simplified — not a separate trick.
Common mistakes
- Reusing the same f'(x_n) value at every step, instead of computing it again at the NEW x_n. That gives a different, much weaker method — not Newton's method.
- Dividing by a nearly-zero f'(x_n) without checking first. This is the next section's opening failure mode.
- Trusting a starting guess far from any root to "find its way." The tangent line only knows about f locally. It has no view of the curve's global shape.
- Stopping after a fixed, guessed number of steps, instead of checking the actual residual. Fast convergence usually means very few steps suffice, but a bad x_0 can still need several steps before that fast phase even begins.