Library / Foundations: Maths / FMA-29
Foundations: Maths
Newton–Raphson step
Improved root estimate from the current guess.
- Ref
- FMA-29
- Rev
- v1
- Field
- Foundations: Maths
- Result
- xₙ₊₁
Approximates a root of f(x) = 0 from a starting guess. A zero derivative prevents a step and convergence depends on the starting value.
Draw the tangent to the curve at the current guess; where it meets the axis is a better guess for the root.
Calculator
- Step size f/f′0.5
- Size of f at the guess |f|2
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- Near a simple root the number of correct digits roughly doubles each step.
- Poor starting guesses or zero gradients can send the iteration away from the root.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| xn Current guess | 0.5 to 5 | 0 | 4.5 | 4.5 | +10% | +13.3 % |
| f′(xn) Gradient | 1 to 8 | 0 | 1.75 | 1.75 | +10% | +3.03 % |
| f(xn) Function value | 0.5 to 4 | 1 | 1.875 | 0.875 | +10% | −3.33 % |
Sweep of Gradient
| Gradient | Next estimate |
|---|---|
| 1 | 0 |
| 1.875 | 0.9333 |
| 2.75 | 1.273 |
| 3.625 | 1.448 |
| 4.5 | 1.556 |
| 5.375 | 1.628 |
| 6.25 | 1.68 |
| 7.125 | 1.719 |
| 8 | 1.75 |
Sweep one variable
Variables and how each one contributes
Next estimate
What the equation gives you. Everything else feeds it.
Current guess
The current estimate of the root. Moves the next estimate one-for-one.
Function value
Value of f at the current guess. A larger value means a bigger correction.
Gradient
Gradient of f at the current guess. A steep gradient means a small step.
Worked example with the values above
- Step: f/f′ = 2 / 4 = 0.5.
- Subtract from the current guess: 2 − 0.5.
- xn+1 = 1.5.
Assumptions and limits
- f is differentiable near the root.
- The starting guess is close enough to converge.
Common mistakes
- Dividing by a zero gradient.
- Adding instead of subtracting the step.
Statistics and uncertainty
Rounding is fine because each step corrects earlier errors; the final accuracy is limited by how accurately f can be evaluated.
Where it is used
- Solving equations that cannot be rearranged, such as transcendental design equations.
- Computer root-finding routines.
Maths you need
- Differentiation: gradient of f
- Tangent lines: straight-line approximation