{VERSION 6 0 "IBM INTEL LINUX" "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 "" -1 256 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 " times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }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 0 }1 0 0 0 8 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 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "R 3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 16 0 0 0 0 2 1 2 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 3" -1 258 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 0 2 2 2 0 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 " times" 0 1 0 0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}0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 280 1 {CSTYLE "" -1 -1 "times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 15 "Newton's Method" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 256 739 "Newton's method is able to find \+ a zero of a function by using a sequence of tangent line approximation s to the function. This worksheet makes an animation, where each slid e shows a step in the sequence of tangent line approximations. To us e this worksheet first choose a function, then the number of itteratio ns you want to be done, then give a starting point for Newtons Method. Execute the worksheet by press the !!! button. See how Newton's me thod approximates the zero by playing with the animation buttons. I h ope this gives some understanding of Newton's method, and of some of t he interesting and fun things Maple is capable of. If you want to se e how the program works, you can open up the hidden code, otherwise cl ose it." }}}{EXCHG {PARA 261 "" 0 "" {TEXT 257 42 "with(plots); is nee ded to do the animation" }{MPLTEXT 1 0 0 "" }}{PARA 262 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 263 "> " 0 "" {MPLTEXT 1 0 12 "with( plots):" }}}{EXCHG {PARA 264 "" 0 "" {TEXT 258 96 "Choose a function b y putting # in front of the ones you don't want, or type in your own f unction" }{MPLTEXT 1 0 1 " " }}{PARA 265 "> " 0 "" {MPLTEXT 1 0 70 "#g := x -> -x^3-2*x+4;\n#g := x -> cos(.5*(x+1));\ng := x -> exp(x+1)-1; " }}}{EXCHG {PARA 266 "" 0 "" {TEXT 259 55 "This specifies how many ti mes itterations will be done." }{MPLTEXT 1 0 0 "" }}{PARA 267 "> " 0 " " {MPLTEXT 1 0 5 "N:=5;" }}}{EXCHG {PARA 279 "" 0 "" {TEXT -1 37 "Sets inital guess for Newton's method" }{MPLTEXT 1 0 0 "" }}{PARA 280 "> \+ " 0 "" {MPLTEXT 1 0 10 "x[0] := 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "Choose the plot range. The animation will be plotted on the do main a..b" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "a:=-1; b:=3;" }}} {EXCHG {PARA 268 "" 0 "" {TEXT 260 86 "This is the plot of the functio n that we will use Newton's method to find the zero of." }{TEXT -1 1 " " }{MPLTEXT 1 0 0 "" }}{PARA 269 "> " 0 "" {MPLTEXT 1 0 18 "plot(g(x) ,x=a..b);" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT 262 11 "hidden code" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "I have most of the output suppres sed here because when running loops, the output can get huge. So \": \" instead of \";\" is at the end of most lines" }}}{EXCHG {PARA 260 " " 0 "" {TEXT -1 34 "define Newton's iteration function" }}{PARA 270 "> " 0 "" {MPLTEXT 1 0 25 "f := x -> x-g(x)/D(g)(x);" }}}{EXCHG {PARA 271 "" 0 "" {TEXT -1 105 "Assigns points an empty value, so that the f irst itteration in the following for loop won't give an error" }} {PARA 272 "> " 0 "" {MPLTEXT 1 0 13 "points:=NULL;" }}}{EXCHG {PARA 273 "" 0 "" {TEXT 261 75 "Creates endpoints of the tangent lines, whic h will be connected in plotting" }}{PARA 274 "> " 0 "" {MPLTEXT 1 0 110 "for n from 0 to 5 do\n points := points,[x[n],0],[x[n],g(x[n])] :\n Set[n]:= points:\n x[n+1]:= f(x[n]):\nod:" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 89 "Create procedure to make a plot using the poi nts in Set[i]. The procedure outputs Mplot." }{MPLTEXT 1 0 2 " " }} {PARA 275 "> " 0 "" {MPLTEXT 1 0 108 "Plotter:= proc(i)\n local Mplo t:\n Mplot := plot([[Set[i]],g(x)],x=a..b,style=line,color=[blue,red ]):\nend:" }}}{EXCHG {PARA 276 "" 0 "" {TEXT -1 28 "Creates a sequence of plots " }{MPLTEXT 1 0 0 "" }}{PARA 277 "> " 0 "" {MPLTEXT 1 0 45 " for i from 0 to N do\n P[i]:=Plotter(i):\nod:" }}}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 173 "This is the approximation of the zero found by Ne wton's method, and the function evaluated at that point. The function evaluated at that point should be very close to zero." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalf(x[n]); g(%);" }}} {EXCHG {PARA 278 "" 0 "" {TEXT -1 173 "Displays sequence of plots in a n animation. To view the animation, click on the plot. Then press th e play button on the panel. You can also view the slides one at a tim e." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display(seq(P[i],i=0..N),inse quence=true);" }}}}{MARK "8" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }