{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 30 "Sequences -- Longterm Be havior" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "The cell below defines a procedure -- " }{TEXT 256 6 "cobweb" } {TEXT -1 89 " -- that can be used to draw cobweb diagrams.\nThis proc edure 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 " -- the 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 show n in the cobweb diagram \n\n" }{TEXT 260 27 "Evaluate the cell below n ow" }{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 loca l blk, rd, blu, frm, cobweblist, j;\n\n cobweblist := \{line([firs t, 0], [first, fcn(first)])\}:\n\n for j from 3 to n do\n c obweblist := 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([PopMode l(fcn, first, j-1), PopModel(fcn, first, j-1)],\n [Po pModel(fcn, first, j-1), PopModel(fcn, first, j)])\}\n od:\n\n \+ frm := display(\{line([0, 0], [0, top]),\n line([ 0, top], [top, top]),\n line([top, top], [top, 0]) ,\n line([top, 0], [0, 0])\},\n \+ color = BLACK,\n axes = NONE,\n \+ scaling = CONSTRAINED):\n\n blk := plot(f(p),\n \+ p = 0..top,\n y = 0..top,\n \+ color = BLACK,\n scaling = CONSTRAINED):\n\n r d := display(cobweblist,\n color = RED,\n \+ axes = NONE,\n scaling = CONSTRAINED):\n \n blu := display(\{line([0, 0], [top, top])\},\n \+ color = BLUE,\n axes = NONE,\n \+ scaling = 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 along 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 reme mber;\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" 30 }{VIEWOPTS 1 1 0 1 1 1803 }