Fact-checked by Grok 2 weeks ago

Bisection method

The bisection method is a root-finding algorithm in that approximates solutions to equations of the form f(x) = 0 for a f by repeatedly dividing an initial in half and selecting the subinterval containing a , based on the . It requires an initial bracketing [a, b] where f(a) and f(b) have opposite signs, ensuring at least one exists within the . One of the earliest developed numerical methods for solving nonlinear equations, the bisection method operates iteratively: it computes the m = (a + b)/2, evaluates f(m), and if f(m) = 0, terminates with m as the root; otherwise, it replaces either a or b with m based on the sign of f(m) to form a new interval half the size of the previous one. The process continues until the interval width falls below a specified \epsilon or a maximum number of iterations is exceeded, providing an approximation to the root with guaranteed error bounds. The method's primary advantages include its simplicity in , minimal assumptions on the beyond , and assured to a within the initial bracket, with the error halving at each step such that |p_n - p| \leq (b - a)/2^n, where p_n is the after n iterations and p is the true . However, it exhibits linear with an asymptotic rate of $1/2, making it slower than alternatives like for well-behaved functions, and it requires prior knowledge of a bracketing interval, which may not always be readily available. Despite these limitations, its reliability has made it a foundational tool in , often used for verification or in hybrid algorithms.

Foundations

Mathematical Prerequisites

The bisection method relies on fundamental concepts from , particularly the behavior of continuous defined on closed and bounded . A f is continuous on a closed [a, b] if it is continuous at every point in the open interval (a, b), continuous from the right at a, and continuous from the left at b. This means that for every point c in [a, b], the limit of f(x) as x approaches c exists and equals f(c). Continuous on such exhibit key properties, including the preservation of connectedness (mapping connected sets to connected sets) and the attainment of maximum and minimum values, as guaranteed by the . Polynomials and rational are examples of continuous where defined, making them suitable for analysis on closed . A f is a value x = r such that f(r) = [0](/page/0). In the context of root-finding methods like , identifying such is essential for solving equations of the form f(x) = [0](/page/0). Central to the is the (IVT), which provides a guarantee for the existence of under certain conditions. The IVT states: If f is on the closed interval [a, b] with f(a) < [0](/page/0) and f(b) > [0](/page/0), then there exists at least one c \in (a, b) such that f(c) = [0](/page/0). Intuitively, this theorem captures the idea that a continuous function cannot "jump" over values between f(a) and f(b) without attaining them; it must pass through every intermediate value, reflecting the dense and complete nature of the real numbers. For instance, unlike functions over , where gaps can allow skipping (e.g., a around \sqrt{2}), continuity on reals ensures no such skips occur. A proof sketch of the IVT relies on the completeness axiom of the real numbers, which asserts that every nonempty of \mathbb{R} bounded above has a least upper bound. Consider the set A = \{ t \in [a, b] : f(t) \leq 0 \}, which is nonempty (as a \in A) and bounded above by b. By , A has a supremum x = \sup A. To show f(x) = 0, assume otherwise: if f(x) < 0, continuity implies a neighborhood around x where f remains negative, contradicting x as the supremum; if f(x) > 0, a neighborhood where f is positive implies points left of x in A, again a contradiction. Thus, f(x) = 0. For the IVT to apply in root-finding, the function must change signs at the endpoints of the initial interval, meaning f(a) \cdot f(b) < 0. This condition ensures one endpoint is negative and the other positive (or vice versa), bracketing a root whose existence is guaranteed by the IVT.

Initial Setup and Assumptions

To apply the bisection method, the f(x) must be continuous on the closed interval [a_0, b_0], ensuring the existence of at least one root within the interval by the Intermediate Value Theorem if f(a_0) and f(b_0) have opposite signs. The initial bracketing interval [a_0, b_0] is selected such that f(a_0) \cdot f(b_0) < 0, confirming a sign change that brackets a root; this requires evaluating f at the endpoints to verify the condition before proceeding. If f(a_0) = 0, then a_0 is the root and the process terminates immediately; similarly, if f(b_0) = 0, b_0 is the root. A tolerance parameter \epsilon > 0 is specified as a stopping , typically to control the precision of the , such as ensuring the width falls below \epsilon. The initial length b_0 - a_0 serves as the starting error estimate for the 's location, providing a for assessing progress. Considerations for function evaluation costs are essential, as each setup step and subsequent iterations demand computing f(x) at specific points, with the initial evaluations at a_0 and b_0 establishing the feasibility of the bracket.

Algorithm

Step-by-Step Procedure

The bisection method proceeds iteratively by repeatedly bisecting an initial interval [a_0, b_0] that contains a of the f, where f(a_0) and f(b_0) have opposite signs, guaranteeing the existence of at least one by the . At each n, compute the c_n = \frac{a_n + b_n}{2}. Then, evaluate f(c_n). If f(a_n) \cdot f(c_n) < 0, the sign change indicates the root lies in the left subinterval, so update the bounds to a_{n+1} = a_n and b_{n+1} = c_n. Otherwise, if f(a_n) \cdot f(c_n) > 0, the root must be in the right subinterval, so set a_{n+1} = c_n and b_{n+1} = b_n. If f(c_n) = 0, then c_n is exactly the , and the algorithm terminates. This process halves the length of the at every step, progressively reducing the in the 's location from the initial width |b_0 - a_0| to \frac{|b_0 - a_0|}{2^n} after n . The continues until a stopping is met, typically when the width satisfies |b_n - a_n| < \epsilon for a prescribed tolerance \epsilon > 0, or when the function value at the is sufficiently small, such as |f(c_n)| < \delta for some small \delta > 0. At termination, the c_n serves as the to the .

Pseudocode and Implementation

The bisection method translates the step-by-step procedure into a straightforward iterative that repeatedly halves the search until the desired precision is achieved. The following outlines the full , taking initial interval endpoints a and b (with f(a) \cdot f(b) < 0), a tolerance \epsilon > 0, and a maximum number of iterations N to prevent infinite loops as inputs, and returning an approximate root as output./3:_Nonlinear_Equations/3.03:_Bisection_Methods_for_Solving_a_Nonlinear_Equation)
function bisection(f, a, b, ε, N)
    if f(a) * f(b) >= 0:
        return error: "No sign change in [interval](/page/Interval)"
    i ← 1
    fa ← f(a)
    while i <= N:
        c ← a + (b - a) / 2  // Midpoint, avoiding potential overflow
        fc ← f(c)
        if |b - a| < ε or |fc| < ε:
            return c  // Approximate root
        if fa * fc < 0:
            b ← c
        else:
            a ← c
            fa ← fc
        i ← i + 1
    return c  // Approximate root after max iterations
In programming languages such as Python, C++, or MATLAB, this algorithm is typically implemented using double-precision floating-point arithmetic to minimize rounding errors, with the midpoint computed as c = a + (b - a)/2 rather than (a + b)/2 to reduce the risk of overflow when |a| and |b| are large. A maximum iteration limit N, often set to around \lceil \log_2((b - a)/\epsilon) \rceil + 1, ensures termination even if floating-point precision causes the loop to stall due to underflow or exact zero evaluations./3:_Nonlinear_Equations/3.03:_Bisection_Methods_for_Solving_a_Nonlinear_Equation) The primary computational cost of the bisection method arises from evaluating the function f at the midpoint in each iteration, requiring one such evaluation per step, while arithmetic operations like midpoint calculation and sign checks are negligible in comparison. After n iterations, the length of the enclosing interval satisfies |b_n - a_n| = \frac{b_0 - a_0}{2^n}, providing a predictable reduction in uncertainty regardless of the function's behavior within the interval./3:_Nonlinear_Equations/3.03:_Bisection_Methods_for_Solving_a_Nonlinear_Equation)

Applications and Examples

Root-Finding for Continuous Functions

The bisection method applies effectively to finding roots of arbitrary continuous functions, including non-polynomial or transcendental equations where analytical solutions are unavailable. These functions often arise in scientific and engineering contexts, such as modeling physical systems with trigonometric or exponential terms. For example, the equation \cos x = x defines a transcendental equation f(x) = \cos x - x = 0, which has a unique real root known as the , approximately 0.739085. This root cannot be expressed in closed form using elementary functions, highlighting the method's utility for such cases. To demonstrate, consider applying the bisection method to f(x) = \cos x - x = 0 with an initial interval [a_0, b_0] = [0, 1], where f(0) = 1 > 0 and f(1) \approx -0.4597 < 0, ensuring a sign change. The procedure repeatedly computes the midpoint c_n = (a_n + b_n)/2 and updates the interval based on the sign of f(c_n): if f(c_n) > 0, set a_{n+1} = c_n; otherwise, set b_{n+1} = c_n. The following table shows the first three iterations, illustrating the sign changes and interval halvings:
Iterationa_nb_nc_nf(c_n)Update
001--Initial
1010.5≈0.3776 (>0)a_1 = 0.5
20.510.75≈-0.0183 (<0)b_2 = 0.75
30.50.750.625≈0.1854 (>0)a_3 = 0.625
After these steps, the interval [0.625, 0.75] contains the root, with width reduced to 0.125. Continuing iterations further refines the to any desired . A key advantage of the bisection method for continuous is its guaranteed under the stated assumptions, relying solely on the to ensure a exists in the interval. Unlike derivative-based methods, it requires only evaluations, making it reliable for functions where are computationally expensive or undefined. However, its linear rate—halving the interval each step—results in slower progress compared to faster methods for well-behaved functions.

Polynomial Root Example

The bisection method is well-suited for finding roots of , as these functions are continuous on the real line and satisfy the , allowing the identification of intervals containing roots where the function changes . Polynomials may have multiple roots, but the method reliably locates one root per bracketing by repeatedly halving it. Consider the cubic f(x) = x^3 - x - 2. provides a hint for selecting an initial by indicating that the number of positive real roots equals the number of sign changes in the coefficients of f(x) or is less by an even ; here, there is one sign change, suggesting one positive real root. Evaluation confirms f(1) = -2 < 0 and f(2) = 4 > 0, so a root lies in [1, 2]. The method proceeds by computing the c_n = (a_n + b_n)/2 at each step and updating the interval based on the sign of f(c_n). The following table illustrates the first several iterations, showing the left endpoint a_n, right endpoint b_n, midpoint c_n, function value f(c_n), and the narrowing interval length b_n - a_n:
Iteration na_nb_nc_nf(c_n)Interval length
01.00002.00001.5000-0.12501.0000
11.50002.00001.75001.60940.5000
21.50001.75001.62500.66600.2500
31.50001.62501.56250.25220.1250
41.50001.56251.53130.05660.0625
51.50001.53131.5156-0.03060.0313
61.51561.53131.52340.01290.0156
71.51561.52341.5195-0.00850.0078
81.51951.52341.52150.00220.0039
91.51951.52151.5205-0.00320.0020
After 14 iterations, the interval narrows to length less than $10^{-4}, yielding an approximate root of 1.5214 to four decimal places. Verification shows f(1.5214) \approx 0.0001, confirming the approximation is close to the true .

Analysis

Convergence Proof

The bisection method is well-defined under the assumptions that the function f is continuous on the closed interval [a_0, b_0] and satisfies f(a_0) f(b_0) < 0, ensuring the existence of at least one r \in (a_0, b_0) by the intermediate value theorem. At each iteration n, the algorithm selects the subinterval [a_n, b_n] where f(a_n) f(b_n) < 0, preserving the sign-change condition and thus containing the r by the same theorem. The length of the interval halves with each step, so b_n - a_n = (b_0 - a_0)/2^n, which approaches zero as n \to \infty. The midpoint approximation c_n = (a_n + b_n)/2 therefore satisfies |r - c_n| \leq (b_n - a_n)/2 \leq (b_0 - a_0)/2^{n+1}, implying c_n \to r as n \to \infty. The sequences \{a_n\} and \{b_n\} converge monotonically to r, with a_n non-decreasing and bounded above by r, and b_n non-increasing and bounded below by r. This monotonicity, combined with the shrinking interval length, guarantees that the method reliably brackets and approaches the root from both sides.

Error Bounds and Precision

The bisection method provides a reliable bound on the error in the approximation of the root after a finite number of iterations. Suppose the initial interval is [a_0, b_0] with length b_0 - a_0, and c_n denotes the midpoint approximation after n iterations. At each step, the interval containing the root is halved, so the length of the interval [a_n, b_n] after n iterations is (b_0 - a_0)/2^n. Since the true root x lies within this interval, the maximum possible distance from c_n to x is half the interval length, yielding the error bound |x - c_n| \leq (b_0 - a_0)/2^{n+1}. A looser but commonly used bound is |x - c_n| \leq (b_0 - a_0)/2^n, which follows directly from the full interval length serving as an upper estimate for the error. To achieve a desired absolute precision \epsilon > 0, where the error should satisfy |x - c_n| < \epsilon, the minimum number of iterations required is determined by solving the inequality (b_0 - a_0)/2^n < \epsilon, which rearranges to n > \log_2((b_0 - a_0)/\epsilon). Thus, the number of iterations is n \geq \lceil \log_2((b_0 - a_0)/\epsilon) \rceil. This bound ensures the algorithm terminates with the specified accuracy, independent of the function's behavior beyond continuity and the sign change. In practice, stopping criteria often rely on either absolute or relative estimates. Absolute can be controlled by monitoring the width b_n - a_n < \epsilon, which directly bounds |x - c_n| as above. Alternatively, checking |f(c_n)| < \epsilon approximates near- behavior, though it may fail if the is flat near the . Relative , defined as |x - c_n|/|x| < \epsilon or approximated via |c_n - c_{n-1}|/|c_n| < \epsilon, provides scale-invariant precision but requires care when the is near zero. These criteria balance computational efficiency with reliability. The bisection method exhibits linear with 1 and asymptotic constant $1/2, meaning the satisfies |x - c_{n+1}| \leq (1/2) |x - c_n| in the worst case. This halving of the per guarantees steady progress but renders the method slow for high-precision requirements, as the number of s grows logarithmically with the of the desired accuracy—for instance, achieving \epsilon = 10^{-15} on an initial interval of length 1 demands roughly 50 s.

Generalizations

Higher-Dimensional Extensions

The bisection method extends to higher dimensions for solving systems of nonlinear equations F: \mathbb{R}^n \to \mathbb{R}^n, where zeros are sought within hyper-rectangular domains, analogous to intervals in one dimension. These extensions rely on the Poincaré-Miranda theorem, a vector-valued generalization of the , which guarantees the existence of a zero if the function takes values with opposite signs (or zeros) on opposite faces of the hyper-rectangle. The process involves subdividing the initial hyper-rectangle and selecting subdomains where sign conditions are satisfied, ensuring guaranteed to a . In two dimensions, the method can halve by bisecting along coordinate axes, focusing on regions where F exhibits a sign change across boundaries, such as through component-wise evaluations on faces. Each successful bisection reduces the area of the search by half, progressively contracting the around a zero. This approach maintains the robustness of the one-dimensional bisection while adapting to planar . Key challenges arise from the curse of dimensionality, where the number of potential subdomains grows exponentially as $2^n per in n dimensions, increasing computational demands significantly beyond low dimensions. Additionally, the method requires a carefully chosen initial bounding hyper-rectangle that encloses at least one zero, often determined through prior analysis or grid searches. For illustration, consider a simple in two dimensions, F(x, y) = \begin{pmatrix} x + y - 1 \\ 2x - y \end{pmatrix} = \mathbf{0}, with at (1/3, 2/3). Starting from an initial [0, 1] \times [0, 1], where changes occur on the boundaries (e.g., F(0,0) = (-1, 0)^T, F(1,0) = (0, 2)^T), bisection along the longer side yields sub-s like [0.5, 1] \times [0, 1], and further halvings contract the domain—e.g., after two steps, to [0.5, 0.75] \times [0.5, 1]—isolating the within a smaller area.

Variant Methods

The Regula Falsi method, also known as the false position method, modifies the standard approach by replacing the midpoint selection with a between the bracketing endpoints to estimate the next approximation. This interpolation point is calculated as the x-intercept of the connecting the two points where the function changes sign, potentially accelerating for functions that are approximately linear over the interval. Unlike pure , which guarantees linear convergence regardless of function shape, Regula Falsi can exhibit superlinear convergence when the root is closer to one endpoint but may slow down if the function is concave toward that side, retaining the bracketing property throughout. The Illinois algorithm addresses a key limitation of by modifying the function value at the non-updating endpoint after each iteration, scaling it by the ratio of the current to the previous one to better balance the . This adjustment enhances reliability and restores faster rates, achieving an of approximately 1.442 in many cases, while maintaining the simplicity and guaranteed of bisection-like methods. Introduced as a practical improvement for numerical root-finding, it is particularly effective for unimodal functions where standard stagnates. The characteristic bisection method extends the framework to higher dimensions by using only the signs of the values at selected points to guide subdivision, applicable to systems f: \mathbb{R}^d \to \mathbb{R}^d for d \geq 2, without requiring information or specific structure. For , related techniques incorporate Sturm sequences to count the number of real roots within an via sign variations in the sequence, enabling efficient isolation by bisecting only intervals containing roots, as confirmed by the variation in counts at the endpoints. Methods based on degree computation extend bisection principles to algebraic functions by refining intervals through the degree of the greatest common divisor (GCD) between the defining and a representation of the , such as a quadratic bounding the disk or . For a p(x), the GCD with (x - a)(x - b) or a resultant-based test detects root presence by degree drop, enabling targeted without sign evaluations. These techniques, rooted in subresultant computations, provide robust for real algebraic numbers, with complexity scaling favorably for sparse or structured polynomials.

References

  1. [1]
  2. [2]
    Bisection Method - Python Programming And Numerical Methods
    The bisection method uses the intermediate value theorem iteratively to find roots. Let f(x) be a continuous function, and a and b be real scalar values such ...<|control11|><|separator|>
  3. [3]
    [PDF] Bisection Method - MATH 375 Numerical Analysis
    ▷ the Bisection Method is simple to program,. ▷ the Bisection Method always converges to a solution, but. ▷ the Bisection Method is slow to converge. Page ...
  4. [4]
    [PDF] MATH 4513 Numerical Analysis Chapter 2. Solutions of Equations in ...
    Sep 3, 2020 · The first numerical method, based on the Intermediate Value. Theorem (IVT), is called the Bisection Method. Suppose that f(x) is continuous ...
  5. [5]
    [PDF] Section 2.4 Continuous Functions - Dartmouth Mathematics
    We say f is continuous on the closed interval [a, b] if f is continuous on (a, b), continuous from the right at a, and continuous form the left at b. f(x) g(x) ...
  6. [6]
    Algebra - Zeroes/Roots of Polynomials - Pauls Online Math Notes
    Nov 16, 2022 · In this section we'll define the zero or root of a polynomial and whether or not it is a simple root or has multiplicity k.
  7. [7]
    [PDF] The intermediate value theorem
    This statement shows that our definition of the real numbers is on the right track. If we work not with real numbers but with the rational numbers Q, ...
  8. [8]
    3.03: Bisection Methods for Solving a Nonlinear Equation
    Oct 5, 2023 · One of the first numerical methods developed to find the root of a nonlinear equation f ⁡ ( x ) = 0 was the bisection method (also called the ...
  9. [9]
    [PDF] Bisection Method • Recall that we start with an interval [a, b] where f ...
    The Bisection Method had several disadvantages. – It requires an interval bracketing the root which may not be easily deter- mined. – The convergence is slow ...Missing: selection assumptions continuity
  10. [10]
    [PDF] Rootfinding Bisection method Guiding question How can I solve an ...
    Guiding question How can I solve an equation? In particular, given a function f, how can I find x such that f(x)=0? Definition 1.
  11. [11]
    [PDF] Chapter 03.03 Bisection Method of Solving a Nonlinear Equation
    Bisection method. Since the method is based on finding the root between two points, the method falls under the category of bracketing methods.Missing: procedure | Show results with:procedure
  12. [12]
    [PDF] Numerical Analysis, 9th ed.
    ... Numerical Analysis. Copyright 2010 Cengage Learning. All Rights Reserved ... Bisection Method. In this chapter we consider one of the most basic problems ...
  13. [13]
    [PDF] Solving an Equation
    Jul 5, 2011 · Let's think about the steps involved in the bisection method, using our example problem cos(x) = x as a guide. Step 1: Rewrite your problem as a ...
  14. [14]
    [PDF] Nonlinear Equations: Bisection Method - UCSD Math
    Nonlinear Equations: Bisection Method. Martin ... We start with a discussion of boundedness properties of continuous functions and their maxima/minima.
  15. [15]
    What is Descartes' Rule of Signs? How does it work? - Purplemath
    Use Descartes' Rule of Signs to determine the possible number of solutions to the equation: x3 + x2 − x − 1 = 0.
  16. [16]
    [PDF] Bisection Method Motivations - WPI
    The last line of the proof also informs us of the rate of convergence. |pn − p| ≤ (b − a). 1. 2n implies that the rate of convergence is O (2−n), that is,.
  17. [17]
    [PDF] Solutions of Equations in One Variable The Bisection Method
    Numerical Analysis (Chapter 2). The Bisection Method. R L Burden & J D Faires ... (The diagram shows one of 3 possibilities for this function and interval.).Missing: pseudocode | Show results with:pseudocode
  18. [18]
  19. [19]
    [PDF] An improved bisection method in two dimensions
    Jan 12, 2016 · The improved method splits a 2D domain into sub-domains, tests for encirclements of the origin, and is insensitive to coordinate rotations.
  20. [20]
    Iterative Methods for the Solution of Equations - Google Books
    This book presents a general theory of iteration algorithms for the numerical solution of equations and systems of equations.
  21. [21]
    A modified regula falsi method for computing the root of an equation
    J. F. Traub,Iterative Methods for the Solution of Equations, Prentice-Hall, Englewood Cliffs, N.J., 1964. Google Scholar · Download references. Author ...
  22. [22]
    [PDF] Efficient isolation of a polynomial real roots - Hal-Inria
    Feb 1, 2001 · Abstract: This paper gives new results for the isolation of real roots of a univariate polynomial using. Descartes' rule of signs, following ...