{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 257 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 257 "" 0 "" {TEXT -1 15 "Logistic Models" }} {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 procedure requires \+ three arguments.\n\n" }{TEXT 257 4 "fcn " }{TEXT -1 100 " -- the funct ion 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 shown in the cobweb dia gram \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\nc obweb := \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 cobweblist := cobweb list union\n \{line([PopModel(fcn, first, j-2), PopModel(fc n, first, j-1)],\n [PopModel(fcn, first, j-1), PopMod el(fcn, first, j-1)]), \n line([PopModel(fcn, first, j-1), PopModel(fcn, first, j-1)],\n [PopModel(fcn, first, \+ j-1), PopModel(fcn, first, j)])\}\n od:\n\n frm := display(\{l ine([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 = CONST RAINED):\n\n blk := plot(f(p),\n p = 0..top,\n \+ y = 0..top,\n color = BLACK,\n \+ scaling = CONSTRAINED):\n\n rd := display(cobwe blist,\n color = RED,\n axes = N ONE,\n scaling = CONSTRAINED):\n\n blu := displ ay(\{line([0, 0], [top, top])\},\n color = BLUE,\n \+ axes = NONE,\n scaling = CONSTRA INED):\n\n display([blk, rd, blu, frm]); \n end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 133 "The foll owing cell illustrates how this new procedure can used along with othe r 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 359 " f := p -> a * (1 - p / c) * p:\n\n a := 3.0:\n c := 1000.0:\n\n cobweb(f, 50, 30, 1000);\n\n pop := proc(n) option remember;\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, p op(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 2 2" 87 }{VIEWOPTS 1 1 0 1 1 1803 }