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.
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.
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.