{VERSION 5 0 "IBM INTEL LINUX" "5.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 "" 1 18 0 0 0 0 0 1 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 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 " " 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 26 "Iterating the Logistic \+ Map" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 241 "T his worksheet iterates the function f(x)=rx(1-x). \nInteresting valu es to try are r = 1.5, r = 2.5, r = 3.0, and r = 3.9. For othe r values of r, you probably want to increase n1 to a larger value, e .g., 100 for r=3.9. \nYou might" }}{PARA 0 "" 0 "" {TEXT -1 106 "also try changing the value of the intial condition x0, and even the func tion f, e.g. make f(x) = cos(x)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(pl ots):" }{TEXT -1 0 "" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefined\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "(Note that the output of lines ending in a coln are not displa ced but are calculated. " }}{PARA 0 "" 0 "" {TEXT -1 91 "The output o f lines ending in a semicoln is displayed. A line must end in either \+ a coln or" }}{PARA 0 "" 0 "" {TEXT -1 12 "a semicoln.)" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "Summary of variables and functions used. " }}{PARA 0 "" 0 "" {TEXT -1 92 "f := x -> r*x*(1-x): Definition of \+ the function\nr: parameter value\nx0: initial condition" }}{PARA 0 " " 0 "" {TEXT -1 86 "n0: Initially there are n0 iterates that are not plotted. (Given the value of n0=0 " }}{PARA 0 "" 0 "" {TEXT -1 81 "t his step is skipped. Change the value of n0 to display the values of i terates.) " }}{PARA 0 "" 0 "" {TEXT -1 51 "n1: Then n1 more iterates \+ are calculated with the " }}{PARA 0 "" 0 "" {TEXT -1 80 "stair steps o r cobweb plotted on the graphical representation, and the values of" } }{PARA 0 "" 0 "" {TEXT -1 70 "the the iterates are displayed.\na: Lef t endpoint of interval plotted." }}{PARA 0 "" 0 "" {TEXT -1 42 "b: Ri ght endpoint of the interval plotted" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 30 "Parameter and variable values. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "r := 1.5:\nx0 := 0.1: \nn0 := 0:\nn1 := 8:\na := 0.0:\nb := 1.0:\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "Function iterated" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "f := x -> r*x*(1-x):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Calculate iterates which are not plotted." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "for i from 1 to n0 do\n x1:= f(x0):\n x0:=x1:\nod:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 " Calculate iterate which are plotted, and display the outcome. . " }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "pic := \{plot(\{f(x),x\},x= a..b, color=black)\}:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 176 "for i fro m 1 to n1 do\n x1:= f(x0):\n pic := pic union \{plot([[x 0,x0],[x0,x1],[x1,x1]], color=blue)\}:\n printf(`\\t%d\\t%1.7f \+ \\n`,n0+i, x0);\n x0:=x1:\nod:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "display(pic);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "The follow ing displays the values of the iterates rather the the graphical plot. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 403 "r := 3.2:\nx0 := 0. 1:\nx00 := x0:\nn0 := 64: #transient points not displayed\nn1 := 128: #number of iterates to print output\nfor i from 1 to n0 do\n \+ x0:= f(x0):\nod:\nfor i from 1 to n1 do\n x0:= f(x0):\nod:\npri ntf(`\\n\\t r = %1.4f \\n\\n`, r);\nprintf(`\\t x0 = %1.4f \\n\\n`, x0 0);\nprintf(`\\t i \\t\\t f^(i)(x0) \\n`);\nfor j from 1 to n1 do\n \+ x0 := f(x0):\n printf(`\\t %d \\t %1.4f \\n`, j+n0, x0 );\nod:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 8 } {VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }