10.1: Introduction to Systems of Differential Equations
- Page ID
- 43359
- Zoya Kravets
- Mission College
( \newcommand{\kernel}{\mathrm{null}\,}\)
Many physical situations are modelled by systems of n differential equations in n unknown functions, where n≥2. 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 : Flow
Tanks T1 and T2 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 T1 from an external source at 5 gal/min, and a solution with 2 pounds of salt per gallon is pumped into T2 from an external source at 4 gal/min. The solution from T1 is pumped into T2 at 2 gal/min, and the solution from T2 is pumped into T1 at 3 gal/min. T1 is drained at 6 gal/min and T2 is drained at 3 gal/min. Let Q1(t) and Q2(t) be the number of pounds of salt in T1 and T2, respectively, at time t>0. Derive a system of differential equations for Q1 and Q2. Assume that both mixtures are well stirred.
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,
Q′1=(rate in)1−(rate out)1,Q′2=(rate in)2−(rate out)2.
Note that the volumes of the solutions in T1 and T2 remain constant at 100 gallons and 300 gallons, respectively.
T1 receives salt from the external source at the rate of
(1 lb/gal) × (5~gal/min)= 5 lb/min,
and from T2 at the rate of
(lb/gal in T2)× (3~gal/min) =1300Q2×3=1100Q2 lb/min.
Therefore
(rate in)1=5+1100Q2.
Solution leaves T1 at the rate of 8 gal/min, since 6 gal/min are drained and 2 gal/min are pumped to T2; hence,
(rate out)1=( lb/gal in T1)×(8~gal/min) =1100Q1×8=225Q1.
Equations ??? and Equation ??? imply that
Q′1=5+1100Q2−225Q1.
T2 receives salt from the external source at the rate of
(2 lb/gal) × (4~gal/min)= 8 lb/min,
and from T1 at the rate of
(lb/gal in T1)× (2~gal/min) =1100Q1×2=150Q1 lb/min.
Therefore
(rate in)2=8+150Q1.
Solution leaves T2 at the rate of 6 gal/min, since 3 gal/min are drained and 3 gal/min are pumped to T1; hence,
(rate out)2=( lb/gal in T2)×(6~gal/min) =1300Q2×6=150Q2.
Equations ??? and ??? imply that
Q′2=8+150Q1−150Q2.
We say that Equations ??? and ??? form a system of two first order equations in two unknowns, and write them together as
Q′1=5−225Q1+1100Q2Q′2=8+150Q1−150Q2.
Example 10.1.2 : Coupled Springs
A mass m1 is suspended from a rigid support on a spring S1 and a second mass m2 is suspended from the first on a spring S2 (Figure 10.1.2 ). The springs obey Hooke’s law, with spring constants k1 and k2. Internal friction causes the springs to exert damping forces proportional to the rates of change of their lengths, with damping constants c1 and c2. Let y1=y1(t) and y2=y2(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 y1 and y2, assuming that the masses of the springs are negligible and that vertical external forces F1 and F2 also act on the objects.
Solution
In equilibrium, S1 supports both m1 and m2 and S2 supports only m2. Therefore, if Δℓ1 and Δℓ2 are the elongations of the springs in equilibrium then
(m1+m2)g=k1Δℓ1 and m2g=k2Δℓ2.
Let H1 be the Hooke’s law force acting on m1, and let D1 be the damping force on m1. Similarly, let H2 and D2 be the Hooke’s law and damping forces acting on m2. According to Newton’s second law of motion,
m1y″1=−m1g+H1+D1+F1,m2y″2=−m2g+H2+D2+F2.
When the displacements are y1 and y2, the change in length of S1 is −y1+Δℓ1 and the change in length of S2 is −y2+y1+Δℓ2. Both springs exert Hooke’s law forces on m1, while only S2 exerts a Hooke’s law force on m2. These forces are in directions that tend to restore the springs to their natural lengths. Therefore
H1=k1(−y1+Δℓ1)−k2(−y2+y1+Δℓ2) and H2=k2(−y2+y1+Δℓ2).
When the velocities are y′1 and y′2, S1 and S2 are changing length at the rates −y′1 and −y′2+y′1, respectively. Both springs exert damping forces on m1, while only S2 exerts a damping force on m2. 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
D1=−c1y′1+c2(y′2−y′1) and D2=−c2(y′2−y′1).
From Equations ???, ???, and ???,
=−m1g+k1(−y1+Δℓ1)−k2(−y2+y1+Δℓ2)−c1y′1+c2(y′2−y′1)+F1=−(m1g−k1Δℓ1+k2Δℓ2)−k1y1+k2(y2−y1)−c1y′1+c2(y′2−y′1)+F1
and
m2y″2=−m2g+k2(−y2+y1+Δℓ2)−c2(y′2−y′1)+F2=−(m2g−k2Δℓ2)−k2(y2−y1)−c2(y′2−y′1)+F2.
From Equation ???,
m1g−k1Δℓ1+k2Δℓ2=−m2g+k2Δℓ2=0.
Therefore we can rewrite Equation ??? and Equation ??? as
m1y″1=−(c1+c2)y′1+c2y′2−(k1+k2)y1+k2y2+F1m2y″2=c2y′1−c2y′2+k2y1−k2y2+F2.
Example 10.1.3 : Gravity
Let X=X(t)=x(t)i+y(t)j+z(t)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 F=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,
F=K||X||2(−X||X||)=−Kxi+yj+zk(x2+y2+z2)3/2,
where K is a constant. To determine K, we observe that the magnitude of F is
‖F‖=K‖X‖‖X‖3=K‖X‖2=K(x2+y2+z2).
Let R be Earth’s radius. Since ‖F‖=mg when the object is at Earth’s surface,
mg=KR2, so K=mgR2.
Therefore we can rewrite Equation ??? as
F=−mgR2xi+yj+zk(x2+y2+z2)3/2.
Now suppose F is the only force acting on the object. According to Newton’s second law of motion, F=mX″; that is,
m(x″i+y″j+z″k)=−mgR2xi+yj+zk(x2+y2+z2)3/2.
Cancelling the common factor m and equating components on the two sides of this equation yields the systemx″=−gR2x(x2+y2+z2)3/2y″=−gR2y(x2+y2+z2)3/2z″=−gR2z(x2+y2+z2)3/2.
Rewriting Higher Order Systems as First Order Systems
A system of the form
y′1=g1(t,y1,y2,…,yn)y′2=g2(t,y1,y2,…,yn)⋮y′n=gn(t,y1,y2,…,yn)
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 Equation ??? we will say that Equation ??? is an n×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
m1y″1=−(c1+c2)y′1+c2y′2−(k1+k2)y1+k2y2+F1m2y″2=c2y′1−c2y′2+k2y1−k2y2+F2.
derived in Example 10.1.2 as a system of first order equations.
Solution
If we define v1=y′1 and v2=y′2, then v′1=y″1 and v′2=y″2, so Equation ??? becomes
m1v′1=−(c1+c2)v1+c2v2−(k1+k2)y1+k2y2+F1m2v′2=c2v1−c2v2+k2y1−k2y2+F2.
Therefore {y1,y2,v1,v2} satisfies the 4×4 first order system
y′1=v1y′2=v2v′1=1m1[−(c1+c2)v1+c2v2−(k1+k2)y1+k2y2+F1]v′2=1m2[c2v1−c2v2+k2y1−k2y2+F2].
Note
The difference in form between Equation ??? and Equation ???, due to the way in which the unknowns are denoted in the two systems, isn’t important; Equation ??? is a first order system, in that each equation in Equation ??? 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
x″=f(t,x,x′,y,y′,y″)y‴=g(t,x,x′,y,y′y″)
as a first order system.
Solution
We regard x, x′, y, y′, and y″ as unknown functions, and rename them
x=x1,x′=x2,y=y1,y′=y2,y″=y3.
These unknowns satisfy the system
x′1=x2x′2=f(t,x1,x2,y1,y2,y3)y′1=y2y′2=y3y′3=g(t,x1,x2,y1,y2,y3).
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
y(4)+4y‴+6y″+4y′+y=0
as a 4×4 first order system.
Solution
We regard y, y′, y″, and y‴ as unknowns and rename them
y=y1,y′=y2,y″=y3,andy‴=y4.
Then y(4)=y′4, so Equation ??? can be written as
y′4+4y4+6y3+4y2+y1=0.
Therefore {y1,y2,y3,y4} satisfies the system
y′1=y2y′2=y3y′3=y4y′4=−4y4−6y3−4y2−y1.
Example 10.1.7
Rewrite
x‴=f(t,x,x′,x″)
as a system of first order equations.
Solution
We regard x, x′, and x″ as unknowns and rename them
x=y1,x′=y2,andx″=y3.
Then
y′1=x′=y2,y′2=x″=y3,andy′3=x‴.
Therefore {y1,y2,y3} satisfies the first order system
y′1=y2y′2=y3y′3=f(t,y1,y2,y3).
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 will not 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
y′1=g1(t,y1,y2),y1(t0)=y10,y′2=g2(t,y1,y2),y2(t0)=y20
at equally spaced points t0, t1, …, tn=b in an interval [t0,b]. Thus,
ti=t0+ih,i=0,1,…,n,
where
h=b−t0n.
We’ll denote the approximate values of y1 and y2 at these points by y10,y11,…,y1n and y20,y21,…,y2n. The Runge-Kutta method computes these approximate values as follows: given y1i and y2i, compute
I1i=g1(ti,y1i,y2i),J1i=g2(ti,y1i,y2i),I2i=g1(ti+h2,y1i+h2I1i,y2i+h2J1i),J2i=g2(ti+h2,y1i+h2I1i,y2i+h2J1i),I3i=g1(ti+h2,y1i+h2I2i,y2i+h2J2i),J3i=g2(ti+h2,y1i+h2I2i,y2i+h2J2i),I4i=g1(ti+h,y1i+hI3i,y2i+hJ3i),J4i=g2(ti+h,y1i+hI3i,y2i+hJ3i),
and
y1,i+1=y1i+h6(I1i+2I2i+2I3i+I4i),y2,i+1=y2i+h6(J1i+2J2i+2J3i+J4i)
for i=0, …, n−1. Under appropriate conditions on g1 and g2, it can be shown that the global truncation error for the Runge-Kutta method is O(h4), as in the scalar case considered in Section 3.3.