Newton's Method (specify f(x) and f'(x))
Enter f(x) and its derivative f'(x) as expressions and use Newton's method to find an approximate root of f(x)=0. Includes an iteration table and a convergence chart.
Input
Supported syntax: + - * / ^ (power), functions like sin / cos / tan / exp / log (natural log) / log10 / sqrt / abs, constants pi and e, and the variable x. Examples: x^3 - x - 2, cos(x) - x
Result
Approximate root x
1.414213562
Converged within the tolerance
f(root)
4.440892e-16
Iterations
5
Final error |Δx|
1.594724e-12
Convergence of the estimate xₙ (dashed line: approximate root)
Iteration steps
| n | xₙ | f(xₙ) | f'(xₙ) | xₙ₊₁ | |Δx| |
|---|---|---|---|---|---|
| 1 | 1 | -1 | 2 | 1.5 | 0.5 |
| 2 | 1.5 | 0.25 | 3 | 1.416666667 | 0.0833333333 |
| 3 | 1.416666667 | 0.0069444444 | 2.833333333 | 1.414215686 | 0.0024509804 |
| 4 | 1.414215686 | 6.007305e-6 | 2.828431373 | 1.414213562 | 2.123900e-6 |
| 5 | 1.414213562 | 4.510614e-12 | 2.828427125 | 1.414213562 | 1.594724e-12 |
How it works
- Rewrite the equation you want to solve in the form f(x)=0 and enter the left-hand side in the "f(x)" field. For example, for the square root of 2 you would enter x^2 - 2.
- Enter the derivative of f(x) in the "f'(x)" field. For example, the derivative of x^2 - 2 is 2*x. Providing the derivative makes convergence fast and stable.
- For the initial value x0, use a value you expect to be close to the root. If it is far from a root the method may fail to converge or head toward a different root, so try different values.
- The tolerance is the threshold for stopping: the calculation ends once the change in x per step, |Δx|, drops to this value or below. A smaller value gives more accuracy but takes more iterations.
- Besides the approximate root, the result shows the value of f(root), the number of iterations, and the final error, and lets you review how x and f(x) change at each step in a table and chart.
- Expressions support arithmetic, powers (^), functions such as sin/cos/tan, exp, log (natural log), log10, sqrt, and abs, the constants pi and e, and the variable x.
Related calculators
Bisection Method Equation Solver
NumericalSolve f(x)=0 with the bisection method. Enter a function and an interval to get the approximate root, f(root), the iteration count, and the error, plus a per-step table of intervals and midpoints and a function graph.
Open calculator →False Position Method (Regula Falsi) Solver
NumericalA numerical tool that solves your equation f(x)=0 with the false position method (linear interpolation, regula falsi). Enter an interval and a tolerance to get the approximate root, f(root), the iteration count, and a table and chart of the iteration process.
Open calculator →Newton's Method Calculator (f(x) only, numerical derivative)
NumericalSolve f(x) = 0 with Newton's method. Just enter the equation, initial guess, tolerance, and max iterations - the derivative is approximated automatically by numerical differentiation. Shows the approximate root, f(root), iteration count, error, plus a step table and a graph.
Open calculator →Halley's Method Solver
NumericalSolve f(x)=0 with Halley's method. Enter the expression, an initial guess, a tolerance, and the iteration limit to get the approximate root, f(root), iteration count, error, an iteration table, and a convergence chart.
Open calculator →