0% found this document useful (0 votes)
5 views14 pages

Root Finding Methods

This document is a practical guide to three numerical methods for root finding: Bisection, Newton-Raphson, and Secant. It outlines the strengths and weaknesses of each method, their convergence behaviors, and practical considerations for implementation. The document includes worked examples, method comparisons, and practical notes for effective application.

Uploaded by

latexd75
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

Root Finding Methods

This document is a practical guide to three numerical methods for root finding: Bisection, Newton-Raphson, and Secant. It outlines the strengths and weaknesses of each method, their convergence behaviors, and practical considerations for implementation. The document includes worked examples, method comparisons, and practical notes for effective application.

Uploaded by

latexd75
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Root Finding by Iteration

Bisection, Newton-Raphson, and Secant Methods

Prepared as a study document - February 26, 2026

What this document is: a practical, readable guide to three classic numerical methods for solving f(x)=0. It
focuses on how the methods behave in real use (what they need, how they can fail, and how to choose
between them).

How to read it: if you want the safest method, read the bisection section first. If you want speed and you
can compute derivatives, jump to Newton-Raphson. If you want speed without derivatives, go to the secant
method.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 1


Contents
1. The root-finding problem

2. Vocabulary: error, tolerance, convergence

3. Bisection method

4. Newton-Raphson method

5. Secant method

6. Worked examples (two functions, three methods)

7. Comparison and method selection

8. Practical notes (stopping rules, stability, safeguards)

Appendix A. Iteration tables: f(x)=x^3-1

Appendix B. Iteration tables: f(x)=(x-10/3)^2-4

Appendix C. Practice exercises

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 2


1. The root-finding problem
A root (or zero) of a function f is a number x* such that f(x*) = 0. In many physics and engineering
problems you end up with equations where x cannot be isolated cleanly. Instead of a closed-form solution,
you use a numerical method to produce better and better approximations x0, x1, x2, ... until one is accurate
enough.

Typical places where roots show up: equilibrium points (net force equals zero), operating points of nonlinear
circuits, calibration and parameter estimation (set a residual to zero), geometry (intersection of curves), and
control (characteristic equations and stability limits).

The three methods in this document all build a sequence of guesses. They differ in what information they
need and how reliable they are when the starting guess is not great.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 3


2. Vocabulary: error, tolerance, convergence
Iterate: each computed approximation x_n is called an iterate. Iteration: one update step that produces
x_{n+1} from earlier values.

Error: if x* is the exact root, the absolute error at step n is |x_n - x*|. In practice you usually do not know
x*, so you cannot compute this directly.

Tolerance: a threshold used to stop. Common stopping rules look at either the function value (|f(x_n)|) or
the change between iterates (|x_{n+1}-x_n|).

Common stopping tests (often used together)

1) Function small: |f(x_n)| < eps_f


2) Step small: |x_{n+1} - x_n| < eps_x
3) Bracket small: (b_n - a_n)/2 < eps_x (for bracketing methods)

Always also use: n <= max_iter

Convergence: a method converges if x_n approaches x* as n increases. The word also comes with the
question: how fast? Bisection is linear (steady but slow). Newton is typically quadratic near a simple root
(very fast). Secant is usually superlinear (faster than linear, slower than quadratic).

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 4


3. Bisection method
Bisection is the most reliable of the three. It is basically binary search for a continuous function: if you can
trap a root inside an interval, you repeatedly cut the interval in half until what remains is tiny.

Key requirement: you need a bracket [a,b] where f is continuous and f(a) and f(b) have opposite signs.

Why that matters: if f is continuous and f(a)f(b) < 0, then the function must cross zero somewhere between a
and b. So you are not guessing that a root exists; you have a mathematical guarantee that at least one root
lies inside the interval.

Algorithm (bisection)

Input: continuous f, interval [a,b] with f(a)f(b) < 0

Repeat:
c = (a+b)/2
if |f(c)| is small enough OR (b-a)/2 is small enough: stop, return c
if f(a)f(c) < 0: set b = c
else: set a = c

Guaranteed error bound: after n cuts, the interval length is (b0-a0)/2^n. If you return the midpoint, the
error is at most half the interval. This is one of the rare cases where you can predict the iteration count
needed to reach a target accuracy.

Error bound

After n iterations:
b_n - a_n = (b_0 - a_0) / 2^n

Midpoint estimate x_n = (a_n + b_n)/2 satisfies:


|x_n - x*| <= (b_n - a_n)/2 = (b_0 - a_0) / 2^(n+1)

Strengths: robust, simple, monotone shrinking bracket, no derivatives. Weaknesses: slow, and it requires
that you first find a sign change (not always obvious if f is noisy or expensive).

A practical pattern is to use bisection to get close safely, then switch to a faster method (Newton or secant)
for the final digits. This is the basic idea behind many production-grade solvers.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 5


4. Newton-Raphson method
Newton-Raphson is usually the fastest method when it works well. Instead of shrinking an interval, it uses
local slope information to jump to the next estimate.

At x_n, approximate the function by its tangent line: f(x) ≈ f(x_n) + f'(x_n)(x - x_n). The next guess is where
that line hits zero.

Newton update

x_{n+1} = x_n - f(x_n)/f'(x_n)

Why it can be extremely fast: for a simple root (f(x*)=0 and f'(x*) != 0), Newton typically has quadratic
convergence once you are close enough. In plain terms: near the root, errors often shrink roughly like 'error
squared' each step.

Why it can fail: Newton is not guaranteed to converge from an arbitrary starting point. If f'(x_n) is zero or
very small, the update can explode. If the initial guess is far from the root, the tangent line might point in a
misleading direction and the sequence can run away.

Common safeguards

1) Derivative check:
if |f'(x_n)| < delta, do not take a Newton step.

2) Damping:
x_{n+1} = x_n - alpha * f(x_n)/f'(x_n), with 0 < alpha <= 1.

3) Safeguarded Newton (hybrid):


maintain a bracket [a,b]; accept Newton step only if it stays inside.
Otherwise, fall back to a bisection step.

Multiple roots: if the root has multiplicity > 1 (the curve touches the axis and turns around), Newton often
loses its quadratic speed and becomes much slower unless modified.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 6


5. Secant method
The secant method sits between bisection and Newton. It behaves like Newton, but it avoids computing
derivatives by estimating the slope from two recent points.

Given two points x_{n-1} and x_n, approximate the derivative by a finite difference slope. Then perform a
Newton-like update using that slope.

Secant update

x_{n+1} = x_n - f(x_n) * (x_n - x_{n-1}) / (f(x_n) - f(x_{n-1}))

Convergence speed: usually superlinear (often close to Newton in practice, but not as fast near the root). A
well-known estimate for its order is about 1.618 (the golden ratio).

Weaknesses: like Newton, it can diverge if the starting points are poor. Another common failure is a
near-zero denominator when f(x_n) is almost equal to f(x_{n-1}), which can create a huge step.

A common robust approach is to use secant steps only when they look reasonable; otherwise revert to
bisection inside a bracket. This gives you derivative-free speed without losing reliability.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 7


6. Worked examples (two functions, three methods)
This section runs all three methods on two functions, using a tolerance of 1e-4. Stopping is based on either a
small step (|x_{n+1}-x_n| < 1e-4) or a small function value (|f(x)| < 1e-4). For bisection, the bracket size test
((b-a)/2 < 1e-4) is also natural.

Example A: f(x) = x^3 - 1


This function has an exact real root at x = 1.

Figure A1. The function f(x)=x^3-1 crosses zero at x=1.

Results summary (tol 1e-4):

Method Initial data Approx. root Iterations


Bisection [a,b]=[0.5, 2.0] 0.9999694824 14
Newton-Raphson x0=0.5 1.0000024558 5
Secant x0=0.5, x1=2.0 0.9999998423 7

Notice the typical pattern: bisection is steady but needs more steps; Newton reaches the answer in very few
iterations, but its first step can be large; secant is close to Newton in speed without using the derivative.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 8


Example B: f(x) = (x - 10/3)^2 - 4
This parabola has two real roots: x = 4/3 (~1.3333) and x = 16/3 (~5.3333). Here we target the smaller root
using starting values near the left side.

Figure B1. The parabola crosses zero at x=4/3 and x=16/3.

Results summary (tol 1e-4):

Method Initial data Approx. root Iterations


Bisection [a,b]=[0, 2] 1.3333129883 15
Newton-Raphson x0=1.8 1.3333329630 3
Secant x0=0, x1=2 1.3333533332 4

A useful warning shows up in this example: if you start Newton exactly at x=10/3 (the vertex), then f'(x)=0
and the method cannot even take a first step. This is why derivative checks and/or bracketing safeguards are
not just 'nice extras' in practice.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 9


7. Comparison and method selection
When people say one method is 'better' than another they usually mean it in a specific situation. So it helps
to compare methods by what they require and what they guarantee.

Feature Bisection Newton-Raphson Secant


Needs derivative? No Yes No
Needs sign-change bracket? Yes No No
Guaranteed to converge? Yes (with continuity + sign No No
change)
Typical speed near simple root Linear Quadratic Superlinear (~1.618)
Main failure mode No sign change / Bad start, tiny derivative Tiny denominator, bad start
discontinuity
Best use case Robust baseline, Fast refinement with good Fast, derivative-free
certification guess refinement

A practical decision rule used in many solvers is: start with a bracketing method to guarantee a root is
trapped, then switch to Newton or secant for speed once you are in a region where the function behaves
nicely.

If you only take one thing from this document, it can be this: reliability comes from bracketing; speed comes
from slope information (exact or approximate). Hybrid methods combine both.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 10


8. Practical notes (stopping rules, stability, safeguards)
Pick tolerances that match the problem. If x represents a physical dimension measured to 1e-3 meters,
asking for 1e-12 accuracy is wasted work. On the other hand, in some control and optimization settings
small errors can matter a lot. Choose eps_x and eps_f intentionally.

Use both a step tolerance and a function tolerance. Sometimes the iterate stops changing because of
floating-point rounding even though f(x) is not small; sometimes f(x) becomes small while the step is still
moderate. Checking both is safer.

Scaling helps. If f(x) has very large magnitudes, the solver may look unstable because updates become
extreme. Sometimes rewriting the problem or rescaling x improves behavior dramatically.

Bracketing is a safety net. If you can find [a,b] with a sign change, you can always fall back to bisection. In
production code, this single idea prevents many 'mysterious' failures.

Edge cases to watch: discontinuities (bisection can be misled if continuity fails), flat derivatives (Newton
stalls or explodes), and near-equal function values (secant denominator becomes tiny).

Checklist for a robust root finder

- Always cap iterations (max_iter).


- If using Newton: check |f'(x)| > delta before dividing.
- If using secant: check |f(x_n) - f(x_{n-1})| > delta before dividing.
- Prefer a bracket when feasible; fall back to bisection when a step looks unsafe.
- Report failure honestly (do not return a value without meeting the stop condition).

Verification: after the solver returns x_hat, it is good practice to compute f(x_hat) and report it. If you can,
also confirm the root is meaningful for the original physical model (units, constraints, domain).

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 11


Appendix A. Iteration tables: f(x) = x^3 - 1
Tolerance: 1e-4. The tables below show the iterates produced by each method. Values are rounded for
display.

A1. Bisection (start [0.5, 2.0])


Iter a b c=(a+b)/2 f(c)
1 0.5 2 1.25 0.953125
2 0.5 1.25 0.875 -0.330078125
3 0.875 1.25 1.0625 0.1994628906
4 0.875 1.0625 0.96875 -0.0908508301
5 0.96875 1.0625 1.015625 0.0476112366
6 0.96875 1.015625 0.9921875 -0.0232548714
7 0.9921875 1.015625 1.00390625 0.011764586
8 0.9921875 1.00390625 0.998046875 -0.0058479384
9 0.998046875 1.00390625 1.0009765625 0.0029325495
10 0.998046875 1.0009765625 0.9995117188 -0.0014641286
11 0.9995117188 1.0009765625 1.0002441406 7.326007e-04
12 0.9995117188 1.0002441406 0.9998779297 -3.661662e-04
13 0.9998779297 1.0002441406 1.0000610352 1.831166e-04
14 0.9998779297 1.0000610352 0.9999694824 -9.154994e-05

A2. Newton-Raphson (start x0=0.5)


Iter x_n f(x_n) f'(x_n) x_{n+1}
1 0.5 -0.875 0.75 1.6666666667
2 1.6666666667 3.6296296296 8.3333333333 1.2311111111
3 1.2311111111 0.8659145569 4.5469037037 1.0406706238
4 1.0406706238 0.1270414437 3.2489860419 1.0015687496
5 1.0015687496 0.0047136355 3.0094198803 1.0000024558

A3. Secant (start x0=0.5, x1=2.0)


Iter x_{n-1} x_n f(x_{n-1}) f(x_n) x_{n+1}
1 0.5 2 -0.875 7 0.6666666667
2 2 0.6666666667 7 -0.7037037037 0.7884615385
3 0.6666666667 0.7884615385 -0.7037037037 -0.5098358557 1.1087590676
4 0.7884615385 1.1087590676 -0.5098358557 0.3630492674 0.9755413277
5 1.1087590676 0.9755413277 0.3630492674 -0.0715959689 0.9974853233
6 0.9755413277 0.9974853233 -0.0715959689 -0.0075250753 1.000062628
7 0.9974853233 1.000062628 -0.0075250753 1.878959e-04 0.9999998423

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 12


Appendix B. Iteration tables: f(x) = (x - 10/3)^2 - 4
Tolerance: 1e-4. The tables target the smaller root near x=4/3 using the initial conditions listed.

B1. Bisection (start [0, 2])


Iter a b c=(a+b)/2 f(c)
1 0 2 1 1.4444444444
2 1 2 1.5 -0.6388888889
3 1 1.5 1.25 0.3402777778
4 1.25 1.5 1.375 -0.1649305556
5 1.25 1.375 1.3125 0.0837673611
6 1.3125 1.375 1.34375 -0.0415581597
7 1.3125 1.34375 1.328125 0.0208604601
8 1.328125 1.34375 1.3359375 -0.010409885
9 1.328125 1.3359375 1.33203125 0.0052100288
10 1.33203125 1.3359375 1.333984375 -0.0026037428
11 1.33203125 1.333984375 1.3330078125 0.0013021893
12 1.3330078125 1.333984375 1.3334960938 -6.510152e-04
13 1.3330078125 1.3334960938 1.3332519531 3.255275e-04
14 1.3332519531 1.3334960938 1.3333740234 -1.627588e-04
15 1.3332519531 1.3333740234 1.3333129883 8.138062e-05

B2. Newton-Raphson (start x0=1.8)


Iter x_n f(x_n) f'(x_n) x_{n+1}
1 1.8 -1.6488888889 -3.0666666667 1.2623188406
2 1.2623188406 0.2891010292 -4.1420289855 1.3321158
3 1.3321158 0.0048716156 -4.0024350666 1.333332963

B3. Secant (start x0=0, x1=2)


Iter x_{n-1} x_n f(x_{n-1}) f(x_n) x_{n+1}
1 0 2 7.1111111111 -2.2222222222 1.5238095238
2 2 1.5238095238 -2.2222222222 -0.7256235828 1.2929292929
3 1.5238095238 1.2929292929 -0.7256235828 0.1632486481 1.3353323338
4 1.2929292929 1.3353323338 0.1632486481 -0.007992006 1.3333533332

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 13


Appendix C. Practice exercises
These problems are meant to be done by hand for a few iterations and then checked with a calculator or
code. For each exercise, write down: (1) the initial data you chose, (2) a clear stopping rule, (3) the sequence
of iterates, and (4) a brief note about how the method behaved.

1) Use bisection to find a root of f(x)=cos(x)-x on [0, 1]. Report the number of iterations needed for
eps_x=1e-4.

2) Apply Newton-Raphson to f(x)=x^2-2 with x0=1.5. Compare how quickly it approaches sqrt(2).

3) Apply the secant method to f(x)=ln(x)-1 starting with x0=2 and x1=3. Note any numerical issues.

4) Construct a function where bisection succeeds but Newton fails from a particular starting point. Explain
why.

5) For f(x)=(x-1)^2, try Newton starting at x0=2. Observe the speed and relate it to multiplicity.

Suggested reading (no single source required): any numerical methods text covering nonlinear equations, or
documentation for robust solvers such as Brent-style bracketing methods.

Root Finding by Iteration: Bisection, Newton-Raphson, Secant Page 14

You might also like