Secant Method (Sauer)
Secant Method (Sauer)
f (xi ) f (xi1 )
.
xi xi1
A straight replacement of this approximation for f (xi ) in Newtons Method yields the
Secant Method.
Secant Method
x0 , x1 = initial guesses
f (xi )(xi xi1 )
xi+1 = xi for i = 1, 2, 3, . . . .
f (xi ) f (xi1 )
Unlike Fixed-Point Iteration and Newtons Method, two starting guesses are needed to
begin the Secant Method.
It can be shown that under the assumption that the Secant Method converges to r and
f (r) = 0, the approximate error relationship
f (r)
ei+1 ei ei1
2f (r)
f (r) 1
ei+1 ei ,
2f (r)
where = (1 + 5)/2 1.62. (See Exercise 6.) The convergence of the Secant Method
to simple roots is called superlinear, meaning that it lies between linearly and quadratically
convergent methods.
62 | CHAPTER 1 Solving Equations
x
x0 x2 1
x3 x1
Figure 1.11 Two steps of the Secant Method. Illustration of Example 1.16. Starting
with x0 = 0 and x1 = 1, the Secant Method iterates are plotted along with the secant
lines.
EXAMPLE 1.16 Apply the Secant Method with starting guesses x0 = 0, x1 = 1 to nd the root of f (x) =
x 3 + x 1.
The formula gives
(xi3 + xi 1)(xi xi1 )
xi+1 = xi . (1.34)
xi3 + xi (xi1
3 +x
i1 )
i xi
0 0.00000000000000
1 1.00000000000000
2 0.50000000000000
3 0.63636363636364
4 0.69005235602094
5 0.68202041964819
6 0.68232578140989
7 0.68232780435903
8 0.68232780382802
9 0.68232780382802
There are three generalizations of the Secant Method that are also important. The
Method of False Position, or Regula Falsi, is similar to the Bisection Method, but where
the midpoint is replaced by a Secant Methodlike approximation. Given an interval [a, b]
that brackets a root (assume that f (a)f (b) < 0), dene the next point
f (a)(a b) bf (a) af (b)
c=a =
f (a) f (b) f (a) f (b)
as in the Secant Method, but unlike the Secant Method, the new point is guaranteed to
lie in [a, b], since the points (a, f (a)) and (b, f (b)) lie on separate sides of the x-axis.
1.5 Root-Finding without Derivatives | 63
The new interval, either [a, c] or [c, b], is chosen according to whether f (a)f (c) < 0 or
f (c)f (b) < 0, respectively, and still brackets a root.
The Method of False Position at rst appears to be an improvement on both the Bisection
Method and the Secant Method, taking the best properties of each. However, while the
Bisection Method guarantees cutting the uncertainty by 1/2 on each step, False Position
makes no such promise, and for some examples can converge very slowly.
EXAMPLE 1.17 Apply the Method of False Position on initial interval [1, 1] to nd the root r = 0 of
f (x) = x 3 2x 2 + 32 x.
Given x0 = 1, x1 = 1 as the initial bracketing interval, we compute the new point
Since f (1)f (4/5) < 0, the new bracketing interval is [x0 , x2 ] = [1, 0.8]. This completes
the rst step. Note that the uncertainty in the solution has decreased by far less than a factor
of 1/2. As Figure 1.12(b) shows, further steps continue to make slow progress toward the
root at x = 0.
y y
1 x4 1 x4
x x
1 x3 x2 1 1 x2 1
x0 x1 x0 x3 x1
1 1
2 2
3 3
4 4
5 5
(a) (b)
Figure 1.12 Slow convergence in Example 1.17. Both the (a) Secant Method and (b)
Method of False Position converge slowly to the root r = 0.
with the x-axis. The parabola will generally intersect in 0 or 2 points. If there are two inter-
section points, the one nearest to the last point x2 is chosen to be x3 . It is a simple matter of
the quadratic formula to determine the two possibilities. If the parabola misses the x-axis,
there are complex number solutions. This enables software that can handle complex arith-
metic to locate complex roots. We will not pursue this idea further, although there are several
sources in the literature that follow this direction.
Inverse Quadratic Interpolation (IQI) is a similar generalization of the Secant
Method to parabolas. However, the parabola is of form x = p(y) instead of y = p(x),
as in Mullers Method. One problem is solved immediately: This parabola will intersect the
x-axis in a single point, so there is no ambiguity in nding xi+3 from the three previous
guesses, xi , xi+1 , and xi+2 .
The second-degree polynomial x = P (y) that passes through the three points (a, A),
(b, B), (c, C) is
This is an example of Lagrange interpolation, one of the topics of Chapter 3. For now, it
is enough to notice that P (A) = a, P (B) = b, and P (C) = c. Substituting y = 0 gives a
formula for the intersection point of the parabola with the x-axis. After some rearrangement
and substitution, we have
where q = f (xi )/f (xi+1 ), r = f (xi+2 )/f (xi+1 ), and s = f (xi+2 )/f (xi ). Given three ini-
tial guesses, the IQI method proceeds by iterating (1.37), using the new guess xi+3 to replace
the oldest guess xi . An alternative implementation of IQI uses the new guess to replace one
of the previous three guesses with largest backward error.
Figure 1.13 compares the geometry of Mullers Method with Inverse Quadratic Inter-
polation. Both methods converge faster than the Secant Method due to the higher-order
interpolation. We will study interpolation in more detail in Chapter 3. The concepts of the
Secant Method and its generalizations, along with the Bisection Method, are key ingredients
of Brents Method, the subject of the next section.
Quadratic Interpolation method is attempted, and the result is used to replace one of xi , ai , bi
if (1) the backward error improves and (2) the bracketing interval is cut at least in half. If not,
the Secant Method is attempted with the same goal. If it fails as well, a Bisection Method
step is taken, guaranteeing that the uncertainty is cut at least in half.
xIQI
x0 x2 x x1 x
M
Figure 1.13 Comparison of Mullers Method step with Inverse Quadratic Iteration
step. The former is determined by an interpolating parabola y = p(x); the latter, by an
interpolating parabola x = p(y).
ans=
0.68232780382802
looks for a root of f (x) near x = 1 by rst locating a bracketing interval and then applying
Brents Method.
66 | CHAPTER 1 Solving Equations
1.5 Exercises
1. Apply two steps of the Secant Method to the following equations with initial guesses x0 = 1
and x1 = 2. (a) x 3 = 2x + 2 (b) ex + x = 7 (c) ex + sin x = 4
2. Apply two steps of the Method of False Position with initial bracket [1, 2] to the equations of
Exercise 1.
3. Apply two steps of Inverse Quadratic Interpolation to the equations of Exercise 1. Use initial
guesses x0 = 1, x1 = 2, and x2 = 0, and update by retaining the three most recent
iterates.
4. A commercial sher wants to set the net at a water depth where the temperature is 10 degrees
C. By dropping a line with a thermometer attached, she nds that the temperature is 8 degrees
at a depth of 9 meters, and 15 degrees at a depth of 5 meters. Use the Secant Method to
determine a best estimate for the depth at which the temperature is 10.
5. Derive equation (1.36) by substituting y = 0 into (1.35).
6. If the Secant Method converges to r, f (r) = 0, and f (r) = 0, then the approximate error
relationship ei+1 |f (r)/(2f (r))|ei ei1 can be shown to hold. Prove that if in addition
limi ei+1 /ei exists and is nonzero for some > 0, then = (1 + 5)/2 and
ei+1 |(f (r)/2f (r))|1 ei .
7. Consider the following four methods for calculating 21/4 , the fourth root of 2. (a) Rank
them for speed of convergence, from fastest to slowest. Be sure to give reasons for your
ranking.
(A) Bisection Method applied to f (x) = x 4 2
(B) Secant Method applied to f (x) = x 4 2
x 1
(C) Fixed Point Iteration applied to g(x) = + 3
2 x
x 1
(D) Fixed Point Iteration applied to g(x) = + 3
3 3x
(b) Are there any methods that will converge faster than all above suggestions?
4. Set f (x) = 54x 6 + 45x 5 102x 4 69x 3 + 35x 2 + 16x 4. Plot the function on the
interval [2, 2], and use the Secant Method to nd all ve roots in the interval. To which of the
roots is the convergence linear, and to which is it superlinear?
5. In Exercise 1.1.6, you were asked what the outcome of the Bisection Method would be for
f (x) = 1/x on the interval [2, 1]. Now compare that result with applying fzero to the
problem.
6. What happens if fzero is asked to nd the root of f (x) = x 2 near 1 (do not use a
bracketing interval)? Explain the result. (b) Apply the same question to f (x) = 1 + cos x
near 1.