Root Finding Tool: Bisection, Newton’s, Secant Methods

Root Finding Tool (Bisection, Newton, Secant)

Root Finding Tool

Find the roots $f(x) = 0$ using Bisection, Newton-Raphson, or Secant methods with visual iteration steps.

Equation & Method

√2 cos(x)=x Cubic

Iteration Visualization

f(x) Steps

Iteration Log

Final Root
nx_nf(x_n)Error

Numerical Root Finding Methods

Finding the root (zero) of a function $f(x) = 0$ is a fundamental problem in engineering and science. Analytical solutions often don’t exist for complex non-linear equations, so we use iterative numerical methods.

Bisection Method

Type: Bracketing
Convergence: Linear (Slow)
Idea: Requires two initial points $a, b$ where $f(a)$ and $f(b)$ have opposite signs. Repeatedly halves the interval. Guaranteed to converge if signs are opposite.

Newton-Raphson

Type: Open
Convergence: Quadratic (Fast)
Idea: Uses the tangent line at the current guess $x_n$ to estimate $x_{n+1}$. Requires the derivative $f'(x)$. Can diverge if the initial guess is poor or $f'(x) \approx 0$.

Secant Method

Type: Open
Convergence: Superlinear ($1.618$)
Idea: Approximates the derivative using a secant line between two points. Useful when calculating $f'(x)$ is difficult. Faster than Bisection but doesn’t guarantee convergence.

FAQ

Why did Newton’s method fail?
Newton’s method fails if the derivative $f'(x)$ is zero (division by zero) or if the function has a local minimum/maximum near the root that causes the tangent line to shoot off to infinity (overshoot). Try a different initial guess closer to the root.
What is “Tolerance”?
Tolerance ($\epsilon$) defines when we stop iterating. We stop when $|f(x)| < \epsilon$ or when the change between steps $|x_{n+1} - x_n| < \epsilon$. A smaller tolerance gives a more precise answer but requires more calculation steps.
When should I use Bisection?
Use Bisection when you need a guaranteed answer and you know an interval $[a, b]$ where the function changes sign. It is slower than Newton’s method but robust against wild function behavior.

UNDERGRADUATE