Many physical situations are modelled by systems of \(n\) differential equations in \(n\) unknown functions, where \(n\ge2\). The next three examples illustrate physical problems that lead to systems of differential equations. In these examples and throughout this chapter we’ll denote the independent variable by \(t\).
Example 10.1.1
Tanks \(T_1\) and \(T_2\) contain 100 gallons and 300 gallons of salt solutions, respectively. Salt solutions are simultaneously added to both tanks from external sources, pumped from each tank to the other, and drained from both tanks (Figure 10.1.1). A solution with \(1\) pound of salt per gallon is pumped into \(T_1\) from an external source at \(5\) gal/min, and a solution with \(2\) pounds of salt per gallon is pumped into \(T_2\) from an external source at \(4\) gal/min. The solution from \(T_1\) is pumped into \(T_2\) at 2 gal/min, and the solution from \(T_2\) is pumped into \(T_1\) at \(3\) gal/min. \(T_1\) is drained at \(6\) gal/min and \(T_2\) is drained at 3 gal/min. Let \(Q_1(t)\) and \(Q_2(t)\) be the number of pounds of salt in \(T_1\) and \(T_2\), respectively, at time \(t>0\). Derive a system of differential equations for \(Q_1\) and \(Q_2\). Assume that both mixtures are well stirred.
Solution As in Section 4.2, let rate in and rate out denote the rates (lb/min) at which salt enters and leaves a tank; thus,
Note that the volumes of the solutions in \(T_1\) and \(T_2\) remain constant at 100 gallons and 300 gallons, respectively.
\(T_1\) receives salt from the external source at the rate of
and from \(T_2\) at the rate of
Therefore
Solution leaves \(T_1\) at the rate of 8 gal/min, since 6 gal/min are drained and 2 gal/min are pumped to \(T_2\); hence,
Eqns. (10.1.1) and (10.1.2) imply that
\(T_2\) receives salt from the external source at the rate of
and from \(T_1\) at the rate of
Therefore
Solution leaves \(T_2\) at the rate of \(6\) gal/min, since \(3\) gal/min are drained and \(3\) gal/min are pumped to \(T_1\); hence,
Eqns. (10.1.4) and (10.1.5) imply that
We say that (10.1.3) and (10.1.6) form a system of two first order equations in two unknowns, and write them together as
Example 10.1.2
A mass \(m_1\) is suspended from a rigid support on a spring \(S_1\) and a second mass \(m_2\) is suspended from the first on a spring \(S_2\) (Figure 10.1.2). The springs obey Hooke’s law, with spring constants \(k_1\) and \(k_2\). Internal friction causes the springs to exert damping forces proportional to the rates of change of their lengths, with damping constants \(c_1\) and \(c_2\). Let \(y_1=y_1(t)\) and \(y_2=y_2(t)\) be the displacements of the two masses from their equilibrium positions at time \(t\), measured positive upward. Derive a system of differential equations for \(y_1\) and \(y_2\), assuming that the masses of the springs are negligible and that vertical external forces \(F_1\) and \(F_2\) also act on the objects.
Solution In equilibrium, \(S_1\) supports both \(m_1\) and \(m_2\) and \(S_2\) supports only \(m_2\). Therefore, if \(\Delta\ell_1\) and \(\Delta\ell_2\) are the elongations of the springs in equilibrium then
Let \(H_1\) be the Hooke’s law force acting on \(m_1\), and let \(D_1\) be the damping force on \(m_1\). Similarly, let \(H_2\) and \(D_2\) be the Hooke’s law and damping forces acting on \(m_2\). According to Newton’s second law of motion,
When the displacements are \(y_1\) and \(y_2\), the change in length of \(S_1\) is \(-y_1+\Delta\ell_1\) and the change in length of \(S_2\) is \(-y_2+y_1+\Delta\ell_2\). Both springs exert Hooke’s law forces on \(m_1\), while only \(S_2\) exerts a Hooke’s law force on \(m_2\). These forces are in directions that tend to restore the springs to their natural lengths. Therefore
When the velocities are \(y_1'\) and \(y_2'\), \(S_1\) and \(S_2\) are changing length at the rates \(-y_1'\) and \(-y_2'+y_1'\), respectively. Both springs exert damping forces on \(m_1\), while only \(S_2\) exerts a damping force on \(m_2\). Since the force due to damping exerted by a spring is proportional to the rate of change of length of the spring and in a direction that opposes the change, it follows that
From (10.1.8), (10.1.9), and (10.1.10),
and
From (10.1.7),
Therefore we can rewrite (10.1.11) and (10.1.12) as
Example 10.1.3
Let \({\bf X}={\bf X}(t)=x(t)\,{\bf i}+y(t)\,{\bf j}+z(t)\,{\bf k}\) be the position vector at time \(t\) of an object with mass \(m\), relative to a rectangular coordinate system with origin at Earth’s center (Figure 10.1.3). According to Newton’s law of gravitation, Earth’s gravitational force \({\bf F}={\bf F}(x,y,z)\) on the object is inversely proportional to the square of the distance of the object from Earth’s center, and directed toward the center; thus,
where \(K\) is a constant. To determine \(K\), we observe that the magnitude of \({\bf F}\) is
Let \(R\) be Earth’s radius. Since \(\|{\bf F}\|=mg\) when the object is at Earth’s surface,
Therefore we can rewrite (10.1.13) as
Now suppose \({\bf F}\) is the only force acting on the object. According to Newton’s second law of motion, \({\bf F}=m{\bf X}''\); that is,
Cancelling the common factor \(m\) and equating components on the two sides of this equation yields the system
Rewriting Higher Order Systems as First Order Systems
A system of the form
is called a first order system, since the only derivatives occurring in it are first derivatives. The derivative of each of the unknowns may depend upon the independent variable and all the unknowns, but not on the derivatives of other unknowns. When we wish to emphasize the number of unknown functions in (10.1.15) we will say that (10.1.15) is an \(n\times n\) system.
Systems involving higher order derivatives can often be reformulated as first order systems by introducing additional unknowns. The next two examples illustrate this.
Example 10.1.4
Rewrite the system
derived in Example 10.1.2 as a system of first order equations.
Solution If we define \(v_1=y_1'\) and \(v_2=y_2'\), then \(v_1'=y_1''\) and \(v_2'=y_2''\), so (10.1.16) becomes
Therefore \(\{y_1,y_2,v_1,v_2\}\) satisfies the \(4\times4\) first order system
Remark
The difference in form between (10.1.15) and (10.1.17), due to the way in which the unknowns are denoted in the two systems, isn’t important; (10.1.17) is a first order system, in that each equation in (10.1.17) expresses the first derivative of one of the unknown functions in a way that does not involve derivatives of any of the other unknowns.
Example 10.1.5
Rewrite the system
as a first order system.
Solution We regard \(x\), \(x'\), \(y\), \(y'\), and \(y''\) as unknown functions, and rename them
These unknowns satisfy the system
Rewriting Scalar Differential Equations as Systems
In this chapter we’ll refer to differential equations involving only one unknown function as scalar differential equations. Scalar differential equations can be rewritten as systems of first order equations by the method illustrated in the next two examples.
Example 10.1.6
Rewrite the equation
as a \(4\times4\) first order system.
Solution We regard \(y\), \(y'\), \(y''\), and \(y'''\) as unknowns and rename them
Then \(y^{(4)}=y_4'\), so (10.1.18) can be written as
Therefore \(\{y_1,y_2,y_3,y_4\}\) satisfies the system
Example 10.1.7
Rewrite
as a system of first order equations.
Solution We regard \(x\), \(x'\), and \(x''\) as unknowns and rename them
Then
Therefore \(\{y_1,y_2,y_3\}\) satisfies the first order system
Since systems of differential equations involving higher derivatives can be rewritten as first order systems by the method used in Examples 10.1.5 –10.1.7 , we’ll consider only first order systems.
Numerical Solution of Systems
The numerical methods that we studied in Chapter 3 can be extended to systems, and most differential equation software packages include programs to solve systems of equations. We won’t go into detail on numerical methods for systems; however, for illustrative purposes we’ll describe the Runge-Kutta method for the numerical solution of the initial value problem
at equally spaced points \(t_0\), \(t_1\), …, \(t_n=b\) in an interval \([t_0,b]\). Thus,
where
We’ll denote the approximate values of \(y_1\) and \(y_2\) at these points by \(y_{10},y_{11},\dots,y_{1n}\) and \(y_{20},y_{21},\dots,y_{2n}\). The Runge-Kutta method computes these approximate values as follows: given \(y_{1i}\) and \(y_{2i}\), compute
and
for \(i=0\), …, \(n-1\). Under appropriate conditions on \(g_1\) and \(g_2\), it can be shown that the global truncation error for the Runge-Kutta method is \(O(h^4)\), as in the scalar case considered in Section 3.3.
10.1 Exercises
-
Tanks \(T_1\) and \(T_2\) contain 50 gallons and 100 gallons of salt solutions, respectively. A solution with 2 pounds of salt per gallon is pumped into \(T_1\) from an external source at \(1\) gal/min, and a solution with \(3\) pounds of salt per gallon is pumped into \(T_2\) from an external source at \(2\) gal/min. The solution from \(T_1\) is pumped into \(T_2\) at \(3\) gal/min, and the solution from \(T_2\) is pumped into \(T_1\) at \(4\) gal/min. \(T_1\) is drained at \(2\) gal/min and \(T_2\) is drained at \(1\) gal/min. Let \(Q_1(t)\) and \(Q_2(t)\) be the number of pounds of salt in \(T_1\) and \(T_2\), respectively, at time \(t>0\). Derive a system of differential equations for \(Q_1\) and \(Q_2\). Assume that both mixtures are well stirred.
Show answer
\(\begin{array}{rcl} Q_1'&=&\dst{2-{1\over10}Q_1+{1\over25}Q_2}\\[6pt] Q_2'&=&\dst{6+{3\over50}Q_1-{1\over20}Q_2}. \end{array}\)
-
Two 500 gallon tanks \(T_1\) and \(T_2\) initially contain 100 gallons each of salt solution. A solution with \(2\) pounds of salt per gallon is pumped into \(T_1\) from an external source at \(6\) gal/min, and a solution with \(1\) pound of salt per gallon is pumped into \(T_2\) from an external source at \(5\) gal/min. The solution from \(T_1\) is pumped into \(T_2\) at \(2\) gal/min, and the solution from \(T_2\) is pumped into \(T_1\) at \(1\) gal/min. Both tanks are drained at \(3\) gal/min. Let \(Q_1(t)\) and \(Q_2(t)\) be the number of pounds of salt in \(T_1\) and \(T_2\), respectively, at time \(t>0\). Derive a system of differential equations for \(Q_1\) and \(Q_2\) that’s valid until a tank is about to overflow. Assume that both mixtures are well stirred.
Show answer
\(\begin{array}{rcl} Q_1'&=&\dst{12-{5\over100+2t}Q_1+{1\over100+3t}Q_2}\\[6pt] Q_2'&=&\dst{5+{1\over50+t}Q_1-{4\over100+3t}Q_2}. \end{array}\)
-
A mass \(m_1\) is suspended from a rigid support on a spring \(S_1\) with spring constant \(k_1\) and damping constant \(c_1\). A second mass \(m_2\) is suspended from the first on a spring \(S_2\) with spring constant \(k_2\) and damping constant \(c_2\), and a third mass \(m_3\) is suspended from the second on a spring \(S_3\) with spring constant \(k_3\) and damping constant \(c_3\). Let \(y_1=y_1(t)\), \(y_2=y_2(t)\), and \(y_3=y_3(t)\) be the displacements of the three masses from their equilibrium positions at time \(t\), measured positive upward. Derive a system of differential equations for \(y_1\), \(y_2\) and \(y_3\), assuming that the masses of the springs are negligible and that vertical external forces \(F_1\), \(F_2\), and \(F_3\) also act on the masses.
Show answer
\(m_1y_1''=-(c_1+c_2)y_1'+c_2y_2'-(k_1+k_2)y_1+k_2y_2+F_1\)
\(m_2y_2''=(c_2-c_3)y_1'-(c_2+c_3)y_2'+c_3y_3'+(k_2-k_3)y_1 -(k_2+k_3)y_2 +k_3y_3+F_2\)
\(m_3y_3''=c_3y_1'+c_3y_2'-c_3y_3'+k_3y_1+k_3y_2-k_3y_3+F_3\)
-
Let \({\bf X}=x\,{\bf i}+y\,{\bf j}+z\,{\bf k}\) be the position vector of an object with mass \(m\), expressed in terms of a rectangular coordinate system with origin at Earth’s center (Figure 10.1.3). Derive a system of differential equations for \(x\), \(y\), and \(z\), assuming that the object moves under Earth’s gravitational force (given by Newton’s law of gravitation, as in Example 10.1.3 ) and a resistive force proportional to the speed of the object. Let \(\alpha\) be the constant of proportionality.
Show answer
\(x''=-\dst{{\alpha\over m}x'+{gR^2x \over(x^2+y^2+z^2)^{3/2}}}\) \(y''=-\dst{{\alpha\over m}y'+{gR^2y \over\left(x^2+y^2+z^2\right)^{3/2}}}\)
\(z''=-\dst{{\alpha\over m}z'+{gR^2z \over\left(x^2+y^2+z^2\right)^{3/2}}}\)
-
Rewrite the given system as a first order system.
\({\bf (a)}\begin{array}{lcc} x''' = f(t,x,y,y')\\[3pt] y'' = g(t,y,y') \end{array}\) (b)\(\begin{array}{lcl} u' = f(t,u,v,v',w')\\[3pt] v''=g(t,u,v,v',w) \\[3pt] w''=h(t,u,v,v',w,w')\end{array}\) (c) \(y''' = f(t,y,y',y'')\) (d) \(y^{(4)} = f(t,y)\) (e)\(\begin{array}{lcc} x'' = f(t,x,y)\\[3pt] y'' = g(t,x,y) \end{array}\) Show answer
(a) \(\begin{array}{ccl} x_1'&=&x_2\\x_2'&=&x_3\\x_3'&=&f(t,x_1,y_1,y_2)\\y_1'&= &y_2\\y_2'&=&g(t,y_1,y_2) \end{array}\) (b) \(\begin{array}{ccl} u_1'&=&f(t,u_1,v_1,v_2,w_2)\\; v_1'&=&v_2\\ v_2'&=&g(t,u_1,v_1,v_2,w_1)\\ w_1'&=&w_2\\ w_2'&=&h(t,u_1,v_1,v_2,w_1,w_2) \end{array}\) (c) \(\begin{array}{ccl} y_1'&=&y_2\\y_2'&=&y_3\\y_3'&=&f(t,y_1,y_2,y_3) \end{array}\) (d) \(\begin{array}{ccl} y_1'&=&y_2\\y_2'&=&y_3\\y_3'&=&y_4\\y_4'&=&f(t,y_1) \end{array}\) (e)\( \begin{array}{ccl}x_1'&=&x_2\\x_2'&=&f(t,x_1,y_1)\\ y_1'&=&y_2\\y_2'&=&g(t,x_1,y_1)\end{array}\)
-
Rewrite the system (10.1.14) of differential equations derived in Example 10.1.3 as a first order system.
Show answer
\(\begin{array}{ccl} x'&=&x_1\\[6pt]y'&=&y_1\\[6pt]z'&=&z_1\end{array}\) \(\dst{ \begin{array}{ccl} x_1'&=&-\dst{gR^2x\over\left(x^2+y^2+z^2\right)^{3/2}}\\[6pt] y_1'&=&-\dst{gR^2y\over\left(x^2+y^2+z^2\right)^{3/2}}\\[6pt] z_1'&=&-\dst{gR^2z\over\left(x^2+y^2+z^2\right)^{3/2}} \end{array}}\) -
Formulate a version of Euler’s method (Section 3.1) for the numerical solution of the initial value problem
\[ \begin{array}{rcl} y_1'&=&g_1(t,y_1,y_2),\quad y_1(t_0)=y_{10},\\ y_2'&=&g_2(t,y_1,y_2),\quad y_2(t_0)=y_{20}, \end{array} \]on an interval \([t_0,b]\).
-
Formulate a version of the improved Euler method (Section 3.2) for the numerical solution of the initial value problem
\[ \begin{array}{rcl} y_1'&=&g_1(t,y_1,y_2),\quad y_1(t_0)=y_{10},\\ y_2'&=&g_2(t,y_1,y_2),\quad y_2(t_0)=y_{20}, \end{array} \]on an interval \([t_0,b]\).