Root Finding Calculator (Newton–Raphson, Bisection, Secant)
Every iteration, the stopping test, convergence warnings and a tangent or cobweb graph.
Try before you buy.
- Free preview: a watermarked graph of your function and the first rows of the iteration table (up to 3), with the root, the working and every figure hidden.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
Result
This is the last result worked out. Fix the input above to update it.
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Root Finding Calculator (Newton–Raphson, Bisection, Secant)
Type a function such as x^3 - 2x - 5 (or an equation such as x^3 = 2x + 5) and find a root of f(x) = 0 by the Newton–Raphson method, bisection, the secant method, regula falsi (false position) or fixed-point iteration x = g(x). A further mode solves two nonlinear equations f₁(x, y) = 0, f₂(x, y) = 0 together by Newton’s method for systems, and another handles multiple roots, where plain Newton slows down.
You get the full iteration table — xₙ, f(xₙ), the derivative or the bracket, the next value and the change — the stopping test that ended the run, an estimate of the order of convergence, and warnings when something goes wrong: a horizontal tangent, divergence, a cycle, a pole that only looks like a root, or the slow linear convergence of a double root. The graph draws the tangents (Newton), secant lines, the shrinking brackets (bisection), the cobweb (fixed-point iteration) or the two zero curves of a system. Give a bracket [a, b] and the calculator also races Newton, secant, bisection and regula falsi on the same equation. Derivatives are worked out symbolically, and nothing leaves your browser.
How to use it
- Choose the method. Newton–Raphson needs a starting value x₀; bisection and regula falsi need an interval [a, b] where f changes sign; the secant method needs two starting values; fixed-point iteration needs g(x) and p₀.
- Type f(x) using ^ for powers, sqrt( ), ln( ), e^x, sin, cos and |x|; 2x and x sin(x) work without “*”. An equation such as cos(x) = x is turned into f(x) = cos(x) − x.
- Set the tolerance (10⁻¹⁰ by default; 1e-6 and 10^-6 both work), the stopping test and the maximum number of iterations.
- Read the root and the iteration table, check the warnings and the graph, and copy the results or download the table as CSV or the graph as a PNG — with a Pro pass or after unlocking this result; without one you see the free preview.
Examples
x³ − 2x − 5 = 0, Newton–Raphson from x₀ = 2
x₁ = 2.1, x₂ = 2.094568121, x₃ = 2.094551482; root x ≈ 2.09455148154233 after 5 iterations
f′(x) = 3x² − 2, so x₁ = 2 − f(2)/f′(2) = 2 − (−1)/10 = 2.1. The number of correct digits roughly doubles each step.
x³ + 4x² − 10 on [1, 2], tolerance 10⁻⁴
p₁ = 1.5, p₂ = 1.25, p₃ = 1.375, …; stops after 14 iterations at p₁₄ = 1.36517334
The true root is 1.365230013; bisection promises |pₙ − p| ≤ (b − a)/2ⁿ, so 2⁻¹⁴ ≈ 0.000061 < 10⁻⁴.
f(x) = cos x − x on [0.5, π/4]
x ≈ 0.739085133215161: Newton (from π/4) 4 iterations, secant 5, regula falsi 6, bisection 32
x = cos(x), p₀ = 1
p ≈ 0.739085133 after 58 iterations; g′(p) = −0.674, so each step keeps about 67 % of the error
eˣ − x − 1 = 0 from x₀ = 1
Newton converges linearly (26 iterations, about half the error left each step); Newton for multiple roots needs 4
x² + y² = 4 and xy = 1, from (2, 0.5)
(x, y) ≈ (1.93185165257814, 0.517638090205042) after 4 iterations
The Jacobian is [2x 2y; y x]; the exact solution is x = √(2 + √3), y = √(2 − √3).
Common uses
- Checking numerical-analysis homework iteration by iteration, with the same tables as the textbook.
- Solving equations that algebra cannot, such as x = cos x, x eˣ = 1 or tan x = x.
- Comparing how fast Newton, secant, bisection and regula falsi converge on the same problem.
- Finding where two curves meet by solving a 2 × 2 nonlinear system.
The methods and their formulas
- Newton–Raphson: xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ) — follow the tangent line to the x-axis. Near a simple root it converges quadratically.
- Bisection: pₙ = (aₙ + bₙ)/2, keeping the half of [aₙ, bₙ] where f changes sign. Slow (one bit per step) but it cannot fail on a continuous f, and |pₙ − p| ≤ (b − a)/2ⁿ.
- Secant: xₙ₊₁ = xₙ − f(xₙ)(xₙ − xₙ₋₁)/(f(xₙ) − f(xₙ₋₁)) — Newton with the derivative replaced by a difference quotient; order (1 + √5)/2 ≈ 1.618 and no derivative needed.
- Regula falsi: the secant formula, but always through two points of opposite sign, so the root stays bracketed; often linear when one end stays fixed.
- Fixed-point iteration: pₙ₊₁ = g(pₙ). If |g′(x)| ≤ k < 1 near the fixed point, the error shrinks by about k each step.
- Newton for multiple roots: xₙ₊₁ = xₙ − f f′/([f′]² − f f″), Newton applied to f/f′, which has only simple roots.
- Newton for systems: solve J(xₖ)Δ = −F(xₖ) for the step Δ, where J is the Jacobian matrix of partial derivatives.
The algorithms follow Burden, Faires and Burden, Numerical Analysis, 10th ed., Algorithms 2.1–2.5 and 10.1, with the modified Newton method for multiple roots of Section 2.4.
Stopping tests and the order of convergence
The run stops at the first iteration that passes the test you chose: the change |xₙ − xₙ₋₁| below the tolerance (the textbook default), the relative change |xₙ − xₙ₋₁|/|xₙ|, or the residual |f(xₙ)|. A small change does not prove that f is small, and a small |f| does not prove that x is close when f is flat, so the table shows both. The order of convergence p is estimated from the last three changes eₙ as p ≈ ln(eₙ₊₁/eₙ)/ln(eₙ/eₙ₋₁): about 2 for Newton at a simple root, 1.618 for the secant method and 1 for bisection.
When an iteration fails
- f′(xₙ) = 0: the tangent is horizontal and Newton cannot step; start elsewhere.
- Divergence or cycling: Newton and the secant method converge only from close enough to the root — x³ − 2x + 2 from x₀ = 0 cycles 0, 1, 0, 1 …, and arctan x from x₀ = 1.5 runs away. Use the graph to pick a better start, or bisect first.
- A pole: bisection on tan x over [1, 2] finds a sign change at π/2, where f is not zero but infinite; the calculator checks that |f| shrinks and warns otherwise.
- Fixed-point iteration diverges when |g′| > 1 near the fixed point: rearrange f(x) = 0 into another form x = g(x).
Limitations
- Real roots of real-valued functions only; complex roots (of x² + 1, say) are not found.
- Each run finds one root: the one the start or the bracket leads to. Use the graph and other starting values to find others.
- Double-precision arithmetic: about 15–16 significant digits at a simple root and fewer at a multiple root, whatever the tolerance.
- Up to 1,000 iterations; systems are limited to two equations in x and y.
Privacy
On this device: nothing is sent
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, Root Finding Calculator (Newton–Raphson, Bisection, Secant) shows a watermarked graph of your function and the first rows of the iteration table (up to 3), with the root, the working and every figure hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
Which root-finding method should I use?
Newton–Raphson when you can start near the root: it is the fastest. Bisection when you know an interval where f changes sign and need a result that cannot fail — it is slow but always converges. The secant method when the derivative is awkward, and regula falsi when you want the speed of the secant method with the safety of a bracket.
Why does Newton’s method fail or diverge?
It follows tangent lines, so it fails where the tangent is flat (f′ = 0), can overshoot into another basin, cycle or run away when the start is far from the root, and slows to linear convergence at a multiple root. Starting closer to the root — or a few bisection steps first — usually fixes it.
How many iterations does bisection need?
After n steps the error is at most (b − a)/2ⁿ, so reaching a tolerance ε takes ⌈log₂((b − a)/ε)⌉ steps. For [1, 2] and ε = 10⁻⁴ that is 14; for ε = 10⁻¹⁰, 34.
What is the difference between the secant method and regula falsi?
Both draw a line through two points and take its x-intercept. The secant method always uses the two newest points, which is faster (order about 1.618) but may leave the root unbracketed. Regula falsi keeps one point on each side of the root, so it cannot diverge, but one end can stay fixed for many steps and make it converge only linearly.
How do I choose g(x) for fixed-point iteration?
Rearrange f(x) = 0 into x = g(x) so that |g′(x)| < 1 near the root. For x³ + 4x² − 10 = 0, g(x) = √(10/(4 + x)) converges quickly from 1.5, while g(x) = x − x³ − 4x² + 10 diverges. The calculator reports g′ at the fixed point and the rate it implies.
Can it solve two equations at once?
Yes: choose “Newton for a 2 × 2 system” and type f₁(x, y) and f₂(x, y), such as x² + y² − 4 and xy − 1, with a starting point. The Jacobian is worked out symbolically, and the graph shows both zero curves with the path of the iterates to their crossing.