Bisection Method

Robust bracketing root finder — halves the interval each step

Parameters

ⓘ
ⓘ
ⓘ
ⓘ
Show Trail

Controls

xⓘ

Calculated Values

Root x:
1.41;1.41;
f(a):
−1.00;-1.00;
f(b):
2.00;2.00;
Reference:
1.41;1.41;

Examples

√2 on [1, 2]

Classic bracket for x² − 2.

  • Root: 1.411.41

Visualization

Bracketing Roots

The bisection method (interval halving) is the most reliable elementary root finder. If f is continuous on [a, b] and f(a)·f(b) < 0, the intermediate value theorem guarantees a root inside.

Each iteration computes the midpoint c = (a + b)/2 and evaluates f(c). If f(a)·f(c) < 0, the root lies in [a, c]; otherwise shrink to [c, b]. The interval length halves every step, so the error bound decreases as (b − a)/2ⁿ.

Unlike Newton-Raphson, bisection does not need derivatives and cannot diverge from a valid bracket. The trade-off is slow linear convergence — each digit of accuracy may need several extra steps.

In lab analysis, bisection can locate crossing times (when a signal crosses threshold) or solve implicit calibration equations when only sign information is trustworthy.

Combine with Newton after bisection narrows the bracket for a fast, safe hybrid strategy used in many scientific libraries.

Key Concepts

  • Requires f(a)·f(b) < 0
  • Error ≤ (b − a) / 2ⁿ after n steps
  • Linear convergence — predictable but slow
  • Works for any continuous bracketed f
  • Midpoint is always tested

Real-World Applications

  • Threshold crossing times in sensor data
  • Safe fallback inside ODE event solvers
  • Finding eigenvalue brackets in quantum models
  • Calibration when only monotonic sign change is known

Explore Further

More computational physics tools

  • Gradient Descent

    Iteratively minimize f(x) by following the negative gradient with animated path visualization.

  • 1D Heat Equation

    Finite-difference FTCS solution to the diffusion equation with animated temperature profiles.

  • 1D Wave Equation

    Leapfrog finite-difference solution to the wave equation with animated wave propagation.

  • Numerical Integration

    Trapezoidal and Simpson rules to approximate definite integrals with error vs exact solutions.

  • ODE Solver

    Euler and Runge-Kutta 4 methods for first-order ODEs with comparison to analytic solutions.

  • Monte Carlo Intro

    Estimate π and integrals by random sampling — introduction to stochastic computational physics.

Physics Equations

Midpoint:
c=a+b2c = \frac{a + b}{2}
Bracket rule:
f(a)⋅f(c)<0⇒root in [a,c]f(a)\cdot f(c) < 0 \Rightarrow \text{root in } [a,c]

Step-by-Step Solution

See how the main results are calculated.

1

Step 1: Bracket the root

Interval [a, b] = [1, 2] must satisfy f(a)·f(b) < 0.

Calculation:

f(a)=−1.000000,f(b)=2.000000f(a) = -1.000000,\quad f(b) = 2.000000

Result:

Opposite signs — bracket is valid
2

Step 2: Bisection update

Halve the interval and keep the sub-interval where the sign changes.

Equation:

c=a+b2c = \frac{a+b}{2}

Explanation:

Guaranteed convergence if a valid bracket exists; error halves each step.

3

Step 3: Root estimate

Calculation:

After 25 bisections: x≈1.41421355\text{After 25 bisections: } x \approx 1.41421355

Result:

f(x) ≈ -2.631e-8

Explanation:

Exact ≈ 1.41421356

4

Step 4: Compare to Newton–Raphson

Bisection is slower but does not need derivatives.

Result:

Bisection: robust, linear convergence. Newton: faster if derivative available.

Frequently Asked Questions (FAQ)

What if f(a) and f(b) have the same sign?

The method is not guaranteed to work — choose a wider bracket or plot f first.

How many steps for 6 decimal places?

Need (b−a)/2ⁿ < 10⁻⁶; for unit bracket ≈ 20 iterations.

Practice MCQs

  1. Bisection requires:
  2. After n steps the interval width is:
  3. Convergence rate is:
  4. Compared to Newton, bisection is:
  5. If f(c) = 0 at midpoint: