Functions
AI Assistant

Newton-Raphson Method

Find roots by following tangent lines — watch it converge

The Newton-Raphson method finds where f(x) = 0 by iterating: start with a guess x₀, draw the tangent line at that point, and see where it hits the x-axis — that's your next, better guess. The formula is:

x_{n+1} = x_n − f(x_n) / f'(x_n)

The graph shows f(x) = x³ − 2x − 5, which has a root near x = 2. Watch how each tangent line gets you closer and closer to the exact root. It's like a mathematical GPS — each step cuts the error dramatically.

Graph

FAQ

How does Newton-Raphson work?
Start with an initial guess x₀. At that point, draw the tangent line to f(x). Where the tangent line crosses the x-axis is your next guess x₁. Repeat: each iteration typically doubles the number of correct digits.
What is the formula?
x_{n+1} = x_n − f(x_n) / f'(x_n). You subtract the function value divided by its derivative. Geometrically, this finds where the tangent line at (x_n, f(x_n)) intersects the x-axis.
When does Newton-Raphson fail?
It can fail if the initial guess is too far from the root, if f'(x) = 0 at some iteration (horizontal tangent), or if the function has inflection points near the root. It can also cycle or diverge with bad starting points.
Why is this method useful?
Many equations cannot be solved exactly with algebra (like x³ − 2x − 5 = 0). Newton-Raphson gives a numerical answer to any desired precision. It's used in engineering, physics, computer graphics, and machine learning optimization.