Solving f(x) = 0 by number

Four ways to find
where f crosses zero

Type a function and a bracket and watch bisection, false position, the secant method and Newton's method chase the same root. See how many steps each one needs, how close it lands and where it gets stuck.

Enter your figures and read the result

Type f(x) with x as the variable. The worked example is the cubic Newton used to introduce his method. Saved on this device only.

Loading Numerical Root-Finding Comparator. If nothing appears, turn on JavaScript.

What you get

Enrichment · STEM ExplorationsOpen to everyone · no sign-in

What you finish with
A worked-out result for your own entry (a headline figure, tiles, tables and a drawing where one helps), as a printout, a spreadsheet (.csv) or a saved file.
Who it is for
High school and college students in calculus, precalculus and numerical methods, and teachers who want to show why some root finders are faster and others safer.
Format
Browser tool for a phone, tablet or computer: type or paste, the result updates as you type. Print, spreadsheet (.csv), save to a file and open it again.
Access
Open to everyone with the link: no account, no sign-in, nothing to buy and nothing to install. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The STEM Explorations space in Caveat Enrichment.
Support
Questions about access, an order or a correction: team@caveatacademic.com.

How to use it

  1. Load the worked example to see how it reads, or start with your own entry.
  2. Type or paste into the fields; the result updates as you type.
  3. Read the headline, the tiles and the tables.
  4. Try a second case from the buttons above the fields.
  5. Print the result, download a spreadsheet or save the entry to a file.

Compare the methods

How it works

The worked example from typing the function to reading which method was fastest.

Safe or fast

Bisection is slow but certain: given a sign change it always closes in on a root and halves the error every step. Newton's method and the secant method are much faster near a root, but they can wander off or hit a flat spot when the start is poor. False position sits between them.

What the tolerance means

Each method stops when its estimate moves by less than the tolerance. That is not the same as the true error, which is why the table also shows f at the root and the distance from a reference root found by bisection to 1e-13. A function with a double root, such as (x-1)^2, gives no sign change, so a bracket cannot be used.

Sources

  1. Burden, R. L., & Faires, J. D. Numerical Analysis (any recent edition), chapter 2, Solutions of equations in one variable: bisection, Newton, secant and false position.
  2. Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. Numerical Recipes: The Art of Scientific Computing, 3rd ed., Cambridge University Press, chapter 9, Root finding and nonlinear sets of equations.
  3. The cubic x^3 - 2x - 5 = 0 is the equation Isaac Newton used to introduce his method; its real root is about 2.0945515. Reference values here were checked against an independent solver.

The worked examples are invented for illustration. What you type is saved only in this browser and is never sent to Caveat. Support: team@caveatacademic.com.

Written with AI, then checked before it is published. How we checkFound a mistake? Report it and we fix it, or refund you.Cancel anytime.