2.5 Secant Method
1. Each of the following equations has a root on the interval (0,1). Perform the
secant method to determine p4, the fourth approximation to the location of the
root.
(a) ln(1 + x)cos x= 0 (b) x5+ 2x1 = 0
(c) exx= 0 (d) cos xx= 0
(a) Let f(x) = ln(1 + x)cos x. With p0= 0 and p1= 1, three iterations of the
secant method yield
(b) Let f(x) = x5+ 2x1. With p0= 0 and p1= 1, three iterations of the
secant method yield
(c) Let f(x) = exx. With p0= 0 and p1= 1, three iterations of the secant
method yield
(d) Let f(x) = cos xx. With p0= 0 and p1= 1, three iterations of the secant
method yield
2. Construct an algorithm for the secant method.
The stopping condition in STEP 3 is justified by the superlinear convergence (α
1.618) of the secant method.
3. Show that the equation for the secant method can be rewritten as
pn+1 =f(pn)pn1f(pn1)pn
f(pn)f(pn1).
Secant Method 3
Explain why this formula is inferior to the one used in the text.
We proceed as follows:
Note that both formulas for calculating pn+1 have the potential for cancellation
error. In the formula
4. Fill in the missing details in the derivation of the error evolution equation
pn+1 p(pnp)(pn1p)f′′ (p)
2f(p) + f′′ (p)(pn+pn12p).
First subtract the true root, p, from both sides of the recurrence formula for pn1,
4Section 2.5
In Exercises 5 – 8, an equation, an interval on which the equation has a root,
and the exact value of the root are specified.
(a) Perform seven (7) iterations of the secant method.
(b) For n2, compare |pnpn1|with |pn1p|and |pnp|.
(c) For n2, compute the ratio |pnp|/|pn1p|1.618 and show that this
value approaches (|f′′ (p)/2f(p)|)0.618.
5. The equation x3+x23x3 = 0 has a root on the interval (1,2), namely
x=3.
npn|pnpn1| |pnp| |pn1p| |pnp|/|pn1p|1.618
0 1.00000000
1 2.00000000
3 1.70541082 0.13398225 2.664 ×1021.606 ×1010.513
5 1.73199637 0.00313940 5.444 ×1053.085 ×1030.628
Note that for n3,|pnpn1|provides an excellent estimate for |pn1p|and
6. The equation x7= 3 has a root on the interval (1,2), namely x=7
Secant Method 5
npn|pnpn1| |pnp| |pn1p| |pnp|/|pn1p|1.618
0 1.00000000
2 1.01574803 0.98425197 1.542 ×1018.301 ×1010.208
4 1.25047859 0.22011299 8.055 ×1021.396 ×1011.949
Note that for n3,|pnpn1|provides an excellent estimate for |pn1p|and
7. The equation x313 = 0 has a root on the interval (2,3), namely 3
13.
Let f(x) = x313. Then f(x) = 3x2,f′′ (x) = 6x, and
npn|pnpn1| |pnp| |pn1p| |pnp|/|pn1p|1.618
1 3.00000000
3 2.33050735 0.06734946 2.083 ×1028.818 ×1021.059
5 2.35132751 0.00081302 7.179 ×1068.058 ×1040.727
Note that for n3,|pnpn1|provides an excellent estimate for |pn1p|and
8. The equation 1/x37 = 0 has a zero on the interval (0.01,0.1), namely x= 1/37.
npn|pnpn1| |pnp| |pn1p| |pnp|/|pn1p|1.618
0 0.01000000
2 0.02260000 0.00260000 4.427 ×1037.027 ×10313.491
4 0.02683849 0.00096249 1.885 ×1041.151 ×10310.729
Note that for n3,|pnpn1|provides an excellent estimate for |pn1p|and
9. The function f(x) = sin xhas a zero on the interval (3,4), namely x=π.
Perform five iterations of the secant method to approximate this zero, using
p0= 3 and p1= 4. Determine the absolute error in each of the computed
approximations. What is the apparent order of convergence? What explanation
can you provide for this behavior? (NOTE: If you have access to MAPLE,
perform seven iterations with the Digits parameter set to at least 100.)
n|pnp| |pnp|/|pn1p|2
1 8.584 ×101
3 2.134 ×1038.80074
5 5.644 ×1014 10.19759
Secant Method 7
this specific problem is better than the expected α1.618 for the secant method
10. (a) Verify that the equation x418x2+ 45 = 0 has a root on the interval
(1,2). Next, perform five iterations of the secant method, using p0= 1
and p1= 2. Given that the exact value of the root is x=3, compute the
absolute error in the approximations just obtained. What is the apparent
order of convergence? What explanation can you provide for this behavior?
(NOTE: If you have access to MAPLE, perform seven iterations with the
Digits parameter set to at least 100.)
(b) Verify that the equation x418x2+ 45 = 0 also has a root on the interval
(3,4). Perform seven iterations of the secant method, and compute the
absolute error in each approximation. The exact value of the root is 15.
What is the apparent order of convergence in this case? What explanation
can you provide for the different convergence behavior between parts (a)
and (b)?
n|pnp| |pnp|/|pn1p|2
21.410 ×1020.19642
45.493 ×1090.19449
Because the ratio in the third column of the table appears to have settled into
8Section 2.5
npn|pnp| |pnp|/|pn1p|1.618
3 3.85932813 1.366 ×1020.335
11. It was observed that Newton’s method provides only linear convergence towards
roots of multiplicity greater than one. How does the secant method perform
under such circumstances? Each of the following functions has a zero at the
specified location. Perform ten iterations of the secant method to locate these
zeros. Does the sequence generated by the secant method converge with order
α1.618 or has the order dropped to α= 1?
(a) f(x) = x(1 cos x) has a zero at x= 0 use p0=1 and p1= 2
(b) f(x) = 27x4+ 162x3180x2+ 62x7 has a zero at x= 1/3
(c) f(x) = x
1+x2500
841 121x
125 has a zero at x= 2.5
(a) Let f(x) = x(1 cos x). With p0=1and p1= 2, ten iterations of the
secant method yield
npn|pnp| |pnp|/|pn1p|
01.00000000
40.35355090 0.35355090 0.711
50.27156471 0.27156471 0.768
Secant Method 9
(b) Let f(x) = 27x4+ 162x3180x2+ 62x7. With p0= 0 and p1= 1, ten
npn|pnp| |pnp|/|pn1p|
0 0.00000000
2 0.09859155 0.23474178 0.352
4 0.18992728 0.14340605 0.713
6 0.25096822 0.08236511 0.748
8 0.28642787 0.04690546 0.753
clear that the order of convergence has dropped to linear.
npn|pnp| |pnp|/|pn1p|
0 2.00000000
2 46.00000000 43.50000000 87.000
4 2.90154959 0.40154959 0.902
6 2.63456117 0.13456117 0.652
8 2.55037793 0.05037793 0.622
12. Newton’s method approximates the zero of f(x) = x3+ 2x23x1 on the
interval (3,2) to within 9.436 ×1011 in 3 iterations and 6 function eval-
uations. How many iterations and how many function evaluations are needed
by the secant method to approximate this zero to a similar accuracy? Take
p0=2 and p1=3.
To 15 decimal places, the zero of f(x) = x3+2x23x1on the interval (3,2)
is 2.912229178484397. With p0=2and p1=3, the secant method yields
10 Section 2.5
npn
22.833333333333333
In Exercises 13 – 16 we will investigate the influence of the starting approxi-
mations p0and p1on the performance of the secant method. In each exercise,
apply the secant method to the indicated function using the indicated values
for p0and p1. Iterate until |pnpn1|<5×107. Record and compare the
final approximation and the number of iterations in each case.
13. f(x) = x3+ 2x23x1
(a) p0=3, p1=2(b) p0=2, p1=3(c) p0=4, p1=2
(d) p0=2, p1=4
Let f(x) = x3+ 2x23x1. The results obtained from the secant method using
(a) (b) (c) (d)
np0=3, p1=2p0=2, p1=3p0=4, p1=2p0=2, p1=4
03.0000000000 2.0000000000 4.0000000000 2.0000000000
14. f(x) = x3+ 2x23x1
(a) p0= 1, p1= 2 (b) p0= 2, p1= 1 (c) p0= 3, p1= 2
(d) p0= 2, p1= 3
Secant Method 11
Let f(x) = x3+ 2x23x1. The results obtained from the secant method using
(a) (b) (c) (d)
np0= 1, p1= 2 p0= 2, p1= 1 p0= 3, p1= 2 p0= 2, p1= 3
0 1.0000000000 2.0000000000 3.0000000000 2.0000000000
2 1.1000000000 1.1000000000 1.6538461538 1.6538461538
4 1.2034498609 1.1964853266 1.2483178273 1.2745475717
6 1.1986903248 1.1986913364 1.1989880967 1.1996947841
8 1.1986912435 1.1986912440 1.1986912564
15. f(x) = tan(πx)x6
(a) p0= 0, p1= 0.48 (b) p0= 0.24, p1= 0.48(c) p0= 0.4, p1= 0.48
Let f(x) = tan(πx)x6. The results obtained from the secant method using
12 Section 2.5
(a) (b) (c)
np0= 0, p1= 0.48 p0= 0.24, p1= 0.48 p0= 0.4, p1= 0.48
0 0.0000000000 0.2400000000 0.4000000000
2 0.1868365254 0.326454862258533 0.4208674108
4 1.2550766960 0.637104975140150 0.4620367140
53.4808530993 0.170321715296955 0.4470431841
7 83.4009233756 1.668744839753233 0.4511207210
10 7.2982933741 6.722758639606624 0.4510472588
11 7.3532403371 6.394525185882151
16. f(x) = x32x5
(a) p0= 1, p1= 3 (b) p0= 1, p1= 2 (c) p0= 3, p1= 2
Let f(x) = x32x5. The results obtained from the secant method using the
Secant Method 13
(a) (b) (c)
np0= 1, p1= 3 p0= 1, p1= 2 p0= 3, p1= 2
0 1.0000000000 1.0000000000 3.0000000000
2 1.5454545455 2.2000000000 2.0588235294
4 2.2003500782 2.0942329564 2.0945105536
17. The function f(x) = x3+ 2x23x1 has a simple zero on the interval (1,0).
Approximate this zero to within an absolute tolerance of 5 ×105.
npn
18. For each of the functions given below, use the secant method to approximate
all real roots. Use an absolute tolerance of 106as a stopping condition.
(a) f(x) = ex+x2x4
(b) f(x) = x3x210x+ 7
(c) f(x) = 1.05 1.04x+ ln x
(a) Let f(x) = ex+x2x4. Observe that the equation ex+x2x4 = 0 is
14 Section 2.5
np0=2, p1=1p0= 1, p1= 2
21.4332155776 1.1921393409
(b) Let f(x) = x3x210x+ 7. By trial and error, we find that f(4) <0,
np0=4, p1=3p0= 0, p1= 1 p0= 3, p1= 4
23.0294117647 0.7000000000 3.2500000000
(c) Let f(x) = 1.051.04x+ln x. Observe that the equation 1.051.04x+ln x=
Secant Method 15
np0= 0.80, p1= 0.85 p0= 1.10, p1= 1.15
3 0.8268947961 1.1096053349
19. Keller (“Probability of a Shutout in Racquetball,” SIAM Review, 26, 267-8,
1984) showed that the probability that Player A will shut out Player B in a
game of racquetball is given by
P=1 + w
2w
1w+w221
,
where wdenotes the probability that Player A will win any specific rally, inde-
pendent of the server. Determine the minimal value of wthat will guarantee
that Player A will shut out Player B in at least one-quarter of the games they
play. Repeat your calculations for at least half the games being shutouts and
at least three-quarters of the games being shutouts.
Let
nP= 0.25 P= 0.50 P= 0.75
3 0.7154534705 0.8506640530 0.9116135075
5 0.7599522840 0.8422953603 0.8991764038
7 0.7799794811 0.8423047910 0.8991989425
Thus, for Player Ato shut out Player Bin at least one-quarter of the games they
20. A couple wishes to open a money market account in which they will save the
down payment for purchasing a house. The couple has $13,000 from the sale of
some stock with which to open the account and plans to deposit an additional
$200 each month thereafter. By the end of three years, the couple hopes to
have saved $20,000. If the money market account pays an annual interest of
r%, compounded monthly, then at the end of three years, the balance of the
account will be
13000 1 + r
1236 + 2001 + r
12 36 1
r
12
.
What is the lowest interest rate which will achieve the couple’s goal of saving
$20,000? What is the lowest interest rate if the couple can raise their monthly
deposit to $250?
nrn
3 0.08611831
Secant Method 17
With the same starting values and convergence tolerance, the secant method now
yields
nrn
21. Suppose it was discovered that Commissioner Gordon had the flu when he
died, and his core temperature at the time of his death was 103F. With
k= 0.337114, solve the equation
72 + td1
k+18 + 1
kektd= 103,
to determine the time of death based on this new information. Does Doc B’s
alibi still hold?
Let k= 0.337114 and