Chapter 1: Limits
Section 1.7: Intermediate Value Theorem
Example 1.7.1
Use bisection to approximate the zeros of f⁡x=x5−4⁢x2+2x−1.
Solution
From the graph of f in Figure 1.7.1(a), it would appear that there are three zeros located one each in the following three intervals: −1,−0.5,0.5,0.9,1.1,1.5.
Note how the vertical asymptote at x=1 is avoided as an endpoint of an interval that "traps" a zero.
The three zeros are, in fact, −0.6807685310, 0.7471268154, and 1.450025320, as found by Maple's floating-point solver. These values certainly fall within the three intervals obtained from Figure 1.7.1(a).
Below, the bisection algorithm is detailed, and its connection to the Intermediate Value theorem explained.
Student:-Precalculus:-RationalFunctionPlot((x^5-4*x^2+2)/(x-1),view=[-2..2,-20..20],caption="",verticalasymptoteoptions=[color=green,linestyle=dot],tickmarks=[10,5]);
Figure 1.7.1(a) Graph of fx=x5−4⁢x2+2/x−1
Define the function f
Control-drag (or type) fx=… Context Panel: Assign Function
f⁡x=x5−4⁢x2+2x−1→assign as functionf
Verify that f has different signs at the endpoints of each interval
Leftmost interval
f−1 = 32
f−0.5 = −0.6458333333
Middle interval
f0.5 = −2.062500000
f0.9 = 6.495100000
Rightmost interval
f1.1 = −12.29490000
f1.5 = 1.187500000
Alternate verification
If the product fa⋅fb<0, then fa and fb differ in sign. If the product is zero, then one of a or b is a zero!
f−1⋅f−0.5 = −0.9687500000f0.5⋅f0.9 = −13.39614375f1.1⋅f1.5 = −14.60019375
If the sign of a continuous function changes at the endpoints of an interval a,b, then, by the Intermediate Value theorem, the function must take the value zero somewhere between a and b. This is the essence of the idea behind the bisection method.
In Maple's implementation of the method, the function is evaluated at the midpoint p=a+b/2, and the half-interval in across which there continues to be a sign change is retained. This process is repeated until the zero is "trapped" in a sufficiently small interval. The midpoint of this last interval is then taken as the approximation to the zero.
Tables 1.7.1(a-c) display the output of Maple's Bisection command used to approximate each of the three zeros of the given function f.
interface(rtablesize=100):
Student:-NumericalAnalysis:-Bisection(f(x),[-1,-.5],output=information,maxiterations=50,stoppingcriterion=function_value,tolerance=1e-6);
Table 1.7.1(a) Bisection approximates leftmost zero as p20, at which point fp20<10−7
The endpoints of the retained half-interval are given as an and bn. The midpoint of the retained half-interval is given as pn. The next-to-last column list the values fpn and the last column lists fpn, the stopping criterion used for this, and the following two tables. The help page for the Bisection command details alternate stopping criteria; the full syntax of the commands used generate Tables 1.7.1(a-c) are hidden behind the table cells.
Student:-NumericalAnalysis:-Bisection(f(x),[0.5,0.9],output=information,maxiterations=50,stoppingcriterion=function_value,tolerance=1e-7);
Table 1.7.1(b) Bisection approximates middle zero as p23, at which point fp23<10−7
Bisection is a slowly converging method for root-finding. The smaller the initial interval, the fewer the iterations needed to approximate a zero to the desired accuracy.
Student:-NumericalAnalysis:-Bisection(f(x),[1.1,1.5],output=information,maxiterations=50,stoppingcriterion=function_value,tolerance=1e-7);
Table 1.7.1(c) Bisection approximates rightmost zero as p23, at which point fp23<10−7
<< Previous Section Section 1.7 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document