Laboratory On Introduction to Systems Phase Plane Analysis(Sections 5.4)Differential Equations LabIntroductionIn this lab we investigagte two-dimensional autonomous systems with the help of Maple. These systems are of the formNiMvKiYlI2R4RyIiIiUjZHRHISIiLSUiZkc2JCUieEclInlHNiMvKiYlI2R5RyIiIiUjZHRHISIiLSUiZ0c2JCUieEclInlHThese are called autonomous, since the right hand side of each of the above equations does not depend upon t, only upon x and y. Using the chain rule for differentiation we can see NiMqJiUjZHlHIiIiJSNkeEchIiI= = NiMqJiUjZHlHIiIiJSNkdEchIiI= / NiMqJiUjZHhHIiIiJSNkdEchIiI= = NiMqJi0lImdHNiQlInhHJSJ5RyIiIi0lImZHRiYhIiI=. The resulting equation with the t eliminatedNiMqJiUjZHlHIiIiJSNkeEchIiI= = NiMqJi0lImdHNiQlInhHJSJ5RyIiIi0lImZHRiYhIiI=is called the phase plane equation. We can use it to plot direction fields and sample trajectories of solution curves (x,y) as in figures5.9 and 5.10, page 267. Definition: Critical points (or equilibrium points) for a system of autonomous equations are points (x0,y0) where both dx/dt and dy/dt are 0 (or equivalently where f(x0,y0) and g(x0,y0) are both zero. The solutions passign through such points are constant solutions (why?) and are called equilibrium solutions. A critical point is asymptotically stable if all solutions flow into the critical point. A critical point is stable if solutions "surround" it. A critical point is unstable if some or all solutions flow away from the critical point. (We call the point a saddle point if some flow towards it and some flow away). We use Maple's DEplot to examine the phase plane of such two-dimensional systems. To generate the phase plane we define the two equations for the system and use the DEplot command. First ExampleThis is example 1, text page 267:NiMvLSUlZGlmZkc2JC0lInhHNiMlInRHRiosJEYnISIiNiMvLSUlZGlmZkc2JC0lInlHNiMlInRHRiosJComIiIjIiIiRidGLiEiIg==restart:with(DEtools):eq1:=diff(x(t),t)=-x(t);eq2:=diff(y(t),t)=-2*y(t);diffeqs:=eq1,eq2;T:=title=`Phase plane for Differential Equation`:DEplot({diffeqs},[x(t),y(t)],t=-2..2,x=-2..2,y=-2..2,T);We can fill in some trajectories by specifying some initial conditions for (t,x,y):inits:=[0,1,1],[0,-1,1],[0,2,-2],[0,-1,-1];T:=title=`Phase plane for Differential Equation`:DEplot({diffeqs},[x(t),y(t)],t=-2..2,[inits],x=-2..2,y=-2..2,T,linecolor=[black, magenta, yellow, blue]);As explained in the text, the autonomous system will have a critical point NiQmJSJ4RzYjIiIhJiUieUdGJQ== at points where the right-hand sides of the system are both 0. For this system the only critical point is (0,0). We note that from the phase plane plot all solutions apparently flow into the ciritcal point (0,0).This example is unusually simple since the first equations right hand side depends only on x, and the second one depends only on y. Each of these can be solved independently -- and are separable first order linear differential equations. But we have Maple do it anyway:dsolve({diffeqs},{x(t),y(t)});The solution confirms that as t goes to infinity all solutions (x(t), y(t)) go to (0,0).Note that if we eliminate the parameter t in the solutions and represent y as a function of x we get a parabola NiMvJSJ5RyooJiUiY0c2IyIiIkYpKiQlInhHIiIjRikqJCZGJzYjRixGLCEiIg==as indicated in the phase plane plot above. More Examples Second ExampleThis is the system of differential equations from the model in Section 5.1 (page 261) for brine solutions flowing between two interconnected tanks:NiMvLSUlZGlmZkc2JC0lInhHNiMlInRHRiosJiooIiIiRi0iIiQhIiJGJ0YtRi8qKEYtRi0iIzdGLy0lInlHRilGLUYtNiMvLSUlZGlmZkc2JC0lInlHNiMlInRHRiosJiooIiIiRi0iIiQhIiItJSJ4R0YpRi1GLSooRi1GLUYuRi9GJ0YtRi8=eq1:=diff(x(t),t)=-(1/3)*x(t)+(1/12)*y(t);eq2:=diff(y(t),t)=(1/3)*x(t)-(1/3)*y(t);diffeqs:=eq1,eq2;inits:=[0,1,1],[0,-1,1],[0,2,-2],[0,-1,-1];T:=title=`Phase plane for Differential Equation`:DEplot({diffeqs},[x(t),y(t)],t=-10..10,[inits],x=-2..2,y=-2..2,T,linecolor=[black, magenta, yellow, blue]);From the phase plane is looks like a critical point is (0,0). We can confirm this by finding the critical point(s) of this system: solve({-(1/3)*x+(1/12)*y=0, (1/3)*x-(1/3)*y=0},{x,y});This system is more complicated -- We can the method of elimination from section 5.3. We instead ask Maple to solve this for us:dsolve({diffeqs},{x(t),y(t)});Third ExampleExample 3, page 268NiMvLSUlZGlmZkc2JC0lInhHNiMlInRHRiosKComIiImIiIiRidGLkYuKiYiIiRGLi0lInlHRilGLiEiIiIiI0YzNiMvLSUlZGlmZkc2JC0lInlHNiMlInRHRiosKComIiIlIiIiLSUieEdGKUYuRi4qJiIiJEYuRidGLiEiIkYuRjM=eq1:=diff(x(t),t)=5*x(t)-3*y(t)-2;eq2:=diff(y(t),t)=4*x(t)-3*y(t)-1;diffeqs:=eq1,eq2;inits:=[0,2,2],[0,2,0],[0,0,2],[0,0,0];T:=title=`Phase plane for Differential Equation`:DEplot({diffeqs},[x(t),y(t)],t=-10..10,[inits],x=-3..4,y=-3..4,T,linecolor=[black, magenta, yellow, blue]);Find the critical points of this system: solve({5*x-3*y-2=0, 4*x-3*y-1=0},{x,y});What information can you determine by looking at the direction fields and sample trajectories in the phase plane relative to the critical point? We can have Maple gives us a solution in terms of initial conditions NiQvLSUieEc2IyIiISUiYUcvLSUieUdGJiUiYkc=. Try this command while replacing a and b with specific initial values and compare the actual solutions with the trajectory in the phase plane. What should you get if you give initial conditions x(0) = 0, y(0) = 0dsolve({diffeqs,x(0)=2,y(0)=2},{x(t),y(t)});Fourth ExampleExercises 33 and 34 page 276: Epidemic Models. restart:with(DEtools):The following system of differential equations represents the spread of infectious disease through a population. NiMvLSUlZGlmZkc2JC0lInNHNiMlInRHRiosJCooJSJhRyIiIkYnRi4tJSJpR0YpRi4hIiI=.NiMvLSUlZGlmZkc2JC0lImlHNiMlInRHRiosJiooJSJhRyIiIi0lInNHRilGLkYnRi5GLiomJSJiR0YuRidGLiEiIg==s(t) is the number of susceptible persons infected at time t. i(t) is the number of infected persons at time t.a is constant representing how fast disease is transmitted from an infected person to susceptible person. b is a constant representing the rate at which infected people become well (hence not infected any more and now immune). t represents time in days. Note this is a nonlinear system of differential equations (why) -- we have not studied any method of solving this. Assume a is .003 and b is .5a := .003; b:= .5;Define the system of equations:eq1:=diff(s(t),t)=-a*s(t)*i(t);eq2:=diff(i(t),t)=a*s(t)*i(t)-b*i(t);diffeqs:=eq1,eq2;Specify the initial condition -- at time t = 0, 700 persons are susceptible, and just 1 person is infected. inits:=[0,700,1];Plote the phase plane and direction field with trajectory in black for the initial condition. The appropriate time range for t is determined by "trial and error". T:=title=`Phase plane for Differential Equation`:DEplot({diffeqs},[s(t),i(t)],t=0..12,[inits],s=0..750,i=0..350,T,linecolor=[black]);Answers to 33 b) c) and 34:ExercisesComplete Exercises 15, 16, 17, 18 - Include a text cell to identify the critical points and analyze their staility.