{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0
0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 14 0
0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 1 14 0 0 0 0 0 1 0 0
0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 261 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 1 14 0 0 0 0 0 1 0 0 0
0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }
{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1
{CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }1 0 0 0 6 6 0 0
0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0
0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Title
" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }3 0 0
-1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "" 18 256 1 {CSTYLE "" -1 -1 "" 0
1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }
{PSTYLE "" 4 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 4 258 1 {CSTYLE "" -1
-1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1
0 }{PSTYLE "" 4 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE ""
-1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0
-1 0 }{PSTYLE "" 0 261 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0
0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 262 1 {CSTYLE "
" -1 -1 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0
0 -1 0 }}
{SECT 0 {PARA 256 "" 0 "" {TEXT -1 41 "Solving f(a) = b: The Method of
Bisection" }}{PARA 257 "" 0 "" {TEXT -1 9 "Jim Herod" }}{PARA 258 ""
0 "" {TEXT -1 42 "P O Box 1038\nGrove Hill, Alabama 36461\nUSA" }}
{PARA 259 "" 0 "" {TEXT -1 13 "herod@tds.net" }}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 256
12 "Background: " }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 260 "" 0 "" {TEXT -1 31 "The Intermediate Value Theorem." }}
{PARA 0 "" 0 "" {TEXT -1 184 "Suppose that f is continuous on the clos
ed interval [a,b], and f(a) < f(b). If c is a number between f(a) and
f(b), then there is a number x in the interval (a, b) such that f(x) \+
= c." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 ""
}}{PARA 0 "" 0 "" {TEXT 257 27 "Explanation of the Problem:" }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 48 "Consider the gr
aph of tan(x) on the interval [-2" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }
{TEXT -1 0 "" }{TEXT -1 3 ", 2" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT
-1 0 "" }{TEXT -1 3 "]. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "
plot(tan(x),x=-2*Pi..2*Pi,y=-10..10,discont=true);" }}}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 237 " It is clear from t
his graph that there is an infinity of numbers x such that tan(x) + x \+
= 0. Three of them are visible in this graph. As an aid for approximat
ing the values for such x's, we superimpose the graph of tan(x) and of
- x." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "plot(\{tan(x),-x\},
x=-2*Pi..2*Pi,y=-10..10,discont=true);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 65 " We wish to know the first positive x such that tan(x
) = - x." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1
0 "" }}{PARA 0 "" 0 "" {TEXT 258 27 "Illustration of the Method:" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 306 " We \+
define a function f for which we will find a zero. In this case, we ta
ke f(x) to be tan(x) + x. Thus, we seek x so that f(x) = 0. From looki
ng at the previous graph, we see that a zero of this function should l
ie between 1.8 and 2.2. In fact, here is a graph of this f over the in
terval [1.8, 2.2]." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f:=x->
tan(x)+x;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "plot(f(x),x=1.
8..2.2,y=-5..5,discont=true);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1
223 " When setting an upper and lower bound for the zero of f, it i
s a good idea to draw a graph over that interval as we just did above.
Such a graph can serve as a check that there is a zero in the interva
l we have chosen. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 181 " We now make a routine for which we can input the le
ft end point, the right endpoint, and error tolerance for the accuracy
we allow. The scheme will determine if the values of f" }}{PARA 0 ""
0 "" {TEXT -1 69 " at \+
a and at " }{XPPEDIT 18 0 "(a+b)/2" "6#*&,&%\"aG\"\"\"%\"bGF&F
&\"\"#!\"\"" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 334 "have oppo
site signs. If they do, a new interval is made from a to this midpoint
. If not, a new interval is made from this midpoint to b. In either ca
se, according to the Intermediate Value Theorem, a zero for f will lie
in the new interval. We continue this process until the endpoints of \+
the intervals are within the error tolerance." }}{PARA 0 "" 0 ""
{TEXT -1 146 " The scheme is built as a procedure with input the f
unction f, the left and right endpoints for the initial interval, and \+
the error tolerance." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 199 "bisect:=proc(f,left,right, err)\n\011loc
al mid,a,b;\n\011a:=left;\n\011b:=right;\n\011while b - a > 2*err do\n
\011\011mid:=(a+b)/2:\n\011\011if evalf(f(a)*f(mid)) < 0 then\n\011
\011\011b:=mid\n\011\011else\n\011\011\011a:=mid\n\011\011fi;\n\011od;
\n\011RETURN(mid);\n\011end:" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 56 " Here are the choices for the input i
n this example." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "left:=1.7
; right:=5/2; err:=0.0007;" }}}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA
0 "" 0 "" {TEXT -1 99 " We call the routine and expect as output a
n approximation for x which satisfies tan(x) = - x. " }}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 31 "ans:=bisect(f,left,right,err); " }}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 57 " It s
eems appropriate to see how close the answer is." }}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 14 "evalf(f(ans));" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT 259 27 "Exercise 1 for the reader:" }}{PARA 0 "" 0 "" {TEXT -1
56 "Find the second positive number x such that tan(x) = -x." }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{PARA 261 "" 0 "" {TEXT -1 20 "Rate of conve
rgence:" }}{PARA 0 "" 0 "" {TEXT -1 171 "If we consider the most recen
tly computed midpoint as an approximation of the root, one may say tha
t the approximation error is halved at each bisection iteration. Becau
se" }}{PARA 0 "" 0 "" {TEXT -1 16 " " }{XPPEDIT 18 0 "1
/2^4" "6#*&\"\"\"F$*$\"\"#\"\"%!\"\"" }{TEXT -1 5 " < " }{XPPEDIT
18 0 "1/10" "6#*&\"\"\"F$\"#5!\"\"" }{TEXT -1 4 " < " }{XPPEDIT 18 0
"1/2^3" "6#*&\"\"\"F$*$\"\"#\"\"$!\"\"" }{TEXT -1 1 "," }}{PARA 0 ""
0 "" {TEXT -1 90 "we might say that one significant decimal place in t
hree or four iterations is determined." }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT 260 21 "Pathological Example:" }}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 11 "Pathology 1" }}
{PARA 0 "" 0 "" {TEXT -1 389 "The method of bisection is but one of a \+
collection of methods for finding zeros of a function -- that is, for \+
finding solutions x for an equation of the form f(x) = 0. In the above
illustration, if f(x) = tan(x) + x, then we found zeros for the equat
ion f(x) = 0. This method does not work if a zero is a local maximum \+
or minimum for the function f. For example, consider solutions x for \+
" }{XPPEDIT 18 0 "exp(2*x)=3*x+3/2*(1-ln(3/2)" "6#/-%$expG6#*&\"\"#\"
\"\"%\"xGF),&*&\"\"$F)F*F)F)*(F-F)F(!\"\",&F)F)-%#lnG6#*&F-F)F(F/F/F)F
)" }{TEXT -1 111 ". A look at the following graph suggests why this me
thod will not work for finding solutions for this equation." }}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "plot(exp(2*x)-3*x-3/2*(1-ln(3/2)),x
=0..1);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 265
12 "Pathology 2." }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 171 "The \+
method of bisection can fail to work if the function is not continuous
within the interval of the initial guess. For example, Check tan(x) +
x at x = 1, and at x = 2. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
58 "evalf(subs(x=1,tan(x) + x)); \nevalf(subs(x=2,tan(x) + x));" }}}
{PARA 0 "" 0 "" {TEXT -1 147 "The naive, unsuspecting pupil will think
there should be a number x between one and two for which tan(x) + x =
0. The student knows this is not so." }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT 264 27 "Exercise 2 for the reader:" }}
{PARA 0 "" 0 "" {TEXT -1 53 "Draw the graph of tan(x) + x on the inter
val [ 1, 2]." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0
"" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 261 19 "Reference Materi
al:" }}{PARA 0 "" 0 "" {TEXT -1 87 "(1) A statement of the Intermediat
e-Value Theorem is on page 119 of Stanley Grossman's " }{TEXT 262 8 "C
alculus" }{TEXT -1 17 " (Fifth Edition)." }}{PARA 0 "" 0 "" {TEXT -1
64 "(2) A proof of the Intermediate-Value Theorem is on page 153 on "
}{TEXT 263 29 "The Elements of Real Analysis" }{TEXT -1 62 " (Second E
dition), Robert G. Bartle, John Wiley & Sons (1976)." }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 16 "Unassisted Mapl
e" }}{PARA 0 "" 0 "" {TEXT -1 361 "You will not be surprised to know t
hat Maple has the ability to find zeros of functions without human int
erference. We illustrate Maple's routine next. Look back up at the gra
phs of tan(x) and of -x superimposed and you can see that there will b
e a zero of tan(x) + x between the numbers where tan(x) is undefined
. We use that fact to direct the Maple search." }}{EXCHG {PARA 0 "> "
0 "" {MPLTEXT 1 0 76 "for n from 1 to 5 do\n fsolve(tan(x)+x=0,x,(2*
n-1)*Pi/2..(2*n+1)*Pi/2);\nod;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 0 "" }}}}}{MARK "2 0" 38 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }
{PAGENUMBERS 0 1 2 33 1 1 }