Category: Calculus Level: 301
xn+1 = xn - f(xn)/f'(xn)
Guess a root, replace the curve by its tangent line, and jump to where the tangent crosses zero. Each jump roughly doubles the number of correct digits.
Find where y = x² − 2 crosses zero, that is √2. Start with the guess x₀ = 2, where the curve sits at height 2.
x0 = 2, f(2) = 2, f'(2) = 4
The tangent at (2, 2) has slope 4. It hits zero 2/4 = 0.5 to the left, at x₁ = 1.5.
x1 = 2 - f(2)/f'(2) = 2 - 2/4 = 1.5
Climb to the curve at x₁ = 1.5, where f = 0.25, and slide down its tangent of slope 3. The next guess is 1.41667.
x2 = 1.5 - 0.25/3 ≈ 1.41667
One more jump lands within 0.000003 of √2. The error column roughly squares each time, so a few jumps beat a lot of guessing.
x3 ≈ 1.414216, √(2) ≈ 1.414214
cd svg-generator python3 -m svgmath render newtons-method --out /tmp/newtons-method
Source: svgmath/diagrams/approximation.py