{
  "id": "brents-method",
  "title": "Brent's Method",
  "lang": "en",
  "source_lang": "en",
  "summary": "Brent’s method is a derivative-free root-finding algorithm that combines bracketing with interpolation for reliability and speed; the name also denotes a related minimization algorithm.",
  "category": "mathematics",
  "subcategory": "applied",
  "type": "concept",
  "aliases": [
    "Brent–Dekker method",
    "Van Wijngaarden–Dekker–Brent method"
  ],
  "generated_at": "2026-11-06",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/brents-method/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/brents-method/",
      "json": "https://aiwiki.page/zh/brents-method.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Brent’s method is an algorithm in numerical analysis for finding a zero of a real-valued function within an interval whose endpoints have opposite function signs. It combines the reliability of the bisection method with the speed of the secant method and inverse quadratic interpolation. Interpolation proposes a potentially fast step; safeguards reject unsuitable proposals and replace them with bisection. The method requires function evaluations but no derivatives.\n\nThe name also refers to a distinct, closely related algorithm for one-dimensional minimization, which combines parabolic interpolation with golden-section search. Unless the context is optimization, “Brent’s method” usually means the root-finding algorithm."
    },
    {
      "heading": "Root-finding problem and assumptions",
      "text": "The root-finding problem is to determine a number \\(r\\) satisfying\n\n\\[f(r)=0.\\]\n\nBrent’s root-finding method starts with an interval \\([a,b]\\) such that \\(f\\) is a continuous function on the interval and\n\n\\[f(a)f(b)<0.\\]\n\nBy the intermediate value theorem, this interval contains at least one root. If an endpoint already satisfies \\(f(x)=0\\), it can be returned immediately.\n\nThe initial interval is called a bracket. The method preserves a sign-changing bracket as it proceeds, providing an enclosure for at least one root even when interpolation gives poor predictions. It does not require the function to be monotonic or the root to be unique. When several roots lie within the bracket, however, the method does not generally specify which one will be found.\n\nContinuity is essential to the existence guarantee. A discontinuous function can change sign without vanishing: for example, \\(f(x)=1/x\\) has opposite signs at \\(-1\\) and \\(1\\), but has no zero between them and is undefined at the origin."
    },
    {
      "heading": "The component methods",
      "text": "Bisection\n\nBisection evaluates the midpoint\n\n\\[m=a+\\frac{b-a}{2}\\]\n\nand retains whichever half-interval still brackets a root. After \\(n\\) bisection steps, an initial interval of width \\(W\\) has width\n\n\\[\\frac{W}{2^n}.\\]\n\nThis reduction is predictable and does not depend on the local shape of the function. Its limitation is that it does not use function magnitudes to accelerate convergence.\n\nSecant interpolation\n\nGiven two points \\(x_0,x_1\\) with unequal function values, the secant method proposes\n\n\\[s=x_1-f(x_1)\\frac{x_1-x_0}{f(x_1)-f(x_0)}.\\]\n\nThis is the zero of the straight line through the two sampled points. Near a sufficiently smooth simple root, secant steps can converge faster than bisection. Used alone, however, they need not remain inside a root bracket and can fail to converge.\n\nInverse quadratic interpolation\n\nWith three points \\(x_0,x_1,x_2\\) whose function values \\(y_i=f(x_i)\\) are distinct, inverse quadratic interpolation fits a quadratic approximation to \\(x\\) as a function of \\(y=f(x)\\). Evaluating that approximation at \\(y=0\\) gives\n\n\\[s= x_0\\frac{y_1y_2}{(y_0-y_1)(y_0-y_2)} + x_1\\frac{y_0y_2}{(y_1-y_0)(y_1-y_2)} + x_2\\frac{y_0y_1}{(y_2-y_0)(y_2-y_1)}.\\]\n\nThis is an application of interpolation in which the roles of argument and function value are reversed. Unlike ordinary quadratic interpolation of \\(f(x)\\), it does not require choosing between two roots of a fitted quadratic.\n\nUnder suitable smoothness and nondegeneracy assumptions near a simple root, standalone inverse quadratic interpolation has an asymptotic order of convergence of approximately \\(1.839\\). This describes favorable local behavior of the interpolation process, not an unconditional rate for every run of Brent’s safeguarded algorithm."
    },
    {
      "heading": "How the root-finding algorithm works",
      "text": "Implementations differ in notation and bookkeeping, but the central structure is consistent.\n\nThe algorithm maintains:\n\n- two points whose function values have opposite signs;\n- a preferred approximation, normally the bracket endpoint with the smaller absolute function value;\n- a previous point and information about recent step sizes.\n\nEach iteration proceeds conceptually as follows:\n\n- Check termination. Stop if a function value is zero or the remaining bracket is sufficiently small.\n- Construct an interpolation proposal. Use inverse quadratic interpolation when three suitable, distinct function values are available; otherwise use a secant step.\n- Apply safeguards. Reject a proposal that is outside the permitted part of the bracket, is too large relative to recent steps, or fails the algorithm’s progress tests.\n- Bisect if necessary. When interpolation is rejected, use the bracket midpoint.\n- Evaluate the new point. Update the sign-changing bracket and rearrange the stored points as required.\n\nThe safeguards are more restrictive than simply requiring the proposed point to lie inside the bracket. An interior proposal can still make almost no progress—for example, by repeatedly landing very close to one endpoint. Brent’s acceptance rules use recent step lengths to prevent such stagnation and force bisection when necessary.\n\nThus, Brent’s method is not merely an arbitrary alternation between bisection and interpolation. Its defining feature is the controlled acceptance of fast steps within a bracketing framework."
    },
    {
      "heading": "Convergence and stopping criteria",
      "text": "For a continuous function with a valid initial bracket, the safeguarded method converges in exact arithmetic without requiring a good initial approximation to a particular root. This is often called global convergence, meaning convergence from an admissible bracket, not the ability to discover every root or to start from any pair of numbers.\n\nIts speed depends on the function:\n\n- Near a smooth simple root, accepted interpolation steps often produce superlinear convergence.\n- When interpolation is unreliable, bisection restores dependable interval reduction.\n- Flat, nonsmooth, or poorly resolved functions can cause more frequent fallback steps.\n\nBrent’s method therefore combines a bracketing guarantee with favorable local acceleration. This does not mean that every iteration halves the bracket, or that every implementation always uses no more evaluations than pure bisection.\n\nA common stopping rule combines absolute and relative tolerances, schematically as\n\n\\[|b-a| \\leq \\varepsilon_{\\mathrm{abs}} + \\varepsilon_{\\mathrm{rel}}\\max(|a|,|b|).\\]\n\nThe exact constants and interpretation vary between software libraries. If a root remains bracketed, the bracket width supplies a direct bound on positional uncertainty: any point in the bracket is at most its full width from at least one enclosed root, while its midpoint is at most half the width away.\n\nA small residual, \\(|f(x)|\\), is not by itself a universal guarantee of a small root error. Near a differentiable simple root \\(r\\),\n\n\\[x-r\\approx \\frac{f(x)}{f'(r)}.\\]\n\nConsequently, a small derivative can make the root location sensitive even when the residual is small. This connects stopping criteria to the conditioning of the root-finding problem."
    },
    {
      "heading": "Numerical implementation",
      "text": "Several details matter in floating-point arithmetic:\n\n- Sign comparisons: explicitly forming \\(f(a)f(b)\\) may overflow or underflow. Implementations can instead handle zero values and compare signs directly.\n- Interpolation denominators: equal or nearly equal function values can make interpolation undefined or numerically unreliable.\n- Representable movement: a proposed increment may be too small to change the current floating-point number. Implementations need a minimum effective step or an appropriate termination test.\n- Nonfinite values: infinities and undefined numerical results require explicit handling; the usual convergence assumptions do not cover them.\n- Evaluation reuse: storing previously computed function values avoids unnecessary calls, which can dominate the cost of the calculation.\n\nStable implementations often evaluate algebraically rearranged interpolation expressions rather than the displayed inverse-quadratic formula. Mathematical equivalence does not imply identical numerical stability."
    },
    {
      "heading": "Example",
      "text": "Consider\n\n\\[f(x)=x^3-x-2.\\]\n\nSince\n\n\\[f(1)=-2,\\qquad f(2)=4,\\]\n\nthe interval \\([1,2]\\) brackets a root. A secant proposal from these endpoints is\n\n\\[s=2-4\\frac{2-1}{4-(-2)} =\\frac{4}{3}.\\]\n\nAt this point,\n\n\\[f\\left(\\frac{4}{3}\\right)=-\\frac{26}{27},\\]\n\nso evaluating the proposal gives a narrower sign-changing bracket,\n\n\\[\\left[\\frac{4}{3},2\\right].\\]\n\nAs additional points become available, inverse quadratic interpolation can propose more accurate estimates. Safeguards retain the ability to bisect if those proposals are unsuitable. The root in the original interval is approximately\n\n\\[r\\approx 1.5213797068.\\]\n\nExact trial points and iteration counts depend on the implementation and stopping tolerances."
    },
    {
      "heading": "Brent’s minimization method",
      "text": "The optimization algorithm also called Brent’s method seeks a local minimum of a scalar objective function without derivatives. It combines:\n\n- Parabolic interpolation, which fits a quadratic through sampled points and proposes its minimizer;\n- Golden-section search, which reduces an interval without relying on an accurate parabolic model.\n\nA typical minimum bracket consists of three ordered points \\(a<x<b\\) with\n\n\\[f(x)<f(a),\\qquad f(x)<f(b).\\]\n\nA parabolic step is accepted only when its geometry and size satisfy suitable safeguards. Otherwise, the algorithm takes a golden-section step.\n\nThis differs fundamentally from root finding: opposite function signs play no role. Bracketing a minimum also does not establish that it is the global minimum over a larger domain. Unimodality—having a single minimum within the search interval—provides the standard setting for reliable interval reduction toward the desired minimizer.\n\nBrent’s minimization method is used in one-dimensional searches and in line searches within larger optimization algorithms. Noise, multiple local minima, and nearly flat objective functions can weaken the usefulness of parabolic interpolation."
    },
    {
      "heading": "History, uses, and limitations",
      "text": "Richard P. Brent developed the root-finding algorithm from earlier hybrid bracketing and interpolation work associated with Theodorus Dekker. Brent described the improved algorithm in a 1971 paper and treated both root finding and derivative-free minimization in his 1973 book Algorithms for Minimization Without Derivatives.\n\nThe root-finding method is widely used in scientific software. Examples include SciPy’s brentq and the GNU Scientific Library’s Brent solver. Related routines can use different interpolation formulas or acceptance rules, so the name alone does not specify an identical evaluation sequence.\n\nTypical applications include solving scalar nonlinear equations, inverting monotonic functions, determining threshold crossings, and obtaining distribution quantiles from cumulative probabilities. Compared with Newton’s method, Brent’s method avoids derivative calculations and preserves a root bracket; Newton’s method can be faster locally when accurate derivatives and a suitable initial approximation are available.\n\nImportant limitations include:\n\n- A suitable sign-changing bracket must first be found.\n- Roots of even multiplicity usually do not change the function’s sign and therefore cannot generally be detected by sign bracketing alone.\n- A bracket containing several roots does not identify a particular one.\n- Discontinuities can invalidate the root-existence guarantee.\n- Noisy or inaccurate function evaluations can corrupt both sign decisions and interpolation.\n- The standard method solves a scalar real problem, not a system of nonlinear equations or a general complex root-finding problem."
    }
  ],
  "links": [
    "numerical-analysis",
    "bisection-method",
    "secant-method",
    "derivative",
    "mathematical-optimization",
    "continuous-function",
    "intermediate-value-theorem",
    "interpolation",
    "condition-number",
    "floating-point-arithmetic",
    "numerical-stability",
    "objective-function",
    "line-search",
    "newtons-method"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}