AI Glossary / Graphs and symbolic AI / Intermediate
Newton-Raphson
Definition
Newton-Raphson is an iterative numerical method for finding a root of a function: an input x for which f(x)=0. Starting from an initial estimate, it uses the function's value and derivative to compute a revised estimate. In one dimension, the update is x_next=x−f(x)/f′(x), provided the derivative is suitable and nonzero.
What it means
Many equations cannot be rearranged into a convenient explicit answer. Newton-Raphson approaches an answer through successive local corrections. The derivative describes how rapidly the function changes, allowing the method to estimate how far the input should move to make the function zero.
The method is widely relevant to numerical computation used within scientific models and AI systems. It is not inherently a graph-search algorithm, despite the supplied glossary category. Its connection to optimization arises when it is applied to a derivative or gradient to find a stationary point, which still requires further analysis to identify a minimum.
How it works
At the current estimate x, approximate the function by its tangent line: f(x+h)≈f(x)+f′(x)h. Setting that approximation to zero gives h=−f(x)/f′(x). Add h to the current estimate and repeat.
For a sufficiently smooth function near a simple root, with an appropriate starting point, convergence can be quadratic: the new error is roughly proportional to the square of the previous error. This favorable local behavior is not a guarantee from every starting point.
Implementations need stopping criteria, an iteration limit, and handling for small or zero derivatives. A small change in x alone does not prove that f(x) is close enough to zero. Check the residual and the problem's required accuracy. For systems of equations, related Newton methods solve a linear system involving a Jacobian rather than dividing by one scalar derivative.
Three practical examples
- Numerical calibration: solve an equation linking a model parameter to a desired output when a suitable derivative is available.
- Scientific simulation: find equilibrium conditions represented by nonlinear equations.
- Optimization methods: apply Newton-style updates to gradient equations, with safeguards appropriate to the objective and curvature.
Think of it this way
Think of standing on a curved path and using its current slope to predict where it crosses a target level. After moving to that predicted crossing, you measure the slope again and revise your estimate.
The analogy highlights the limitation: a tangent describes the nearby curve, not its entire shape. A poor starting location or nearly flat slope can produce a misleadingly large step.
Worked example
Find the positive root of f(x)=x²−3. Its derivative is f′(x)=2x. Start at x₀=2. The first update is x₁=2−(4−3)/4=1.75.
At x₁=1.75, the function value is 3.0625−3=0.0625 and the derivative is 3.5. Therefore x₂=1.75−0.0625/3.5≈1.732142857. A third update gives x₃≈1.732050810, close to the positive square root of three, approximately 1.732050808.
The residual at x₂ is about 0.000318878, while the residual at x₃ is about 0.00000000847. The shrinking residuals provide a direct check against the original equation rather than merely observing that the iterates look similar.
Starting at x₀=0 would make the formula undefined because f′(0)=0. Starting at a suitable negative value would instead approach the negative root. Thus, the equation can have more than one root, and the initial estimate influences which one is found. These steps are an explicit arithmetic illustration, not a benchmark of a software solver or a universal convergence claim.
Illustrative case study
Fictional case: an engineering analytics team uses an equation solver inside a calibration workflow. It initially accepts any returned number as a valid solution. A difficult input produces a tiny final step but leaves a residual too large for the calibration tolerance.
The team records the residual, iteration status, and derivative warnings, and uses a safeguarded alternative when the input falls outside the method's reliable operating conditions. The fictional case illustrates verification of numerical output; it does not claim measured accuracy improvements or certification of a real system.
Common misconceptions and mistakes
Newton-Raphson does not necessarily improve the estimate at every iteration. It can diverge, cycle, encounter a zero derivative, or converge to an unintended root. The usual quadratic convergence statement requires local conditions and a simple root.
Root finding is also different from minimization. Solving f(x)=0 finds a zero of f. Solving f′(x)=0 seeks a stationary point of f, which might be a minimum, maximum, or another stationary configuration. Additional curvature or problem-specific checks are required.
Finally, a software function's name may cover several algorithms. SciPy's newton routine uses the secant method when no derivative is supplied and can use Halley's method when appropriate derivative information is provided. Record the actual method selected.
Business use
Newton-Raphson can make repeated model calculations practical when derivatives are available and starting estimates are well chosen. Teams should define acceptable residuals in meaningful units and check whether the returned root lies within the intended domain.
Where a continuous scalar function has a known sign-changing bracket, a bracket-preserving solver can offer useful safeguards. The choice depends on derivative availability, computational cost, and reliability needs. Numerical success does not establish that the underlying model accurately represents the business or physical process.
People also ask
Does Newton-Raphson require a derivative?
The classical update does. Derivative-free methods such as the secant method use a different approximation.
Will it find every root?
No. A run normally seeks one root influenced by the starting estimate and function behavior.
Is a small step enough to declare success?
No. Check the residual, convergence status, and domain requirements as well.
Check your understanding
For f(x)=x²−9, starting at x=4, what is the next Newton-Raphson estimate?
Answer: 4−(16−9)/8=3.125.
Related terms
- Root finding
- Residual
- Convergence
- Jacobian
- derivative
- tangent line
- secant method
- Newton optimization
- numerical stability
Learn next
compare Newton-Raphson and bisection on the same scalar equation. Track both residual and input error, then examine what changes when the derivative approaches zero.
More in Graphs and symbolic AI
- Natural sort order - Natural sort order is an approach to ordering mixed text and numbers so that digit sequences are typically compared by their numerical values.
- Negation - Negation is the logical operation that states that a proposition is not true.
- Network Simplex - Network simplex is an optimization algorithm for finding a minimum-cost flow through a network while satisfying supply, demand, and capacity constraints.
- No-good - A no-good is a combination of variable assignments that cannot be extended into a valid solution of a constraint satisfaction problem.
- No-regret learning - No-regret learning is a way of making repeated decisions so that the learner's average performance approaches that of a specified hindsight benchmark.
- Node - A node is an individual element of a graph or tree, often representing an entity, state, variable, or operation. Connections between nodes are called edges.
Sources
SciPy's official newton documentation explains method selection, convergence behavior, and the need to verify results: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.newton.html
The derivation and arithmetic examples are original explanations of the standard method. Scope is numerical root finding; the supplied Graphs and symbolic AI category is retained without implying that Newton-Raphson is a graph algorithm.
Previous: Newman-Keuls test Next: Next sentence prediction