{VERSION 2 3 "APPLE_68K_MAC" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 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 -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 1 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 -1 28 "Sequences -- Cobweb Diag rams" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "T he cell below defines a procedure -- " }{TEXT 256 6 "cobweb" }{TEXT -1 89 " -- that can be used to draw cobweb diagrams.\nThis procedure \+ requires three arguments.\n\n" }{TEXT 257 4 "fcn " }{TEXT -1 100 " -- \+ the function that describes how each term of the sequence is computed \+ from the preceding term.\n\n" }{TEXT 258 5 "first" }{TEXT -1 50 " -- t he value of the first term of the sequence.\n\n" }{TEXT 259 1 "n" } {TEXT -1 76 " -- the number of terms of the sequence to be shown in th e cobweb diagram \n\n" }{TEXT 260 27 "Evaluate the cell below now" } {TEXT -1 4 ". \n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1488 "with (plots):\nwith(plottools):\n\nPopModel :=\n proc(fcn, first, n) \n if n <= 1 then first else fcn(PopModel(fcn, first, n-1)) fi:\n end:\n\ncobweb := \n proc(fcn, first, n, top)\n local blk , rd, blu, frm, cobweblist, j;\n\n cobweblist := \{line([first, 0] , [first, fcn(first)])\}:\n\n for j from 3 to n do\n cobweb list := cobweblist union\n \{line([PopModel(fcn, first, j-2 ), PopModel(fcn, first, j-1)],\n [PopModel(fcn, first , j-1), PopModel(fcn, first, j-1)]), \n line([PopModel(fcn , first, j-1), PopModel(fcn, first, j-1)],\n [PopMode l(fcn, first, j-1), PopModel(fcn, first, j)])\}\n od:\n\n frm \+ := display(\{line([0, 0], [0, top]),\n line([0, to p], [top, top]),\n line([top, top], [top, 0]),\n \+ line([top, 0], [0, 0])\},\n col or = BLACK,\n axes = NONE,\n s caling = CONSTRAINED):\n\n blk := plot(f(p),\n \+ p = 0..top,\n y = 0..top,\n colo r = BLACK,\n scaling = CONSTRAINED):\n\n rd := display(cobweblist,\n color = RED,\n \+ axes = NONE,\n scaling = CONSTRAINED):\n\n \+ blu := display(\{line([0, 0], [top, top])\},\n co lor = BLUE,\n axes = NONE,\n sca ling = CONSTRAINED):\n\n display([blk, rd, blu, frm]); \n end: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 133 "The following cell illustrates how this new procedure can used al ong with other Maple procedures to investigate long term behavior. " }{TEXT 261 16 "Evaluate it now." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 337 " f := p -> 4.0 * (1 - .001 \+ * p) * p:\n cobweb(f, 50, 30, 1000);\n\n pop := proc(n) option remem ber;\n if n = 1 then 50 else f(pop(n-1)) fi\n end:\n\n for k from 1 to 30 \n do printf(`%4d %10.4f`, k, pop(k));\n \+ print();\n od;\n\n plot([seq([n, pop(n)], n = 1 .. 30)], \n \+ year = 1 .. 30, title = `Population`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 19 }{VIEWOPTS 1 1 0 1 1 1803 }