Example
Use tangent-line updates to approach the root.
highlighted = computed this step
Step 1 — Set up
Start Newton's method from x 0 equals 1.
f(x)=cosx−xx0=1
Step 2 — Newton iteration 1
Add Newton iteration 1 to the table.
n1x n1.000000f−0.459698f prime−1.841471x next0.750364
Step 3 — Newton iteration 2
Add Newton iteration 2 to the table.
n12x n1.0000000.750364f−0.459698−0.018923f prime−1.841471−1.681905x next0.7503640.739113
Step 4 — Newton iteration 3
Add Newton iteration 3 to the table.
n123x n1.0000000.7503640.739113f−0.459698−0.018923−0.000046f prime−1.841471−1.681905−1.673633x next0.7503640.7391130.739085
Step 5 — Root estimate
After 3 iterations the root is about 0.739085.
x≈0.739085iters=3
newton-raphson
Given a starting point x0, each Newton step moves to x1=x0-f(x0)/f'(x0), tangent-line intersection with the x-axis. Converges quadratically near a simple root.