{
  "id": "bisection-method",
  "title": "Bisection Method",
  "lang": "en",
  "source_lang": "en",
  "summary": "The bisection method locates a zero of a continuous real-valued function by repeatedly halving an interval whose endpoints have opposite function signs.",
  "category": "mathematics",
  "subcategory": "applied",
  "type": "concept",
  "aliases": [
    "Interval halving method",
    "Bolzano method",
    "Dichotomy method"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/bisection-method/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/bisection-method/",
      "json": "https://aiwiki.page/zh/bisection-method.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The bisection method is a numerical algorithm for finding a zero of a continuous function on a closed interval. Starting with endpoints at which the function has opposite signs, it evaluates the function at the midpoint and retains a half-interval that still brackets a zero. Repetition produces progressively smaller intervals containing a solution. Its principal advantages are guaranteed convergence under simple assumptions and an explicit error bound; its principal disadvantages are relatively slow convergence and the need for an initial bracket."
    },
    {
      "heading": "Mathematical basis",
      "text": "Let \\(f:[a,b]\\to\\mathbb{R}\\) be a continuous function, where \\(a<b\\), and suppose\n\n\\[f(a)f(b)<0.\\]\n\nThe intermediate value theorem guarantees at least one point \\(r\\in(a,b)\\) such that\n\n\\[f(r)=0.\\]\n\nSuch a point is called a root or zero of \\(f\\). Finding a solution of an equation \\(g(x)=h(x)\\) can therefore be recast as finding a zero of \\(f(x)=g(x)-h(x)\\).\n\nThe midpoint is\n\n\\[m=\\frac{a+b}{2}.\\]\n\nIf \\(f(m)=0\\), a root has been found. Otherwise, \\(f(m)\\) has the opposite sign to exactly one of the two endpoint values. The corresponding half-interval, either \\([a,m]\\) or \\([m,b]\\), satisfies the same continuity and sign-change conditions as the original interval.\n\nThe sign-change condition guarantees existence, not uniqueness. An interval may contain several roots, and bisection generally isolates only one of them. If \\(f\\) is strictly monotonic on the interval, the root is unique."
    },
    {
      "heading": "Algorithm",
      "text": "Before iteration, endpoint values are checked: if \\(f(a)=0\\) or \\(f(b)=0\\), that endpoint is already a solution. Otherwise, opposite endpoint signs are required.\n\nA version using an absolute location tolerance \\(\\varepsilon>0\\) is:\n\nEvaluate fa = f(a) and fb = f(b).\n\nIf fa = 0, return a.\nIf fb = 0, return b.\nIf fa and fb have the same sign, reject the bracket.\n\nRepeat:\n    m = midpoint(a, b)\n\n    If (b - a)/2 <= ε:\n        return m together with the bracket [a, b]\n\n    fm = f(m)\n\n    If fm = 0:\n        return m\n\n    If fa and fm have opposite signs:\n        b = m\n        fb = fm\n    Otherwise:\n        a = m\n        fa = fm\n\nThis pseudocode describes exact arithmetic. Practical implementations also handle rounding, nonfinite function values, and iteration limits.\n\nAfter the initial endpoint evaluations, each interval reduction requires only one new function evaluation. Stored endpoint values are reused. No derivatives are required."
    },
    {
      "heading": "Convergence and error bounds",
      "text": "Let the initial interval be \\(I_0=[a_0,b_0]\\), with width \\(L=b_0-a_0\\). After \\(n\\) interval reductions, the retained interval \\(I_n=[a_n,b_n]\\) has width\n\n\\[b_n-a_n=\\frac{L}{2^n}.\\]\n\nThe intervals are nested, and each contains a root. Their endpoints converge to a common real number \\(r\\); continuity implies \\(f(r)=0\\).\n\nIf \\(m_n\\) is the midpoint of \\(I_n\\), then\n\n\\[|m_n-r|\\leq \\frac{L}{2^{n+1}}.\\]\n\nThus the error can be bounded without knowing the root or evaluating any derivatives. To guarantee a midpoint error no greater than \\(\\varepsilon\\), it is sufficient to perform\n\n\\[n\\geq \\max\\left\\{ 0,\\, \\left\\lceil \\log_2\\left(\\frac{L}{2\\varepsilon}\\right) \\right\\rceil \\right\\}\\]\n\ninterval reductions.\n\nThe interval width and the guaranteed error bound decrease by a factor of two at every reduction. This geometric decrease is commonly described as linear convergence. More precisely, the factor of one-half applies to the bracket width and its associated error bound; the actual errors of successive midpoints need not decrease by that factor at every step.\n\nFor a fixed initial interval, the number of reductions grows as \\(O(\\log(1/\\varepsilon))\\), using big-O notation. Each reduction adds approximately one binary digit of absolute positional resolution."
    },
    {
      "heading": "Example",
      "text": "Consider the polynomial\n\n\\[f(x)=x^3-x-2.\\]\n\nSince \\(f(1)=-2\\) and \\(f(2)=4\\), the interval \\([1,2]\\) brackets a root.\n\nEvaluation | Midpoint | Function value | Retained interval\n1 | \\(1.5\\) | \\(-0.125\\) | \\([1.5,2]\\)\n2 | \\(1.75\\) | \\(1.609375\\) | \\([1.5,1.75]\\)\n3 | \\(1.625\\) | \\(0.666015625\\) | \\([1.5,1.625]\\)\n4 | \\(1.5625\\) | \\(0.252197265625\\) | \\([1.5,1.5625]\\)\n5 | \\(1.53125\\) | \\(0.059112548828125\\) | \\([1.5,1.53125]\\)\n\nThe root is approximately \\(1.5213797068\\). After five reductions, the bracket has width \\(1/32\\), so its midpoint has a guaranteed error of at most \\(1/64\\), independently of that more accurate root value."
    },
    {
      "heading": "Stopping criteria and finite-precision arithmetic",
      "text": "Interval width versus residual\n\nThe interval-width criterion controls uncertainty in the root’s location. A different criterion uses the residual, \\(|f(m)|\\), and stops when it is small. These criteria are not interchangeable.\n\nFor example, multiplying a function by a very small positive constant makes its residual small without changing its roots or improving the current approximation. A residual gives a location bound only when additional information is available. If\n\n\\[|f'(x)|\\geq \\mu>0\\]\n\nthroughout the bracket, the mean value theorem gives\n\n\\[|m-r|\\leq \\frac{|f(m)|}{\\mu}.\\]\n\nWithout such information, bracket width provides the more direct location guarantee.\n\nImplementations often combine absolute and relative tolerances, for example by comparing the half-width with\n\n\\[\\varepsilon_{\\mathrm{abs}} +\\varepsilon_{\\mathrm{rel}}|m|.\\]\n\nAn absolute component remains important near zero, where relative error alone is unsuitable.\n\nRounding and reliable sign tests\n\nIn floating-point arithmetic, several details affect reliability:\n\n- Midpoint calculation: \\((a+b)/2\\) can overflow even when the midpoint is representable. The alternative \\(a+(b-a)/2\\) avoids some overflow cases but not all; robust midpoint routines account for endpoint signs and magnitudes.\n- Sign comparison: testing whether \\(f(a)f(m)<0\\) by explicitly multiplying can cause overflow or underflow. Comparing signs directly avoids that multiplication.\n- Stagnation: eventually, the computed midpoint may equal an endpoint because no representable number lies between the endpoints. Further subdivision is then impossible at the working precision.\n- Evaluation error: rounding, cancellation, or approximate function evaluation may produce an incorrect sign. The exact-arithmetic guarantee depends on reliable signs as well as continuity.\n- Computed zeros: a floating-point value of zero may result from underflow or cancellation rather than an exact mathematical root.\n\nVerified implementations can use interval arithmetic to enclose function values and certify signs when those enclosures exclude zero."
    },
    {
      "heading": "Limitations",
      "text": "Continuity is essential. Opposite endpoint signs do not by themselves establish a root. For example, \\(f(x)=1/x\\) has opposite signs at \\(-1\\) and \\(1\\), but no zero; it is undefined at the midpoint.\n\nSome roots do not change sign. The function \\(f(x)=(x-1)^2\\) is nonnegative on both sides of its root. Ordinary sign-bracketing bisection cannot detect that root from a surrounding interval with nonzero endpoint values. This issue commonly occurs at roots of even multiplicity.\n\nAn initial bracket must be supplied. Finding one may require sampling, expanding a search interval, or using analytical information. Bisection itself does not guarantee discovery of a suitable starting interval.\n\nFunction magnitude is largely unused. The update depends only on signs, so information that could support a larger or more accurate step is discarded. This makes the method predictable but often slower than alternatives."
    },
    {
      "heading": "Related methods and applications",
      "text": "The Newton method uses derivative information and can converge quadratically near a simple root under suitable conditions. It may, however, fail from an unsuitable initial point or leave the region of interest. The secant method avoids explicit derivatives and can converge faster than bisection, but does not generally preserve a bracket.\n\nBrent’s method combines bisection with secant and inverse quadratic interpolation steps. It retains a bracket while often requiring substantially fewer function evaluations than pure bisection. Such hybrid methods use bisection as a reliable fallback when an accelerated step is unsuitable.\n\nBisection is closely related to binary search: both repeatedly discard half of a search interval. Binary search usually locates a target or transition in ordered data; numerical bisection uses continuity and opposite signs to retain a zero.\n\nApplications include solving scalar equations in physical models, inverting monotonic functions, and finding quantiles by solving \\(F(x)=p\\) for a continuous, suitably bracketed cumulative distribution function. Distributions with jumps require a generalized-inverse formulation rather than assuming that the equation has a solution. In mathematical optimization, bisection can locate a zero of a derivative when the required continuity and sign conditions hold; identifying that zero as a minimum requires additional assumptions."
    }
  ],
  "links": [
    "numerical-analysis",
    "algorithm",
    "continuous-function",
    "mathematical-function",
    "intermediate-value-theorem",
    "equation",
    "monotonic-function",
    "derivative",
    "real-number",
    "big-o-notation",
    "polynomial",
    "mean-value-theorem",
    "floating-point-arithmetic",
    "interval-arithmetic",
    "newtons-method",
    "secant-method",
    "brents-method",
    "binary-search",
    "quantile",
    "cumulative-distribution-function",
    "mathematical-optimization"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}