Physics · Intermediate

The Newton-Raphson Method

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

The Newton-Raphson method is an iterative algorithm that locates roots of nonlinear equations by linearizing the function via Taylor expansion, yielding the update rule xn+1=xn−g(xn)/g′(xn). It exhibits quadratic convergence near simple roots but fails if the derivative is zero or if the initial guess is outside the basin of attraction.

Intuition

Imagine you are trying to find where a curve touches the x-axis, but the equation is too complex to solve algebraically. The Newton-Raphson method approximates the curve locally as a straight line (the tangent) at your current position. It calculates where this tangent line crosses the axis and moves there. If the curve is smooth and you start close enough, each step gets you much closer to the true root than the last, effectively 'zooming in' on the solution with increasing precision.

Key equations

xn+1=xn−g(xn)g′(xn)
(1)

The core update rule for a single variable, derived by truncating the Taylor series after the linear term.

Δxn+1∝(Δxn)2
(2)

The condition for quadratic convergence, where the error at step n+1 is proportional to the square of the error at step n.

AΔx=b
(3)

The linear system solved in multivariate cases, where A is the Jacobian matrix and b contains negative function values.

Derivation

  1. Assume the function g(x) is analytic and we have a current iterate xn.
  2. Perform a Taylor expansion of g(x) around xn: g(xn+1)=g(xn)+(xn+1−xn)g′(xn)+…
  3. Assume the next iterate xn+1 is a root, so g(xn+1)≈0.
  4. Truncate the series after the linear term to linearize the problem.
  5. Solve the resulting linear equation for the update term (xn+1−xn).
  6. Rearrange to obtain the update rule: xn+1=xn−g(xn)g′(xn).

Worked example

Problem

Solve g(x)=xtan⁡x−152−x2=0 for a quantum particle in a 1D square well with ρ=15, starting with x0=1.4.

  1. Identify the function g(x)=xtan⁡x−225−x2 and its derivative g′(x)=x225−x2+xcos2⁡x+tan⁡x.
  2. Apply the update rule xn+1=xn−g(xn)/g′(xn) starting at x0=1.4.
  3. Iteration 1 yields x1≈1.5254 with error 0.1254.
  4. Iteration 2 yields x2≈1.5010 with error 0.0245.
  5. Iteration 3 yields x3≈1.4807 with error 0.0203.
  6. Continuing this process, the error decreases rapidly, reaching 2.36×10−10 by iteration 7.
  7. The sequence converges to the root ϵ≈1.472473107.

Answer The root is approximately 1.472473107.

Common mistakes

  • Assuming convergence is guaranteed regardless of the initial guess; poor guesses can lead to divergence or cycles.
  • Ignoring the case where g′(xn)=0, which causes a division by zero error.
  • Expecting quadratic convergence for roots with multiplicity greater than one, where convergence slows significantly.
  • Failing to check if the derivative diverges at the root, such as in |x|ν for 0<ν<1/2.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.