{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 }{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 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 198 "This worksheet iterates the function f(x)=rx(1-x ). \nIt plots the graph of the 4-th iterate of f on the interval [ a,b].\nSo if n=4, then we plot the graph of f composed with itself 4 times. " }}{PARA 0 "" 0 "" {TEXT -1 207 "(The process g is the p ower f^n.)\nYou can use the graph to guess a point of period 4. Note that the deriviative of f^4 is \npositive at points of period 1 or 2, and negative at the points of period 4." }}{PARA 0 "" 0 "" {TEXT -1 57 "Let x0 be the value of this guess for a period-4 point." }} {PARA 0 "" 0 "" {TEXT -1 85 " Then the Newton's map gets a better appr oximation of the period-4 point by iterating" }}{PARA 0 "" 0 "" {TEXT -1 103 "N n1 = 10 times. \nLet x1 be the outcome of iterating Newt on's method. How many iterates of N were " }}{PARA 0 "" 0 "" {TEXT -1 143 "necessary to get a solution to 8 decimal places.\nFinally, the first n2 = 16 iterates of x1 by f are calculated to get the rest o f the orbit." }}{PARA 0 "" 0 "" {TEXT -1 99 "Note that the fourth iter ate is not exactly equal to x1 since x1 is on a repelling periodic or bit." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "r := 3.6:\nn := 4:\na := \+ 0.0:\nb := 1.0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "f := x \+ -> r*x*(1-x):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "g := proc( x)\n local y,i :\n y := x: \n for i from 1 to n do\n y := f(y ):\n od:\n y;\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 81 "pi c := \{plot(g(x),x=a..b, resolution = 2000)\}:\npic := pic union \{plo t(x,x=a..b)\}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "display(p ic);" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Calculate \+ the derivate of g(x) = f^n(x) using a loop" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 149 "dfn := proc(x)\n local s,z,j:\n z := x:\n s := r - 2*r*z:\n for j from 1 to n-1 do\n z := f(z): \n s := s*(r - 2*r*z):\n od:\n s;\nend: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Calculate the Newton map associated with g(x) - x = f^n( x) -x " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "N := proc(x)\n \+ local y:\n y := x - (g(x)-x)/(dfn(x)-1):\n y;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 123 "Make a guess for the point of period 4, x0 = .\nn1 is the numer of times that the Newton iteration process \+ will be taken." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "x0 := ;\n n1 := 10;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 141 "printf(`\\t k \\t\\t xk \\n`);\nprintf(`\\t 0 \\t %1.8f \\n`, x0);\nfor k from 1 t o n1 do\n x0 := N(x0):\n printf(`\\t %d \\t %1.8f \\n`, k, x0); \n od:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 147 "You should be able to see the point of period 4 in the above output.\nTake one of those point s and use it to define x1 below and then check that" }}{PARA 0 "" 0 "" {TEXT -1 87 "this point approximates a period-4 point by calculati ng the first n2 = 16 iterates by" }}{PARA 0 "" 0 "" {TEXT -1 75 "f a nd checking that the point repeats (approximately) every 4 iterates ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 159 "n2 := 16:\nx1 := :\np rintf(`\\t k \\t\\t xk \\n`);\nprintf(`\\t 0 \\t %1.8f \\n`, x1);\nfo r k from 1 to n2 do\n x1 := f(x1):\n printf(`\\t %d \\t %1.8f \\n` , k, x1); \nod:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }