MATH 261, Spring 2001 Due Date: Name(s): Honors Project 11: Linear Two-Compartment Models A 2-compartment (differential) model is a pair of differential equations dx dt = f(x, y), dy dt = g(x, y) where f and g are continuous real-valued functions. In this project we consider linear 2-compartment models: dx dt = Ax + By + C, dy dt = Dx + Ey + F. (1) If B = 0 and D = 0 in (1), then (1) is said to be decoupled, and it represents a system in which x = x(t) and y = y(t) are independent quantities; if B = 0 or D = 0 then (1) is said to be coupled, and it represents a system in which x = x(t) and y = y(t) are dependent quantities. Coupled systems arise very frequently in applications. In the study of a biological species, for example, x might represent the number of immature individuals (those who cannot reproduce), and y might represent the number of mature individuals (those who can reproduce), and our equations are of the form dx dt = By, dy dt = Dx + Ey. If the species is one in which mature individuals are harvested or culled, our equations become dx dt = By, dy dt = Dx + Ey + F. In the study of ecology we might study the equations dx dt = Ax + By + C, dy dt = Ey + F where x represents the level of pollution in a body of water, A measures the natural removal of pollution due to evaportation or sedimentation, C represents contributions to or the efforts of man in eliminating pollution, and y represents the level of pollution of a second body of water which empties into, or is emptied into by, the first body. In the study of radioactive decay, x might represent the amount of one radioactive substance, and y the amount of a second radioactive substance into which the first decays, in which case our equations are of the form dx dt = -k1x, dy dt = k1x - k2y. As these applications might suggest, there are n-compartment models, n > 2, which are of great practical interest in science and engineering. In this project we restrict our attention to 2-compartment models for simplicity. Solving a decoupled system of differential equations is relatively straightforward: it simply involves solving a pair of independent differential equations. Solving a coupled system is not so straightforward, however: the analysis can get complicated. A great deal can be said about coupled systems by studying the geometry associated with them. The insight that leads to this information is that (1) associates to each point P(x, y) in the plane a vector F(x, y) = dx dt , dy dt = Ax + By + C, Dx + Ey + F (2) which is tangent to any solution of (1) that passes through P. Indeed, F defines a vector field on the plane. In MATH 164 we discussed slope fields, but there are two major differences between what we did there and what we are doing here: First, a slope field is a collection of short undirected line segments while a vector field is a field of vectors. Second, we draw a slope field for a differential equation dx/dt = f(x) in the xt-coordinate plane (independent variable against dependent variable) while the vector field (2) associated to (1) is drawn in the xy-coordinate plane (dependent variable against dependent variable). Tasks 1. a) Type the following command lines into Maple in the order in which they are listed. The effect of these command lines is to plot the direction field for the system dx dt = 2x + y - 2, dy dt = x + 2y - 2 for (x, y) [0, 2] × [0, 2], the lines whose equations are 2x + y - 2 = 0 and x + 2y - 2 = 0, and a solution to our system. > # Honors Project 11: Linear Two-Compartment Models > restart: with(plots): with(DEtools): > x0 := x(t): y0 := y(t): > xdot := diff(x(t),t): ydot := diff(y(t),t): > eq1 := xdot = 2*x0+y0-2; eq2 := ydot = x0+2*y0-2; > plot0 := dfieldplot([eq1,eq2],[x0,y0],t=-2..2,x=0..2,y=0..2,color=yellow): > plot1 := plot({[[0,2],[1,0]],[[0,1],[2,0]]},color=blue): > display({plot0,plot1}); > thesolthrough := proc(a,b,t0,t1) local soln,myplot: soln := dsolve({eq1,eq2,x(0)=a,y(0)=b},{x0,y0},type=numeric): myplot := odeplot(soln,[x0,y0],t0..t1,numpoints=25): RETURN(myplot): end: > plot2 := thesolthrough(0.5,0.5,-0.6,0.6): > display({plot0,plot1,plot2}); Some notes: (a) We assume x 0 and y 0 since we are assuming x and y represent physical quantities which are always positive. (b) The lines whose equations are 2x + y - 2 = 0 and x + 2y - 2 = 0 are the horizontal and vertical isoclines of the system: they are the lines along which dx/dt = 0 and dy/dt = 0, or the lines along which the x- and y-components of F(x, y) are zero, and hence the lines along which F(x, y) is vertical and horizontal. The horizontal and vertical isoclines divide the plane into four regions, each of which can be characterized by the signs of dx/dt and dy/dt, and hence the direction of F(x, y).1 (c) The point of intersection of the horizontal and vertical isoclines is the equilibrium of the system: it is the point at which dx/dt = 0 and dy/dt = 0. (d) In the above code we use a procedure to draw a solution to our system. You might eventually wish to use this procedure to draw more solutions, but for now, ... b) Make a hard copy of your typed input and Maple's responses. 1Recall that if a, b, and c are not all zero, then the set of points P(x, y) for which ax + by + c > 0 is a half-plane determined by the line whose equation is ax + by + c = 0. 2. In turn, modify the code of Task 1 to cover the systems dx dt = -2x - y + 2, and dy dt = x + 2y - 2 dx dt = 2x + y - 2, and dy dt = -x - 2y + 2 dx dt = -2x - y + 2, and dy dt = -x - 2y + 2 and make a hard copy of each. 3. a) By hand, add an arrow head to the graph of the solution produced by the code in each case indicating the direction of increasing t, and draw several more solutions near each equilibrium adding an arrow head to each to indicate the direction of increasing t. b) In each case, state whether the equilibrium E(2 3 , 2 3 ) is stable or unstable. (An equilibrium is stable if, after any small change -- or perturbation -- in the state of the system away from the equilibrium, the system returns to it; otherwise the equilibrium is unstable.)