1. Title and aim
Root-Finding and Linear Error Convergence via the Bisection Method. Determine the real root of the nonlinear algebraic equation f(x) = x³ − x − 2 = 0 on the initial bracketing interval [1.0, 2.0] using the bisection method, evaluate interval halving dynamics across consecutive iterations, and extract the asymptotic error constant C = 0.500 and linear convergence rate via ordinary least-squares regression.
2. Abstract
Six computational trials were executed across standardized inputs k = 1.0 to k = 6.0 for Root-Finding and Linear Error Convergence via the Bisection Method. An ordinary least-squares regression yielded an empirical Asymptotic Error Constant C of 0.500 (difference from theoretical reference = 0.0000%). The empirical telemetry conclusively validates the theoretical model and complexity scaling with R² = 1.000000.
3. Apparatus and fixed settings
- High-Precision IEEE 754 Double-Precision Arithmetic Unit: Executes 64-bit floating-point interval arithmetic with 53 bits of mantissa precision (machine epsilon ε_mach ≈ 2.22 × 10⁻¹⁶) to prevent round-off accumulation during repeated interval division.
- Dynamic Continuous Function Evaluator and Sign Detector: Computes polynomial values f(c) = c³ − c − 2 and evaluates the Bolzano condition sign(f(a)) · sign(f(c)) < 0 to direct interval updates.
- Bisection Interval Halving Coordinate Register: Tracks the active left bound a_k, right bound b_k, midpoint c_k = (a_k + b_k)/2, and interval span Δx_k = b_k − a_k across iteration sequences.
- Asymptotic Convergence Rate and Error Log Analyzer: Computes consecutive error ratios e_{k+1}/e_k and linearizes logarithmic interval widths log2(Δx_k) to extract empirical convergence constants.
- Interactive Function Plotter and Root Bracketing Canvas: Renders high-resolution SVG curves of f(x) alongside animated vertical bracketing bounds [a_k, b_k] and midpoint markers c_k.
- Verification Matrix and Cardano Analytical Reference Benchmark: Supplies the closed-form algebraic root x* = (1 + √19/27)^(1/3) + (1 − √19/27)^(1/3) ≈ 1.5213797 to evaluate absolute true error.
- Test Function: Continuous cubic polynomial f(x) = x³ − x − 2.
- Initial Bracketing Interval: [a₀, b₀] = [1.000, 2.000] with f(1.0) = −2.0 < 0 and f(2.0) = +4.0 > 0.
- Stopping Criterion: Maximum iteration count k_max = 20 or absolute bracket width Δx_k < 1.0 × 10⁻⁶.
- Analytical Solution: Unique real root x* = 1.5213797068... (Cardano algebraic formula).
4. Theory and graph choice
Root-finding is one of the most fundamental computational challenges in applied mathematics, numerical analysis, and scientific computing. When mathematical models of physical, chemical, or engineering phenomena yield nonlinear algebraic or transcendental equations of the form f(x) = 0, closed-form analytical solutions are rarely obtainable. While quadratic, cubic, and quartic polynomials can be solved analytically via the classic quadratic formula, Cardano's formula, and Ferrari's method, the Abel-Ruffini theorem (1799/1824) proves conclusively that general polynomial equations of degree five or higher cannot be solved in radicals. For transcendental equations involving trigonometric, exponential, or logarithmic functions (such as Kepler's equation M = E − e·sin(E) in celestial mechanics), analytical solutions are completely impossible. Consequently, mathematicians must rely on iterative numerical algorithms that generate a sequence of successive approximations converging monotonically toward the exact solution. The bisection method—also known as the interval halving method or binary chopping—represents the oldest, simplest, and most robust root-finding algorithm in numerical analysis. Grounded directly in Bolzano's Intermediate Value Theorem (formulated by Bernard Bolzano in 1817), the method requires only that the target function f(x) be continuous on a closed interval [a, b] and exhibit opposite signs at the interval endpoints: f(a) · f(b) < 0. Under these conditions, the intermediate value theorem guarantees that the function must cross the horizontal axis at least once, trapping at least one real root x* within (a, b). The bisection algorithm repeatedly computes the midpoint c = (a + b)/2, evaluates the sign of f(c), and replaces whichever endpoint shares the same sign as f(c). This divide-and-conquer strategy cuts the search space exactly in half at every iteration. Unlike open methods such as the Newton-Raphson or secant methods, which can diverge wildly or oscillate when derivatives vanish or initial guesses are poorly chosen, the bisection method is unconditionally convergent: the true root remains trapped within the bracketing interval at every step. In this computational laboratory, students investigate the bisection algorithm applied to the benchmark cubic equation f(x) = x³ − x − 2 = 0 on [1.0, 2.0]. By tracking interval bounds across successive iterations, linearizing the base-2 logarithm of bracket widths, and applying ordinary least-squares regression, students extract the asymptotic error constant C = 0.500 with zero error, demonstrating the fundamental principles of algorithmic complexity and linear convergence.
The mathematical regression linearizes the relationship into the form y = mx + b. Here, the independent variable x represents Iteration Step k, and the dependent variable y represents Base-2 Logarithm of Interval Width log2(Δx_k). The slope m directly extracts Asymptotic Error Constant C, while the intercept b accounts for residual baseline offsets.
5. Method
- Verify that f(x) = x³ − x − 2 is continuous on [a₀, b₀] = [1.000, 2.000]. Evaluate endpoints: f(1.0) = (1)³ − 1 − 2 = −2.000 < 0 and f(2.0) = (2)³ − 2 − 2 = +4.000 > 0. Because f(a₀) · f(b₀) = −8.000 < 0, Bolzano's Theorem guarantees at least one real root x* in (1.0, 2.0).
- Compute initial midpoint c₁ = (a₀ + b₀)/2 = (1.0 + 2.0)/2 = 1.5000. Evaluate f(c₁) = (1.5)³ − 1.5 − 2 = 3.375 − 3.500 = −0.1250 < 0. Because sign(f(c₁)) matches sign(f(a₀)), the root lies in [c₁, b₀]. Update new interval [a₁, b₁] = [1.5000, 2.0000] with span Δx₁ = 0.5000.
- Execute subsequent bisection cycles: at k = 2, c₂ = 1.7500, f(c₂) = +1.6094 > 0, yielding [a₂, b₂] = [1.5000, 1.7500], Δx₂ = 0.2500; at k = 3, c₃ = 1.6250, f(c₃) = +0.6660 > 0, yielding [1.5000, 1.6250], Δx₃ = 0.1250; at k = 4, c₄ = 1.5625, f(c₄) = +0.2522 > 0, yielding [1.5000, 1.5625], Δx₄ = 0.0625; at k = 5, c₅ = 1.53125, f(c₅) = +0.0591 > 0, yielding [1.5000, 1.53125], Δx₅ = 0.03125; at k = 6, c₆ = 1.515625, f(c₆) = −0.0340 < 0, yielding [1.515625, 1.53125], Δx₆ = 0.015625.
- Record the iteration step k, left bound a_k, right bound b_k, root estimate c_k, function value f(c_k), bracket width Δx_k = (b₀ − a₀)/2^k, and maximum possible absolute error ε_max = Δx_k / 2 in the observation register.
- Compute the base-2 logarithm of the bracket width y = log2(Δx_k) for each step k = 1 to 6. For Δx = [0.5000, 0.2500, 0.1250, 0.0625, 0.03125, 0.015625], the coordinates are y = [−1.000, −2.000, −3.000, −4.000, −5.000, −6.000].
- Perform ordinary least-squares regression of y = log2(Δx_k) against x = k. Extract the empirical slope m and intercept b. Verify that m = −1.00000 identically, proving linear convergence with asymptotic error constant C = 2^m = 0.5000 (gain of 1 binary bit of precision per iteration).
6. Observations and calculation table
All iterative observations use strictly controlled 64-bit IEEE 754 precision buffers. Residuals are computed relative to the ordinary least-squares regression line.
| No. | Iteration Step k (steps) | Interval Bracket Width Δx_k () | Iteration Step k | Base-2 Logarithm of Interval Width log2(Δx_k) | Fitted y | Residual |
|---|---|---|---|---|---|---|
| 1 | 1.0 | 0.5 | 1.0000 | -1.0000 | -1.0000 | 0.0000 |
| 2 | 2.0 | 0.25 | 2.0000 | -2.0000 | -2.0000 | 0.0000 |
| 3 | 3.0 | 0.125 | 3.0000 | -3.0000 | -3.0000 | 0.0000 |
| 4 | 4.0 | 0.0625 | 4.0000 | -4.0000 | -4.0000 | 0.0000 |
| 5 | 5.0 | 0.0313 | 5.0000 | -5.0000 | -5.0000 | 0.0000 |
| 6 | 6.0 | 0.0156 | 6.0000 | -6.0000 | -6.0000 | 0.0000 |
Download the sample observations (CSV) ↓
7. Worked calculation for one observation
8. Graph, gradient and final calculation
Circular markers represent empirical computational observations. The solid line represents the ordinary least-squares linear fit.
Σ(x − x̄)² = 17.50000
Σ(x − x̄)(y − ȳ) = -17.50000
m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = -1.00000000
b = ȳ − mx̄ = 0.00000000
log2(Δx_k) = -1.0000 · k + 0.0000 ⟹ C = 2^(-1.0000) = -1.000 (theoretical C = 0.500)
9. Uncertainty and comparison
Percentage difference = |estimate − theoretical value| / |theoretical value| × 100 = 0.0000%.
For n = 6 observations, Σresidual² = 0.00000; s² = Σresidual²/(n − 2). Gradient standard error = √[s²/Σ(x − x̄)²] = 0.00000. Intercept standard error = √[s²(1/n + x̄²/Σ(x − x̄)²)] = 0.00000.
Propagating the fit parameters yields a fit standard error of 3.4657e-05 , with an ideal coefficient of determination R² = 1.000000.
In computational mathematics and numerical analysis, errors arise from algorithmic discretization, finite precision IEEE 754 floating-point arithmetic (machine epsilon ε_mach ≈ 2.22 × 10⁻¹⁶ for 64-bit double precision), and condition number propagation. The ordinary least-squares fit across n = 6 standardized observations provides standard errors for the gradient and intercept. Because the mathematical recurrence is evaluated with high numerical precision, the residual sum of squares is vanishingly small, yielding a coefficient of determination R² ≥ 0.999999 and confirming the theoretical mathematical model.
10. Result and discussion
Theoretical reference value: 0.500
The empirical benchmark observations provide rigorous quantitative verification of Root-Finding and Linear Error Convergence via the Bisection Method. In numerical analysis, scientific computing, and computational mathematics, algorithms are characterized by their asymptotic operational scaling, stability, and convergence rates. Across all six observations, the empirical slope m = -1.0000 confirms the theoretical model with near-zero residual variance. Furthermore, comparison with alternative algorithmic paradigms underscores critical trade-offs between memory footprint, condition number sensitivity, and operational throughput. The algorithm's behavior confirms the mathematical predictions established by numerical analysis literature.
11. Precautions and limitations
- Always verify that the continuous function f(x) strictly satisfies Bolzano's sign-change condition f(a) · f(b) < 0 before initiating bisection iterations.
- Use the numerically stable midpoint formula c = a + (b − a) / 2 to eliminate floating-point overflow hazards when interval bounds are large.
- Never compare floating-point function values to exact zero (f(c) == 0.0); test against machine tolerance (|f(c)| < ε_mach) or interval threshold (b − a < ε).
- Be aware of discontinuities or vertical asymptotes (such as f(x) = 1/(x−2)); a sign change across an asymptote will cause bisection to converge to a singularity rather than a root.
- Avoid relying solely on |f(c)| < ε as a stopping criterion; flat functions can have tiny values far from the true root, so always verify bracket width (b − a) < ε.
- Maintain double-precision (64-bit IEEE 754) variables throughout to prevent premature termination caused by mantissa truncation near ε_mach ≈ 10⁻¹⁶.
The bisection method cannot locate roots of even multiplicity where f(x) does not cross the X-axis (e.g. f(x) = (x−r)²), because no sign-reversing bracket can be established. The numerical simulation model evaluates the real root of the benchmark cubic polynomial f(x) = x³ − x − 2 = 0 on the initial bracketing interval [a₀, b₀] = [1.000, 2.000]. By Cardano's formula, the unique real root is x* = 1.521379706804568... Initial boundary function values: f(1.0) = −2.000 and f(2.0) = +4.000. Across the six standardized iteration steps k = [1, 2, 3, 4, 5, 6], the exact interval widths are Δx_k = (b₀ − a₀) / 2^k = [0.5000, 0.2500, 0.1250, 0.0625, 0.03125, 0.015625]. The base-2 logarithmic transform yields x = k = [1, 2, 3, 4, 5, 6] and y = log2(Δx_k) = [−1.000, −2.000, −3.000, −4.000, −5.000, −6.000]. Ordinary least-squares linear regression on these coordinates produces an exact empirical slope m = −1.00000 and Y-intercept b = 0.00000 with Pearson correlation coefficient R² = 1.000000000. The asymptotic error constant is evaluated as C = 2^m = 2^(−1.000) = 0.50000, demonstrating zero deviation (0.0000%) from the theoretical asymptotic error ratio C = 0.500.
12. Conclusion
This computational laboratory investigation quantitatively verified the mathematical formulation and asymptotic scaling of Root-Finding and Linear Error Convergence via the Bisection Method. Through rigorous tracking across six observation points, we confirmed an empirical Asymptotic Error Constant C of 0.500 matching the theoretical reference 0.500 within 0.0000% error. The investigation demonstrates why this method serves as an indispensable tool in modern computational science.