Connect via MCP →

Enter Calculation

Use x as the variable. Supported: + - * / ^, sin cos tan asin acos atan exp ln log sqrt abs, pi, e. Trig in radians.

Formula

Formula: Newton's Method Root Finder

Advertisement

Results

Approximate root (x)
0.739085133215161
value of x where f(x) approximately equals 0
f(x) at root 0
Iterations used (n) 4
Status converged
n x_n f(x_n)
0 1 0.45969769413186
1 0.750363867840244 0.018923073822117
2 0.739112890911362 0.000046455898991
3 0.739085133385284 0.000000000284721

What is Newton's Method?

Newton's method (also called Newton-Raphson) is one of the fastest and most widely used techniques for finding a numerical root of an equation, that is a value x where \(f(x) = 0\). Starting from an initial guess, it repeatedly draws the tangent line to the curve and uses where that tangent crosses the x-axis as the next, better estimate. When it works, it converges quadratically: the number of correct digits roughly doubles each step.

Tangent line at a point on a curve crossing the x-axis closer to the root
Newton's method follows the tangent line at each guess down to the x-axis to get a better estimate.

How to Use This Calculator

Enter your function \(f(x)\) using x as the variable. Because this tool does not auto-differentiate, you must also supply the analytic derivative \(f'(x)\) yourself. Choose a starting guess \(x_0\) and a maximum number of iterations. The calculator returns the approximate root, the value of f at that root (which should be near zero to confirm convergence), how many iterations were used, and a step-by-step history table. Supported syntax: + - * / ^ for powers, parentheses, the functions sin, cos, tan, asin, acos, atan, exp, ln, log, sqrt, abs, and the constants pi and e. Trigonometric functions use radians.

The Formula Explained

The update rule is $$x_{n+1} = x_{n} - \frac{f(x_{n})}{f'(x_{n})}.$$ Each iteration evaluates the function and its slope at the current point and steps toward the x-intercept of the tangent line. If the derivative is zero at any step, the tangent is horizontal and the method fails with a division-by-zero error.

Sequence of iterations stepping along a curve converging toward a root
Repeating the update rule produces guesses that close in on the root.

Worked Example

Take \(f(x) = x - \cos(x)\) with derivative \(f'(x) = 1 + \sin(x)\) and \(x_0 = 1\). Step 1 gives $$x_1 = 1 - \frac{1 - \cos 1}{1 + \sin 1} = 0.75034.$$ Step 2 gives \(0.73912\), step 3 gives \(0.73909\), and within a few iterations it settles on \(x = 0.7390851332151607\), the famous "Dottie number" where \(x = \cos x\). At that point \(f(x)\) is essentially zero.

FAQ

Why do I need to supply the derivative? This tool evaluates expressions but does not perform symbolic differentiation, so you enter \(f'(x)\) manually. An incorrect derivative will give a wrong root or cause divergence.

Why didn't it converge? Newton's method can diverge or oscillate for poor starting guesses, near inflection points, or when no real root exists. Try a different \(x_0\) or increase the iteration limit.

Which root do I get for multiple roots? The root found depends on the initial guess \(x_0\); pick a guess close to the root you want.

Last updated: