> #OK to post #Timothy Nasralla, HW19, 11/8/21 read "/Users/tan88/OneDrive - > Rutgers University/M19.txt" > #Question 1, With total amount of people = 1000 and initial infected being > 200, and beta varying between 2/10*(nu/N) to 4*(nu/N), apply the SIRSdemo > function. > SIRSdemo(1000,20, 3,1,0.01,10) This is a numerical demonstration of the R0 phenomenon in the SIRS model using discretization with mesh size=, 0.01, and letting it run until time t=, 10 with population size, 1000, and fixed parameters nu=, 1, and gamma=, 3 where we change beta from 0.2*nu/N to 4*nu/N Recall that the epidemic will persist if beta exceeds nu/N, that in this case is, 1 ---- 1000 We start with , 20, infected individuals, 0 removed and hence, 980, susceptible We will show what happens once time is close to, 10 1 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [998.9666995, 0.9909989667]], [9.99, [998.9666995, 0.9909989667]], [10.00, [998.9666995, 0.9909989667]], [10.01, [998.9666995, 0.9909989667]]] 3 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [996.7009881, 2.978970309]], [9.99, [996.7009881, 2.978970309]], [10.00, [996.7009881, 2.978970309]], [10.01, [996.7009881, 2.978970309]]] 1 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [994.1715221, 4.974854288]], [9.99, [994.1715221, 4.974854288]], [10.00, [994.1715221, 4.974854288]], [10.01, [994.1715221, 4.974854288]]] 7 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [991.3807432, 6.978577656]], [9.99, [991.3807432, 6.978577656]], [10.00, [991.3807432, 6.978577656]], [10.01, [991.3807432, 6.978577656]]] 9 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [988.3315033, 8.990054852]], [9.99, [988.3315033, 8.990054852]], [10.00, [988.3315033, 8.990054852]], [10.01, [988.3315033, 8.990054852]]] 11 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [985.0270559, 11.00918827]], [9.99, [985.0270559, 11.00918827]], [10.00, [985.0270559, 11.00918827]], [10.01, [985.0270559, 11.00918827]]] 13 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [981.4710448, 13.03586861]], [9.99, [981.4710448, 13.03586861]], [10.00, [981.4710448, 13.03586861]], [10.01, [981.4710448, 13.03586861]]] 3 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [977.6674954, 15.06997519]], [9.99, [977.6674954, 15.06997519]], [10.00, [977.6674954, 15.06997519]], [10.01, [977.6674954, 15.06997519]]] 17 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [973.6207880, 17.11137641]], [9.99, [973.6207880, 17.11137641]], [10.00, [973.6207880, 17.11137641]], [10.01, [973.6207880, 17.11137641]]] 19 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [969.3356625, 19.15993017]], [9.99, [969.3356625, 19.15993017]], [10.00, [969.3356625, 19.15993017]], [10.01, [969.3356625, 19.15993017]]] 21 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [964.8171889, 21.21548438]], [9.99, [964.8171889, 21.21548438]], [10.00, [964.8171889, 21.21548438]], [10.01, [964.8171889, 21.21548438]]] 23 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [960.0707540, 23.27787743]], [9.99, [960.0707540, 23.27787743]], [10.00, [960.0707540, 23.27787743]], [10.01, [960.0707540, 23.27787743]]] 5 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [955.1020424, 25.34693878]], [9.99, [955.1020424, 25.34693878]], [10.00, [955.1020424, 25.34693878]], [10.01, [955.1020424, 25.34693878]]] 27 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [949.9170181, 27.42248951]], [9.99, [949.9170181, 27.42248951]], [10.00, [949.9170181, 27.42248951]], [10.01, [949.9170181, 27.42248951]]] 29 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [944.5219042, 29.50434292]], [9.99, [944.5219042, 29.50434292]], [10.00, [944.5219042, 29.50434292]], [10.01, [944.5219042, 29.50434292]]] 31 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [938.9231630, 31.59230516]], [9.99, [938.9231630, 31.59230516]], [10.00, [938.9231630, 31.59230516]], [10.01, [938.9231630, 31.59230516]]] 33 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [933.1274743, 33.68617582]], [9.99, [933.1274743, 33.68617582]], [10.00, [933.1274743, 33.68617582]], [10.01, [933.1274743, 33.68617582]]] 7 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [927.1417149, 35.78574860]], [9.99, [927.1417149, 35.78574860]], [10.00, [927.1417149, 35.78574860]], [10.01, [927.1417149, 35.78574860]]] 37 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [920.9729366, 37.89081195]], [9.99, [920.9729366, 37.89081195]], [10.00, [920.9729366, 37.89081195]], [10.01, [920.9729366, 37.89081195]]] 39 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [914.6283445, 40.00114971]], [9.99, [914.6283445, 40.00114971]], [10.00, [914.6283445, 40.00114971]], [10.01, [914.6283445, 40.00114971]]] > #At time t = 10, there were 40 out of the 1000 people infected still showing > that the epidemic has decreased dramatically (with approximately 46 people > being removed sadly). > SIRSdemo(1000,20, 3,2,0.01,10) This is a numerical demonstration of the R0 phenomenon in the SIRS model using discretization with mesh size=, 0.01, and letting it run until time t=, 10 with population size, 1000, and fixed parameters nu=, 2, and gamma=, 3 where we change beta from 0.2*nu/N to 4*nu/N Recall that the epidemic will persist if beta exceeds nu/N, that in this case is, 1 --- 500 We start with , 20, infected individuals, 0 removed and hence, 980, susceptible We will show what happens once time is close to, 10 1 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [998.9334028, 0.9819978668]], [9.99, [998.9334028, 0.9819978668]], [10.00, [998.9334028, 0.9819978668]], [10.01, [998.9334028, 0.9819978668]]] 3 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [996.4021571, 2.957935239]], [9.99, [996.4021571, 2.957935239]], [10.00, [996.4021571, 2.957935239]], [10.01, [996.4021571, 2.957935239]]] 1 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [993.3444243, 4.949667221]], [9.99, [993.3444243, 4.949667221]], [10.00, [993.3444243, 4.949667221]], [10.01, [993.3444243, 4.949667221]]] 7 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [989.7667603, 6.956997143]], [9.99, [989.7667603, 6.956997143]], [10.00, [989.7667603, 6.956997143]], [10.01, [989.7667603, 6.956997143]]] 9 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [985.6773407, 8.979679729]], [9.99, [985.6773407, 8.979679729]], [10.00, [985.6773407, 8.979679729]], [10.01, [985.6773407, 8.979679729]]] 11 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [981.0859054, 11.01742279]], [9.99, [981.0859054, 11.01742279]], [10.00, [981.0859054, 11.01742279]], [10.01, [981.0859054, 11.01742279]]] 13 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [976.0036933, 13.06988925]], [9.99, [976.0036933, 13.06988925]], [10.00, [976.0036933, 13.06988925]], [10.01, [976.0036933, 13.06988925]]] 3 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [970.4433513, 15.13669951]], [9.99, [970.4433513, 15.13669951]], [10.00, [970.4433513, 15.13669951]], [10.01, [970.4433513, 15.13669951]]] 17 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [964.4188648, 17.21743410]], [9.99, [964.4188648, 17.21743410]], [10.00, [964.4188648, 17.21743410]], [10.01, [964.4188648, 17.21743410]]] 19 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [957.9454478, 19.31163661]], [9.99, [957.9454478, 19.31163661]], [10.00, [957.9454478, 19.31163661]], [10.01, [957.9454478, 19.31163661]]] 21 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [951.0394420, 21.41881679]], [9.99, [951.0394420, 21.41881679]], [10.00, [951.0394420, 21.41881679]], [10.01, [951.0394420, 21.41881679]]] 23 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [943.7182062, 23.53845386]], [9.99, [943.7182062, 23.53845386]], [10.00, [943.7182062, 23.53845386]], [10.01, [943.7182062, 23.53845386]]] 5 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [936.0000016, 25.67000000]], [9.99, [936.0000016, 25.67000000]], [10.00, [936.0000016, 25.67000000]], [10.01, [936.0000016, 25.67000000]]] 27 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [927.9038734, 27.81288385]], [9.99, [927.9038734, 27.81288385]], [10.00, [927.9038734, 27.81288385]], [10.01, [927.9038734, 27.81288385]]] 29 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [919.4495312, 29.96651411]], [9.99, [919.4495312, 29.96651411]], [10.00, [919.4495312, 29.96651411]], [10.01, [919.4495312, 29.96651411]]] 31 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [910.6572285, 32.13028319]], [9.99, [910.6572285, 32.13028319]], [10.00, [910.6572285, 32.13028319]], [10.01, [910.6572285, 32.13028319]]] 33 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [901.5476427, 34.30357077]], [9.99, [901.5476427, 34.30357077]], [10.00, [901.5476427, 34.30357077]], [10.01, [901.5476427, 34.30357077]]] 7 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [892.1417580, 36.48574731]], [9.99, [892.1417580, 36.48574731]], [10.00, [892.1417580, 36.48574731]], [10.01, [892.1417580, 36.48574731]]] 37 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [882.4607505, 38.67617754]], [9.99, [882.4607505, 38.67617754]], [10.00, [882.4607505, 38.67617754]], [10.01, [882.4607505, 38.67617754]]] 39 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [872.5258776, 40.87422372]], [9.99, [872.5258776, 40.87422372]], [10.00, [872.5258776, 40.87422372]], [10.01, [872.5258776, 40.87422372]]] > #Similar to part A: in this case, the epidemic left 40 people remaining as > infected however it has led to 88 people being removed. > SIRSdemo(1000,20, 7,3,0.01,10) This is a numerical demonstration of the R0 phenomenon in the SIRS model using discretization with mesh size=, 0.01, and letting it run until time t=, 10 with population size, 1000, and fixed parameters nu=, 3, and gamma=, 7 where we change beta from 0.2*nu/N to 4*nu/N Recall that the epidemic will persist if beta exceeds nu/N, that in this case is, 3 ---- 1000 We start with , 20, infected individuals, 0 removed and hence, 980, susceptible We will show what happens once time is close to, 10 1 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [998.9571869, 0.9729968716]], [9.99, [998.9571869, 0.9729968716]], [10.00, [998.9571869, 0.9729968716]], [10.01, [998.9571869, 0.9729968716]]] 3 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [996.6155905, 2.936908621]], [9.99, [996.6155905, 2.936908621]], [10.00, [996.6155905, 2.936908621]], [10.01, [996.6155905, 2.936908621]]] 1 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [993.9350689, 4.924545130]], [9.99, [993.9350689, 4.924545130]], [10.00, [993.9350689, 4.924545130]], [10.01, [993.9350689, 4.924545130]]] 7 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [990.9190693, 6.935665103]], [9.99, [990.9190693, 6.935665103]], [10.00, [990.9190693, 6.935665103]], [10.01, [990.9190693, 6.935665103]]] 9 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [987.5717147, 8.969979927]], [9.99, [987.5717147, 8.969979927]], [10.00, [987.5717147, 8.969979927]], [10.01, [987.5717147, 8.969979927]]] 11 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [983.8977865, 11.02715490]], [9.99, [983.8977865, 11.02715490]], [10.00, [983.8977865, 11.02715490]], [10.01, [983.8977865, 11.02715490]]] 13 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [979.9027054, 13.10681067]], [9.99, [979.9027054, 13.10681067]], [10.00, [979.9027054, 13.10681067]], [10.01, [979.9027054, 13.10681067]]] 3 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [975.5925015, 15.20852494]], [9.99, [975.5925015, 15.20852494]], [10.00, [975.5925015, 15.20852494]], [10.01, [975.5925015, 15.20852494]]] 17 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [970.9737966, 17.33183428]], [9.99, [970.9737966, 17.33183428]], [10.00, [970.9737966, 17.33183428]], [10.01, [970.9737966, 17.33183428]]] 19 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [966.0537688, 19.47623623]], [9.99, [966.0537688, 19.47623623]], [10.00, [966.0537688, 19.47623623]], [10.01, [966.0537688, 19.47623623]]] 21 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [960.8401224, 21.64119148]], [9.99, [960.8401224, 21.64119148]], [10.00, [960.8401224, 21.64119148]], [10.01, [960.8401224, 21.64119148]]] 23 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [955.3410542, 23.82612625]], [9.99, [955.3410542, 23.82612625]], [10.00, [955.3410542, 23.82612625]], [10.01, [955.3410542, 23.82612625]]] 5 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [949.5652180, 26.03043478]], [9.99, [949.5652180, 26.03043478]], [10.00, [949.5652180, 26.03043478]], [10.01, [949.5652180, 26.03043478]]] 27 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [943.5216874, 28.25348193]], [9.99, [943.5216874, 28.25348193]], [10.00, [943.5216874, 28.25348193]], [10.01, [943.5216874, 28.25348193]]] 29 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [937.2199171, 30.49460585]], [9.99, [937.2199171, 30.49460585]], [10.00, [937.2199171, 30.49460585]], [10.01, [937.2199171, 30.49460585]]] 31 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [930.6697041, 32.75312076]], [9.99, [930.6697041, 32.75312076]], [10.00, [930.6697041, 32.75312076]], [10.01, [930.6697041, 32.75312076]]] 33 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [923.8811477, 35.02831971]], [9.99, [923.8811477, 35.02831971]], [10.00, [923.8811477, 35.02831971]], [10.01, [923.8811477, 35.02831971]]] 7 beta is, -, times the threshold value 2 the long-term behavior is [[9.98, [916.8646087, 37.31947744]], [9.99, [916.8646087, 37.31947744]], [10.00, [916.8646087, 37.31947744]], [10.01, [916.8646087, 37.31947744]]] 37 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [909.6306698, 39.62585316]], [9.99, [909.6306698, 39.62585316]], [10.00, [909.6306698, 39.62585316]], [10.01, [909.6306698, 39.62585316]]] 39 beta is, --, times the threshold value 10 the long-term behavior is [[9.98, [902.1900949, 41.94669340]], [9.99, [902.1900949, 41.94669340]], [10.00, [902.1900949, 41.94669340]], [10.01, [902.1900949, 41.94669340]]] > #At time t = 10, there were 42 out of the 1000 people infected still showing > that the epidemic has decreased dramatically with approximately 57 people > being removed. > #Question 2: > F1 := RandNice([x,y],8) > expand(F1) [ 2 2 [35 x + 91 x y + 56 y - 39 x - 54 y + 10, 2 2 ] 8 x + 24 x y + 18 y - 32 x - 48 y + 24] > EquPts(F1,[x,y]) / [-27 32] [1 4]\ { [10, -6], [42, -26], [---, --], [-, -] } \ [ 7 7 ] [7 7]/ > with(LinearAlgebra): > F1Jacob := Matrix(2,2): F1Jacob[1,1]:=diff(F1[1],x) : > F1Jacob[1,2]:=diff(F1[1],y): F1Jacob[2,2]:=diff(F1[2],y): > F1Jacob[2,1]:=diff(F1[2],x): > F1eigen1 := subs(x=10,y=-6,F1Jacob) > Eigenvalues(F1eigen1) > #The first eigenvalue being greater than 0 indicates the equilibrium point is > not stable. > F1eigen2 := subs(x=42,y=-26,F1Jacob) > Eigenvalues(F1eigen2) > #Similar to the first case, eigenvalue 1 is greater than 0 indicating the > equilibrium is not stable. > F1eigen3 := subs(x=-27/7,y=32/7,F1Jacob) > Eigenvalues(F1eigen3) > #Eigenvalue 1 of this matrix is greater than 0, therefore this equilibrium is > not stable. > F1eigen4 := subs(x=1/7,y=4/7,F1Jacob) > Eigenvalues(F1eigen4) > #Based on the criteria b4, this point is not stable. Therefore none of the > points are stable equilibrium points. > Dis2(F1,x,y,[10.1,-5.9],0.01,10); [ [[0.01, [10.1, -5.9]], [0.02, [10.4172, -5.9350]], [0.03, [11.10454292, -5.996158713]], [0.04, [12.81270979, -6.075185340]], [0.05, [18.48867650, -5.924003896]], [0.06, [54.20093836, -1.379955809]], [0.07, [995.1203869, 199.5894542]], [ [ 5 5]] [0.08, [5.501402185 10 , 1.338449542 10 ]], [ [ 11 10]] [0.09, [1.829678365 10 , 4.510887744 10 ]], [ [ 22 21]] [0.10, [2.036718536 10 , 5.025277976 10 ]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F1,x,y,[42.1,-25.9],0.01,10); [ [[0.01, [42.1, -25.9]], [0.02, [43.5092, -25.8550]], [0.03, [53.83272256, -25.34020857]], [0.04, [179.1385351, -10.13548778]], [0.05, [9751.843230, 2087.627912]], [ [ 7 7]] [0.06, [5.425584451 10 , 1.327628801 10 ]], [ [ 15 14]] [0.07, [1.784487118 10 , 4.400983830 10 ]], [ [ 30 29]] [0.08, [1.937670889 10 , 4.780991024 10 ]], [ [ 60 59]] [0.09, [2.285125895 10 , 5.638453443 10 ]], [ [ 120 119]] [0.10, [3.178162618 10 , 7.841997351 10 ]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F1,x,y,[-26/7,33/7],0.01,10); [[ [-26 33]] [[0.01, [---, --]], [0.02, [-3.371428571, 4.781632653]], [[ [ 7 7 ]] [0.03, [-2.426570263, 4.961126614]], [0.04, [0.829768875, 5.608402337]], [0.05, [19.66778818, 9.724558952]], [0.06, [369.2384122, 92.87343395]], [0.07, [83929.52115, 20620.10917]], [ [ 9 9]] [0.08, [4.278482089 10 , 1.055403642 10 ]], [ [ 19 18]] [0.09, [1.113979245 10 , 2.748656691 10 ]], [ [ 37 37]] [0.10, [7.552781836 10 , 1.863619013 10 ]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] ] > Dis2(F1,x,y,[2/7,5/7],0.01,10); [[ [2 5]] [[0.01, [-, -]], [0.02, [0.3885714286, 0.6673469388]], [[ [7 7]] [0.03, [0.5148779009, 0.6171547888]], [0.04, [0.6760505103, 0.5621881550]], [0.05, [0.8916273081, 0.5006714360]], [0.06, [1.198391294, 0.4308882462]], [0.07, [1.674860028, 0.3528171055]], [0.08, [2.520393303, 0.2761491829]], [0.09, [4.387722026, 0.2660299094]], [0.10, [10.47293457, 0.8073154853]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] ] > #As shown, all points go to some variation of infinity and therefore are not > stable. > F2 := RandNice([x,y],8) > EquPts(F2,[x,y]) /[-8 19] [-5 23] [-2 13] [-1 ]\ { [--, --], [--, --], [--, --], [--, 1] } \[17 17] [8 16] [3 9 ] [3 ]/ > F2Jacob := Matrix(2,2): F2Jacob[1,1]:=diff(F2[1],x) : > F2Jacob[1,2]:=diff(F2[1],y): F2Jacob[2,2]:=diff(F2[2],y): > F2Jacob[2,1]:=diff(F2[2],x): > F2Jacobeigen := subs(x=-1/3,y=1,F2Jacob) > Eigenvalues(F2Jacobeigen) > F2Jacobeigen := subs(x=-2/3, y=13/9,F2Jacob) > Eigenvalues(F2Jacobeigen) > F2Jacobeigen := subs(x=-5/8,y=23/16,F2Jacob) > Eigenvalues(F2Jacobeigen) > F2Jacobeigen := subs(x=-8/17,y=19/17,F2Jacob) > Eigenvalues(F2Jacobeigen) > #The stable fixed point will be > [-8/17,19/17]. > Dis2(F2,x,y,[-.32,1.01],0.01,10); [[0.01, [-0.32, 1.01]], [0.02, [-0.319484, 1.006610]], [0.03, [-0.3190213090, 1.003660683]], [0.04, [-0.3186032922, 1.001099535]], [0.05, [-0.3182226390, 0.9988782291]], [0.06, [-0.3178731724, 0.9969528942]], [0.07, [-0.3175496794, 0.9952841495]], [0.08, [-0.3172477632, 0.9938369751]], [0.09, [-0.3169637154, 0.9925804718]], [0.10, [-0.3166944077, 0.9914875546]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F2,x,y,[-.65,14/9],0.01,10); [[ [ 14]] [[0.01, [-0.65, --]], [0.02, [-0.6486574074, 1.569146297]], [[ [ 9 ]] [0.03, [-0.6468720903, 1.585176237]], [0.04, [-0.6444774660, 1.604317952]], [0.05, [-0.6412269464, 1.627512690]], [0.06, [-0.6367444953, 1.656117205]], [0.07, [-0.6304360625, 1.692156656]], [0.08, [-0.6213224718, 1.738783036]], [0.09, [-0.6077038122, 1.801158601]], [0.10, [-0.5864321689, 1.888290321]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] ] > Dis2(F2,x,y,[-.524,24/16],0.01,10); [[ [ 3]] [[0.01, [-0.524, -]], [0.02, [-0.5164672000, 1.511214560]], [[ [ 2]] [0.03, [-0.5074673057, 1.524873240]], [0.04, [-0.4965271927, 1.541747411]], [0.05, [-0.4829550128, 1.562956747]], [0.06, [-0.4657025294, 1.590184775]], [0.07, [-0.4431126015, 1.626071919]], [0.08, [-0.4124264817, 1.674977654]], [0.09, [-0.3687472657, 1.744573492]], [0.10, [-0.3026448362, 1.849498330]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] ] > Dis2(F2,x,y,[-7/17,20/17],0.01,10); [[ [-7 20]] [[0.01, [--, --]], [0.02, [-0.4106574395, 1.166124567]], [[ [17 17]] [0.03, [-0.4097648024, 1.156242363]], [0.04, [-0.4090661650, 1.146891604]], [0.05, [-0.4085396877, 1.138124891]], [0.06, [-0.4081633230, 1.129978922]], [0.07, [-0.4079156720, 1.122474582]], [0.08, [-0.4077766515, 1.115617879]], [0.09, [-0.4077279564, 1.109401545]], [0.10, [-0.4077533268, 1.103807079]], [...981 terms...], [9.92, [-0.4705460111, 1.117608379]], [9.93, [-0.4705463466, 1.117608686]], [9.94, [-0.4705466794, 1.117608991]], [9.95, [-0.4705470096, 1.117609293]], [9.96, [-0.4705473371, 1.117609593]], [9.97, [-0.4705476620, 1.117609891]], [9.98, [-0.4705479844, 1.117610186]], [9.99, [-0.4705483042, 1.117610479]], [10.00, [-0.4705486215, 1.117610770]], ] [10.01, [-0.4705489362, 1.117611058]]] ] > #As shown, the only fixed point is the last. > F3 := RandNice([x,y],8) > EquPts(F3,[x,y]) /[ -29] [-1 11] [3 -1] [7 -2]\ { [17, ---], [--, --], [-, --], [--, --] } \[ 2 ] [4 4 ] [4 4 ] [11 11]/ > F3Jacob := Matrix(2,2): F3Jacob[1,1]:=diff(F3[1],x) : > F3Jacob[1,2]:=diff(F3[1],y): F3Jacob[2,2]:=diff(F3[2],y): > F3Jacob[2,1]:=diff(F3[2],x): > F3Jacobeigen := subs(x=-1/4,y=11/4,F3Jacob) > Eigenvalues(F3Jacobeigen) > F3Jacobeigen := subs(x=3/4,y=-1/4,F3Jacob) > Eigenvalues(F3Jacobeigen) > F3Jacobeigen := subs(x=17,y=-29/2,F3Jacob) > Eigenvalues(F3Jacobeigen) > F3Jacobeigen := subs(x=7/11,y=-2/11,F3Jacob) > Eigenvalues(F3Jacobeigen) > #THe last point, [7/11,-2/11], is the only stable point. > Dis2(F3,x,y,[-.24,2.76],0.01,10); [[0.01, [-0.24, 2.76]], [0.02, [-0.233040, 2.764832]], [0.03, [-0.2215486955, 2.772541585]], [0.04, [-0.2025272673, 2.784981873]], [0.05, [-0.1708397755, 2.805294281]], [0.06, [-0.1174186641, 2.838945426]], [0.07, [-0.02548481734, 2.895844447]], [0.08, [0.1382978199, 2.995121329]], [0.09, [0.4475007437, 3.177425696]], [0.10, [1.091390479, 3.542568510]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F3,x,y,[.76,-.24],0.01,10); [[0.01, [0.76, -0.24]], [0.02, [0.760160, -0.243168]], [0.03, [0.7603002095, -0.2457316327]], [0.04, [0.7604254985, -0.2478061093]], [0.05, [0.7605394751, -0.2494852849]], [0.06, [0.7606448378, -0.2508454056]], [0.07, [0.7607436236, -0.2519482746]], [0.08, [0.7608373843, -0.2528438985]], [0.09, [0.7609273119, -0.2535726805]], [0.10, [0.7610143291, -0.2541672275]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F3,x,y,[17.1,-14.4],0.01,10); [ [[0.01, [17.1, -14.4]], [0.02, [17.6235, -14.4868]], [0.03, [19.24988777, -14.74865561]], [0.04, [24.89161392, -15.42881898]], [0.05, [52.26136424, -15.91193294]], [0.06, [379.3526368, 35.69113785]], [0.07, [34805.31109, 10889.83005]], [ [ 8 8]] [0.08, [3.814052520 10 , 1.451892810 10 ]], [ [ 16 16]] [0.09, [4.940163320 10 , 1.969634344 10 ]], [ [ 32 32]] [0.10, [8.451849371 10 , 3.409109218 10 ]], [...981 terms...], [9.92, [Float(infinity), Float(infinity)]], [9.93, [Float(infinity), Float(infinity)]], [9.94, [Float(infinity), Float(infinity)]], [9.95, [Float(infinity), Float(infinity)]], [9.96, [Float(infinity), Float(infinity)]], [9.97, [Float(infinity), Float(infinity)]], [9.98, [Float(infinity), Float(infinity)]], [9.99, [Float(infinity), Float(infinity)]], [10.00, [Float(infinity), Float(infinity)]], ] [10.01, [Float(infinity), Float(infinity)]]] > Dis2(F3,x,y,[.64,-.12],0.01,10); [[0.01, [0.64, -0.12]], [0.02, [0.638960, -0.132672]], [0.03, [0.6380723526, -0.1427809173]], [0.04, [0.6373312134, -0.1508122798]], [0.05, [0.6367226551, -0.1571721513]], [0.06, [0.6362294337, -0.1621952800]], [0.07, [0.6358338518, -0.1661544995]], [0.08, [0.6355193273, -0.1692701913]], [0.09, [0.6352711332, -0.1717191131]], [0.10, [0.6350766364, -0.1736422464]], [...981 terms...], [9.92, [0.6363557598, -0.1818133221]], [9.93, [0.6363558041, -0.1818133494]], [9.94, [0.6363558482, -0.1818133766]], [9.95, [0.6363558920, -0.1818134037]], [9.96, [0.6363559356, -0.1818134306]], [9.97, [0.6363559790, -0.1818134574]], [9.98, [0.6363560221, -0.1818134840]], [9.99, [0.6363560650, -0.1818135104]], [10.00, [0.6363561076, -0.1818135367]], [10.01, [0.6363561500, -0.1818135629]] ] > #as seen, only the last equilibrium point (7/11.-2/11) is stable. > #3: Find the equilibrium points of the SIRS model > EquPts((SIRS(s,i,beta,gamma,nu,N)),[s,i]) / [ nu gamma (N beta - nu)]\ { [N, 0], [----, -------------------] } \ [beta beta (gamma + nu) ]/ > #As shown, the equilibrium points of the SIRS model are when S = N or when > S=nu/Beta and I = gamma times (N*beta-nu)/(Beta*(gamma+nu) > > #Question 4, create a function for ChemoStat > ChemoStat:=proc(N,C,a1,a2) [a1*(C/(1+C))*N-N,(C/(1+C))*(-N)-C+a2]: end: > EquPts(ChemoStat(N,C,a1,a2),[N,C]) / [a1 (a1 a2 - a2 - 1) 1 ]\ { [0, a2], [-------------------, ------] } \ [ a1 - 1 a1 - 1]/