> #Timothy Nasralla, HW22, 11/22/21 > #Question 1 done on paper > #Question 2a: #The first question asks about a discrete system of hares and > lynxes (which I will label as x(n) and y(n) respectively). Based on the > conditions described, x(n) = 3*y(n-1) + x(n-1) and y(n) = 3*x(n-1) + 2*y(n-1) > is the system. To find how they are after 10 years, I will use the Orb > function. > read "/Users/tan88/OneDrive - Rutgers University/DMB.txt" First Written: Nov. 2021 This is DMB.txt, A Maple package to explore Dynamical models in Biology (both discrete and continuous) accompanying the class Dynamical Models in Biology, Rutgers University. Taught by Dr. Z. (Doron Zeilbeger) The most current version is available on WWW at: http://sites.math.rutgers.edu/~zeilberg/tokhniot/DMB.txt . Please report all bugs to: DoronZeil at gmail dot com . For general help, and a list of the MAIN functions, type "Help();". For specific help type "Help(procedure_name);" ------------------------------ For a list of the supporting functions type: Help1(); For help with any of them type: Help(ProcedureName); ------------------------------ For a list of the functions that give examples of Discrete-time dynamical systems (some famous), type: HelpDDM(); For help with any of them type: Help(ProcedureName); ------------------------------ For a list of the functions continuous-time dynamical systems (some famous) type: HelpCDM(); For help with any of them type: Help(ProcedureName); ------------------------------ > #Note: Since Orb starts at time t = 0, and the question states the initial > conditions are at year 1, I set K2 to 9 instead of 10. > Orb([3*y+x,3*x+2*y],[x,y],[10,20],8,9) [[2540440, 2999150], [11537890, 13619620], [52396750, 61852910]] > #At year 10, there are 52396750 hares and 61852910 lynxes. > #Question 2b: This question asks about the rate of change and is therefore in > continous time. I will label hares as x(t) and lynxes as y(n), such that the > system described is x'(t) = 3*y(t) + x(t) and y'(t) = 2*y(t) + 3*x(t). > f := diff(x(t),t) = 3*y(t) + x(t), diff(y(t),t) = 2*y(t) + 3*x(t) > want := {x(t), y(t)}; > fnew := dsolve({f, x(0) = 10, y(0) = 20}, want) > evalf(subs(t=10, fnew)) / 20 20\ { x(10) = 7.419856090 10 , y(10) = 8.758846450 10 } \ / > #In an even more exponential growth than in the first question, there are > 7.41998*10^20 hares and 8.7588*10^20 lynxes at year 10. > #Question 3: Conjecture 1 claims that for all a/(b+c) < 1, the limit as n > approaches infinity of (x(n), y(n)) is the solution to (b + c)x* = y*(l - > exp(-ax*)) and y* = 1 - x(1 + c/b) #x(n) = x(n-1) * ( 1- b - c) + y(n-1) * (1 > - exp(-a * x(n-1)) #y(n) = (1-y(n-1)) * b + y(n-1) * exp( -a * x(n-1)) > #Since a has to be greater than 0, and b+c have to be greater than 0 and less > than or equal to 1, a must be capped at less than or equal to 1. Also note > that the population was normalized to be 1. > #x(n) = x(n-1) * (1- 0.5- 0.5) + y(n) * (1-exp(-1*x(n-1)) and y(n) = > (1-y(n-1)) * 0.5 + y(n-1) * exp(-1*x(n-1)) > #Orb([y*(1-exp(-x), 0.5-0.5*y + y*exp(-x)], [x,y], > evalf(EquP([y * (1. -exp(-x)), (1. -y) * 0.5 + y * exp(-x)],[x,y])) {[-6.283185307 I _Z1, -1.]} Warning, solutions may have been lost [[x = 0., y = 1.000000000]] > evalf(EquP([y*(1-exp(-x)), 1-2*x], [x,y])) {[0.5000000000, 0.]} > #Orb([x*(0.1)+y*(1-exp(-x)), 0.5-0.5*y+y*exp(-x)], [x,y], [0,1], 1000, 1020) > #Question 4: Conjecture 2 claims that if a/b > 1, then the solution of the > function 4 ( x(n+1) = x(n) * (1-b) + (1-x(n)) * (1- exp(-a*x(n-1)). B ranges > from 0 to 1, a is greater than 0 and therefore must be less than 1. The > solution of function 4 satisfies lim n--> infinity equaling x star, where x > star is equal to (1-xstar) (1- exp(-a*xstar)) / b > solve(x= (1-x)*(1-exp(-a*x))/b,x) Warning, solutions may have been lost > #Question 5 was done on paper