ArticleslgStudy

computer science

Brent's method

Brent's method is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Brent's method rather than just read about it. In short: In numerical analysis, Brent's method is a hybrid root-finding algorithm combining the bisection method, the secant method and inverse quadratic interpolation. It has the reliability of bisection but it can be as quick as some of the less-reliable methods.

Brent's method — main illustration
Brent's method — illustration

Key takeaways

  • Brent's method belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Brent's method to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Brent's method from memory before moving on to harder problems.

Reference excerpt

In numerical analysis, Brent's method is a hybrid root-finding algorithm combining the bisection method, the secant method and inverse quadratic interpolation. It has the reliability of bisection but it can be as quick as some of the less-reliable methods. The algorithm tries to use the potentially fast-converging secant method or inverse quadratic interpolation if possible, but it falls back to the more robust bisection method if necessary. Brent's method is due to Richard Brent and builds on an earlier algorithm by Theodorus Dekker. Consequently, the method is also known as the Brent–Dekker method. Modern improvements on Brent's method include Chandrupatla's method, which is simpler and faster for functions that are flat around their roots; Ridders' method, which performs exponential interpolations instead of quadratic providing a simpler closed formula for the iterations; and the ITP method which is a hybrid between regula-falsi and bisection that achieves optimal worst-case and asymptotic guarantees.

Dekker's method The idea to combine the bisection method with the secant method goes back to Dekker (1969). Suppose that one wants to solve the equation f(x) = 0. As with the bisection method, one needs to initialize Dekker's method with two points, say a0 and b0, such that f(a0) and f(b0) have opposite signs. If f is continuous on [a0, b0], the intermediate value theorem guarantees the existence of a solution between a0 and b0. Three points are involved in every iteration:

bk is the current iterate, i.e., the current guess for the root of f. ak is the "contrapoint", i.e., a point such that f(ak) and f(bk) have opposite signs, so the interval [ak, bk] contains the solution. Furthermore, |f(bk)| should be less than or equal to |f(ak)|, so that bk is a better guess for the unknown solution than ak. bk−1 is the previous iterate (for the first iteration, one sets bk−1 = a0). Two provisional values for the next iterate are computed. The first one is given by linear interpolation, also known as the secant method:

s={bk−bk−bk−1f(bk)−f(bk−1)f(bk),if f(bk)≠f(bk−1)motherwise and the second one is given by the bisection method

m=ak+bk2. If the result of the secant method, s, lies strictly between bk and m, then it becomes the next iterate (bk+1 = s), otherwise the midpoint is used (bk+1 = m). Then, the value of the new contrapoint is chosen such that f(ak+1) and f(bk+1) have opposite signs. If f(ak) and f(bk+1) have opposite signs, then the contrapoint remains the same: ak+1 = ak. Otherwise, f(bk+1) and f(bk) have opposite signs, so the new contrapoint becomes ak+1 = bk. Finally, if |f(ak+1)| < |f(bk+1)|, then ak+1 is probably a better guess for the solution than bk+1, and hence the values of ak+1 and bk+1 are exchanged. This ends the description of a single iteration of Dekker's method. Dekker's method performs well if the function f is reasonably well-behaved. However, there are circumstances in which every iteration employs the secant method, but the iterates bk converge very slowly (in particular, |bk − bk−1| may be arbitrarily small). Dekker's method requires far more iterations than the bisection method in this case.

Brent's method Brent (1973) proposed a small modification to avoid the problem with Dekker's method. He inserts an additional test which must be satisfied before the result of the secant method is accepted as the next iterate. Two inequalities must be simultaneously satisfied: Given a specific numerical tolerance δ, if the previous step used the bisection method, the inequality |δ|<|bk−bk−1| must hold to perform interpolation, otherwise the bisection method is performed and its result used for the next iteration. If the previous step performed interpolation, then the inequality |δ|<|bk−1−bk−2| is used instead to perform the next action (to choose) interpolation (when inequality is true) or bisection method (when inequality is not true). Also, if the previous step used the bisection method, the inequality |s−bk|<12|bk−bk−1| must hold, otherwise the bisection method is performed and its result used for the next iteration. If the previous step performed interpolation, then the inequality |s−bk|<12|bk−1−bk−2| is used instead. This modification ensures that at the kth iteration, a bisection step will be performed in at most 2log2(|bk−1−bk−2|/δ) additional iterations, because the above conditions force consecutive interpolation step sizes to halve every two iterations, and after at most 2log2(|bk−1−bk−2|/δ) iterations, the step size will be smaller than δ, which invokes a bisection step. Brent proved that his method requires at most N2 iterations, where N denotes the number of iterations for the bisection method. If the function f is well-behaved, then Brent's method will usually proceed by either inverse quadratic or linear interpolation, in which case it will converge superlinearly. Furthermore, Brent's method uses inverse quadratic interpolation instead of linear interpolation (as used by the secant method). If f(bk), f(ak) and f(bk−1) are distinct, it slightly increases the efficiency. As a consequence, the condition for accepting s (the value proposed by either linear interpolation or inverse quadratic interpolation) has to be changed: s has to lie between (3ak + bk) / 4 and bk.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Brent's method

Start with the simplest possible case. Write down what Brent's method claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Brent's method before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Brent's method ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Brent's method

In research
Brent's method appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Brent's method in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Brent's method is common in secondary-school and first-year university syllabi. It links to neighbouring topics Root-finding algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Brent's method outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Brent's method” →

How to study Brent's method in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Brent's method means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Brent's method out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Brent's method in simple terms?

In numerical analysis, Brent's method is a hybrid root-finding algorithm combining the bisection method, the secant method and inverse quadratic interpolation. It has the reliability of bisection but it can be as quick as some of the less-reliable methods.

Why does Brent's method matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Brent's method?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Brent's method.

Tags

  • Root-finding algorithms

Keep exploring