Newton’s Method Calculator
Newton’s method finds roots by repeating xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ). For f(x) = x² − 2 starting at x₀ = 1, it reaches √2 = 1.4142135624 in 6 iterations, with f(root) essentially zero.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is Newton’s Method?
Newton’s method (also called the Newton–Raphson method) is a fast way to find a root of an equation f(x) = 0 when you cannot solve it exactly. You start with a guess, draw the tangent line to the curve at that guess, and see where the tangent crosses the x-axis. That crossing is your next, better guess. Repeat and the guesses usually home in on the root astonishingly quickly.
The reason it works is that near a root, a smooth curve looks like its tangent line, so the tangent’s x-intercept is close to the curve’s. Each step typically doubles the number of correct digits, which is called quadratic convergence. That is why calculators compute square roots this way.
Newton’s Method on x² − 2 from x₀ = 1
| Step | xₙ | Error from √2 |
|---|---|---|
| 0 | 1.000000 | 0.414 |
| 1 | 1.500000 | 0.086 |
| 2 | 1.416667 | 0.0025 |
| 3 | 1.414216 | 0.0000021 |
| 4 | 1.41421356237 | 1.6 × 10⁻¹² |
| 6 | 1.4142135624 | about 10⁻¹⁶ |
The number of correct digits roughly doubles each step: 1, 2, 5, 11…
Newton’s Method Formula
xₙis the current guess.f(xₙ)is the function value, which measures how far from zero you are.f′(xₙ)is the slope of the tangent at the guess. See the polynomial derivative calculator.- The step f ÷ f′ is exactly how far along the x-axis you must move to reach the tangent line’s root.
- For a square root of N, with f(x) = x² − N, the formula becomes xₙ₊₁ = (xₙ + N ÷ xₙ) ÷ 2, an average of the guess and N divided by the guess.
Worked Example: Finding √2
Solve f(x) = x² − 2 = 0, with f′(x) = 2x and a starting guess of x₀ = 1.
- Step 1: x₁ = 1 − (1 − 2) ÷ 2 = 1 + 0.5 = 1.5.
- Step 2: x₂ = 1.5 − (2.25 − 2) ÷ 3 = 1.5 − 0.08333 = 1.416667.
- Step 3: x₃ = 1.416667 − (0.006944) ÷ 2.833333 = 1.414216.
- After 6 iterations the change falls below 10⁻¹², giving 1.4142135624 with f(root) ≈ −4.4 × 10⁻¹⁶.
A Cubic: x³ − x − 2 = 0
Starting from x₀ = 1.5, f = −0.125 and f′ = 5.75, so x₁ = 1.5217. The method converges to 1.5213797068 in 4 iterations. There is no neat formula for this root, so a numerical method is the natural tool.
When Newton’s Method Fails
| Problem | Example | What happens |
|---|---|---|
| Zero derivative | x² − 2 starting at x₀ = 0 | f′(0) = 0, so the step divides by zero |
| Cycling | x³ − 2x + 2 starting at x₀ = 0 | Guesses bounce between 0 and 1 forever |
| Bad starting guess | A guess far from any root | May jump to a different root or diverge |
Cube Roots by Newton’s Method
To find ∛10, solve x³ − 10 = 0 starting at x₀ = 2. Then x₁ = 2 − (8 − 10) ÷ 12 = 2.1667, and x₂ = 2.1667 − (10.172 − 10) ÷ 14.08 ≈ 2.1545, which is already close to the true value 2.15443.
Newton vs Bisection
The bisection method halves the search interval every step, gaining about one binary digit per iteration, but it is guaranteed to work if the function changes sign. Newton’s method roughly doubles the number of correct digits each step, but it needs a derivative and a decent starting guess. Many programs use bisection to get close, then Newton to polish.
When to Stop
Stop when the change |xₙ₊₁ − xₙ| is smaller than your tolerance, here 10⁻¹², and check that f(xₙ) is near zero.
How to Use This Newton’s Method Calculator
- Type your polynomial f(x), for example
x^2 - 2. - Enter a starting guess x₀ close to the root you want.
- Set the maximum number of iterations. Ten is plenty for most problems.
- Read the approximate root, f at the root, the iterations used and whether the method converged.
If it fails to converge, try a different starting guess, ideally near a point where the graph crosses the axis. To see all roots of a cubic at once, use the cubic equation solver.
Where Newton’s Method Is Used
- Calculators and computers: computing square roots, reciprocals and many other functions.
- Engineering: solving nonlinear equations in structures, circuits and fluid flow.
- Finance: finding an internal rate of return or implied volatility.
- Machine learning and optimisation: Newton-type methods find where a gradient is zero.
- Science: solving orbital equations such as Kepler’s equation.
What Are the Most Common Mistakes With the Newton’s Method Calculator?
- A starting guess where f′ = 0. The step is undefined.
- Assuming it always converges. Poor guesses can cycle or diverge.
- Expecting a particular root. It converges to a root near the guess, not necessarily the one you want.
- Stopping too soon. Check that f(root) is close to zero and the change is tiny.
- Multiple roots. At a repeated root the convergence slows to linear.
- Non-differentiable points. The method needs a derivative.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
- OpenStax: algebra and calculus textbooks
- NIST Digital Library of Mathematical Functions
- Wolfram MathWorld
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is Newton’s method?
An iterative root-finding method: xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ). Each step moves to where the tangent line crosses the x-axis.
How do I choose a starting guess?
Pick a value near where the graph crosses the x-axis, often found by sketching the function or checking where f changes sign.
Why does Newton’s method sometimes fail?
If f′(xₙ) = 0 the step divides by zero, and a poor guess can make the iterations cycle or diverge.
How fast does it converge?
Typically quadratically near a simple root: the number of correct digits roughly doubles with each step.
How does Newton’s method find square roots?
Applying it to x² − N gives xₙ₊₁ = (xₙ + N ÷ xₙ) ÷ 2, the averaging method used for centuries.
Can it find complex roots?
Starting from a real guess, it stays real. Finding complex roots requires a complex starting value.