Root-Finding Methods: Choosing and Checking an Approximation

Root-finding methods approximate an input that makes an equation true. You encounter them when a simulation must locate a threshold, a calibration equation must be solved, or an engineering model cannot be rearranged conveniently. The central decisions are how to produce the next approximation and how to judge whether it is accurate enough. Bisection and the secant method make different tradeoffs between reliability and speed.

Turning an equation into a root problem

A root of a function is an input rr for which the function equals zero. To solve an equation such as L(x)=R(x)L(x)=R(x), put everything on one side:


f(x)=L(x)−R(x),f(r)=0.f(x)=L(x)-R(x),\qquad f(r)=0.


An approximation x^\hat{x} generally leaves a small nonzero function value. This value, f(x^)f(\hat{x}), is the residual. Its units are those of the function, which can differ from the units of the input.


Before choosing a method, identify the physically meaningful input range and check that the function is defined there. A mathematical root outside the model's valid range may not answer the original question.

Choosing how to move toward a root

A bracket is an interval known to contain at least one root. A useful way to establish one is to find opposite endpoint signs while checking continuity throughout the interval:


f(a)f(b)<0.f(a)f(b)<0.


Here, continuity matters: a sign change across an undefined point does not establish a root.


A continuous graph crosses the horizontal axis between endpoints with opposite function signs.


Bisection evaluates the midpoint:


m=a+b2.m=\frac{a+b}{2}.


If f(m)=0f(m)=0, the midpoint is a root. Otherwise, retain whichever half has opposite signs at its endpoints. Each update halves the bracket width while preserving an enclosed root.



The secant method uses two previous estimates and the straight line through their function values. Its next estimate is where that line reaches zero:


xk+1=xk−f(xk)xk−xk−1f(xk)−f(xk−1).x_{k+1}=x_k-f(x_k)\frac{x_k-x_{k-1}}{f(x_k)-f(x_{k-1})}.


The denominator must be nonzero. A very small denominator can produce a large step. Unlike bisection, the secant update does not automatically retain a bracket.


Consideration

Bisection

Secant method

Starting information

Continuous function and opposite endpoint signs

Two estimates with different function values

Next estimate

Midpoint of the current bracket

Zero of a line through two function values

Reliability

Preserves an enclosed root under its assumptions

Can leave the starting interval or fail to converge

Progress

Bracket width halves every update

Often faster near a simple root, but speed varies


A simple root is the usual setting for the secant method's fast local convergence. Choose bisection when a dependable location bound matters. Consider the secant method when function evaluations are costly and suitable starting estimates are available.

Knowing when to stop

For bisection, let W0=b0−a0W_0=b_0-a_0. After nn bracket halvings, the retained width is


Wn=W02n.W_n=\frac{W_0}{2^n}.


If you then report the midpoint x^\hat{x} of that retained bracket, its distance from an enclosed root is bounded by


∣x^−r∣≤Wn2=W02n+1.|\hat{x}-r|\leq\frac{W_n}{2}=\frac{W_0}{2^{n+1}}.


This bound applies to the midpoint of the retained bracket, so identify exactly which interval your reported estimate uses.


A residual test instead checks whether ∣f(x^)∣|f(\hat{x})| is below a chosen threshold. It measures how closely the equation is satisfied, rather than directly bounding input error. Multiplying a function by a small constant reduces every residual without changing any root.



Use tolerances suited to the requested quantity and its units. An implementation should also stop and report failure if it reaches an iteration limit or encounters an invalid evaluation. Reaching an iteration limit is not evidence of convergence.

What to remember

  • Rewrite the target equation as f(x)=0f(x)=0 and respect the model's domain.
  • Bisection requires continuity and preserves a sign-changing bracket.
  • Secant updates can be faster, but do not supply the same bracket guarantee.
  • Match the stopping test to the accuracy you need in the input or function value.

Example: Locating a cart's threshold time

Example: A cart's position during a test is modelled by


s(t)=(1.00 m/s2)t2+(2.00 m/s)t,s(t)=(1.00\ \text{m/s}^2)t^2+(2.00\ \text{m/s})t,


where tt is time after release. The model is valid from 00 to 3 s3\ \text{s}. You need the time when the cart reaches 5.00 m5.00\ \text{m}. Use root-finding methods with


f(t)=s(t)−5.00 m.f(t)=s(t)-5.00\ \text{m}.


The residual f(t)f(t) is the signed difference between the modelled position and the target position. It has units of metres, while the root being sought has units of seconds.


a) Establish that [1.00,2.00] s[1.00,2.00]\ \text{s} encloses a threshold time.


Evaluate the function at each endpoint, retaining units throughout:


f(1.00 s)=(1.00 m/s2)(1.00 s)2+(2.00 m/s)(1.00 s)−5.00 m=−2.00 m.f(1.00\ \text{s})=(1.00\ \text{m/s}^2)(1.00\ \text{s})^2+(2.00\ \text{m/s})(1.00\ \text{s})-5.00\ \text{m}=-2.00\ \text{m}.


The first endpoint residual is ________. At the other endpoint,


f(2.00 s)=(1.00 m/s2)(2.00 s)2+(2.00 m/s)(2.00 s)−5.00 m=3.00 m.f(2.00\ \text{s})=(1.00\ \text{m/s}^2)(2.00\ \text{s})^2+(2.00\ \text{m/s})(2.00\ \text{s})-5.00\ \text{m}=3.00\ \text{m}.


The second endpoint residual is ________. The model is a continuous polynomial, and these values have opposite signs. Therefore at least one threshold time lies between 1.001.00 and 2.00 s2.00\ \text{s}.


Answer: [1.00,2.00] s[1.00,2.00]\ \text{s} is a valid starting bracket.


b) Perform two bisection updates and state the retained interval.


First average the starting endpoints. The first trial time is ________:


m1=1.00+2.002 s=1.50 s.m_1=\frac{1.00+2.00}{2}\ \text{s}=1.50\ \text{s}.


Substituting it into the function gives


f(m1)=(2.25+3.00−5.00) m=0.25 m.f(m_1)=(2.25+3.00-5.00)\ \text{m}=0.25\ \text{m}.


This residual is ________. It is positive, so pair it with the negative residual at 1.00 s1.00\ \text{s}. Retain [1.00,1.50] s[1.00,1.50]\ \text{s}.


Average these new endpoints for the second trial:


m2=1.00+1.502 s=1.25 s.m_2=\frac{1.00+1.50}{2}\ \text{s}=1.25\ \text{s}.


Its residual is


f(m2)=(1.5625+2.50−5.00) m=−0.9375 m.f(m_2)=(1.5625+2.50-5.00)\ \text{m}=-0.9375\ \text{m}.


This value is negative, while the residual at 1.50 s1.50\ \text{s} is positive. Keep the half with opposite endpoint signs.


Answer: After two updates, the retained interval is [1.25,1.50] s[1.25,1.50]\ \text{s}, with width 0.25 s0.25\ \text{s}.


c) How many additional bracket halvings guarantee that the midpoint of the final retained interval is within 0.020 s0.020\ \text{s} of an enclosed threshold time? Do not assume that an exact root is encountered early.


A midpoint is at most half the bracket width from an enclosed root. The required final width is therefore at most ________, because


W2≤0.020 s⟹W≤0.040 s.\frac{W}{2}\leq0.020\ \text{s}\quad\Longrightarrow\quad W\leq0.040\ \text{s}.


The current width is 0.25 s0.25\ \text{s}. If kk further halvings are performed, require


0.25 s2k+1≤0.020 s.\frac{0.25\ \text{s}}{2^{k+1}}\leq0.020\ \text{s}.


Two additional halvings give a midpoint error bound of 0.25/8=0.03125 s0.25/8=0.03125\ \text{s}, which is too large. Three additional halvings give


0.2516 s=0.015625 s,\frac{0.25}{16}\ \text{s}=0.015625\ \text{s},


which meets the requirement. This guarantee concerns time error; the residual values in metres are a different measure.


Answer: Perform 33 additional halvings, for 55 halvings in total, and then report the midpoint of the retained interval.

A simulation uses a function ff that is continuous throughout [2,4][2,4], with f(2)=−3f(2)=-3 and f(4)=5f(4)=5. Which conclusion is guaranteed by this information?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A numerical routine solves the dimensionless equation f(x)=x2−7=0f(x)=x^2-7=0 by bisection, starting from [2,3][2,3]. Complete the first two iterations. Each row's endpoints describe the interval retained after evaluating that row's midpoint. Enter exact integers or terminating decimals without units.

IterationMidpointFunction value at midpointRetained left endpointRetained right endpoint
1
2

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A sensor's continuous threshold function has opposite signs at t=0 st=0\ \text{s} and t=12 st=12\ \text{s}. A bisection routine performs nn bracket halvings, then reports the midpoint of the retained bracket. What minimum nn guarantees an error no greater than 0.010 s0.010\ \text{s} from an enclosed threshold time? Enter an integer number of halvings, to zero decimal places. Use the bracket-width guarantee without assuming that an exact root is encountered early.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice