#OK to post homework #Nicholas DiMarzio, 11/8/21, Assignment 18 # #Problem 1 C:= proc(a,b,c,d,e) local x1,x2,x3,x4 option remember; x1 := b/a #x1 is number of eggs one chicken lays in c days; x2 := x1/c #x2 is the number of eggs one chicken lays in one day; x3 := e*x2 #x3 is the number of eggs one chicken lays in e days; x4 := d*x3 #x4 is the number of eggs d chicken lay in e days; end: C(3/2, 3/2, 3/2, 3, 3); 6 # #Problem 2 # W := proc(a, b, k) local g, vc2; option remember; g := solve(1/b + (k - 1)*vc = 1/a, vc); print(1/g); end proc; W(4, 5, 2); 20 # #Problem 3 # F := Matrix([[-2, -2], [-4, -2]]); [ -2 -2] F := [ ] [ -4 -2] evalf(Eigenvalues(F)); [ 0.828427124 ] [ ] [. -4.828427124] #So (-2,1) is unstable G := Matrix([[1, 0], [3, 0]]); [1 0] G := [ ] [3 0] evalf(Eigenvalues(G)); [0.] [ ] [1.] G := Matrix([[6, 0], [8, 0]]); [6 0] G := [ ] [8 0] evalf(Eigenvalues(G)); [0.] [ ] [6.] G := Matrix([[-4, 0], [-2, 0]]); [-4 0] G := [ ] [-2 0] evalf(Eigenvalues(G)); [ 0. ] [ ] [ -4. ] #Since y is any real number, we have to check and see if there is a trend to the stability. #We can see here that no matter what y is, 0 is a eigenvalue of the matrix #Therefore no matter what y is the equilbrium points are always unstable. #Problem 4 # Dis2([-x^2 - x*y + x, -2*x^2 - x*y + 3*x], x, y, [2.1, -0.9], 0.01, 10); #We see that (2,-1) is unstable Dis2([-x^2 - x*y + x, -2*x^2 - x*y + 3*x], x, y, [0.1, 0.1], 0.01, 10); #We see that (0,0) is unstable Dis2([-x^2 - x*y + x, -2*x^2 - x*y + 3*x], x, y, [0.1, -4.9], 0.01, 10); #We see that (0,-5) is unstable Dis2([-x^2 - x*y + x, -2*x^2 - x*y + 3*x], x, y, [0.1, 5.1], 0.01, 10); #We see that (0,5) is unstable #We then can see that (0,y) where y is any real number, is unstable. #Problem 5 Dis2(SIRS(s, i, 0.01, gamma, 1, 50), x, y, [50 - 30, 30], 0.01, 10); Dis2(SIRS(s, i, 0.01, gamma, 1, 80), x, y, [80 - 30, 30], 0.01, 10); Dis2(SIRS(s, i, 0.01, gamma, 1, 120), x, y, [120 - 30, 30], 0.01, 10);