Login
📚 Differential Equations for Engineers
Chapters ▾

3.1 Introduction to Systems of ODEs

Often we do not have just one dependent variable and just one differential equation, we may end up with systems of several equations and several dependent variables even if we start with a single equation.

If we have several dependent variables, suppose y1, y2,..., yn, then we can have a differential equation involving all of them and their derivatives. For example, y1=f(y1,y2,y1,y2,x). Usually, when we have two dependent variables we have two equations such as

y 1 = f 1 ( y 1 , y 2 , y 1 , y 2 , x ) y 2 = f 2 ( y 1 , y 2 , y 1 , y 2 , x )

for some functions f1 and f2. We call the above a system of differential equations. More precisely, the above is a second order system of ODEs as second order derivatives appear. The system

x1=g1(x1,x2,x3,t),x2=g2(x1,x2,x3,t),x3=g3(x1,x2,x3,t),

is a first order system, where x1,x2,x3 are the dependent variables, and t is the independent variable.

The terminology for systems is essentially the same as for single equations. For the system above, a solution is a set of three functions x1(t), x2(t), x3(t), such that

x1(t)=g1(x1(t),x2(t),x3(t),t),x2(t)=g2(x1(t),x2(t),x3(t),t),x3(t)=g3(x1(t),x2(t),x3(t),t).

We usually also have an initial condition. Just like for single equations we specify x1, x2, and x3 for some fixed t. For example, x1(0)=a1, x2(0)=a2, x3(0)=a3. For some constants a1, a2, and a3. For the second order system we would also specify the first derivatives at a point. And if we find a solution with constants in it, where by solving for the constants we find a solution for any initial condition, we call this solution the general solution. Best to look at a simple example.

Generally, we will not be so lucky to be able to solve for each variable separately as in the example above, and we will have to solve for all variables at once. While we won’t generally be able to solve for one variable and then the next, we will try to salvage as much as possible from this technique. It will turn out that in a certain sense we will still (try to) solve a bunch of single equations and put their solutions together. Let’s not worry right now about how to solve systems yet.

We will mostly consider the linear systems. The example above is a so-called linear first order system. It is linear as none of the dependent variables or their derivatives appear in nonlinear functions or with powers higher than one (x, y, x and y, constants, and functions of t can appear, but not xy or (y)2 or x3). Another, more complicated, example of a linear system is

y1=ety1+t2y1+5y2+sin(t),y2=ty1y2+2y1+cos(t).

Applications

Let us consider some simple applications of systems and how to set up the equations.

Changing to First Order

Before we talk about how to handle systems, let us note that in some sense we need only consider first order systems. Let us take an nth order differential equation

y ( n ) = F ( y ( n 1 ) , . . . , y , y , x ) .

We define new variables u1,...,un and write the system

u 1 = u 2 u 2 = u 3 u n 1 = u n u n = F ( u n , u n 1 , , u 2 , u 1 , x )

We solve this system for u1,u2,,un. Once we have solved for the u’s, we can discard u2 through un and let y=u1. We note that this y solves the original equation.

A similar process can be followed for a system of higher order differential equations. For example, a system of k differential equations in k unknowns, all of order n, can be transformed into a first order system of n×k equations and n×k unknowns.

It is useful to go back and forth between systems and higher order equations for other reasons. For example, software for solving ODE numerically (approximation) is generally for first order systems. To use it, you take whatever ODE you want to solve and convert it to a first order system. It is not very hard to adapt computer code for the Euler or Runge–Kutta method for first order equations to handle first order systems. We simply treat the dependent variable not as a number but as a vector. In many mathematical computer languages there is almost no distinction in syntax.

Autonomous Systems and Vector Fields

A system where the equations do not depend on the independent variable is called an autonomous system. For example the system x=2yx, y=x is autonomous as t is the independent variable but does not appear in the equations.

For autonomous systems we can draw the so-called direction field or vector field, a plot similar to a slope field, but instead of giving a slope at each point, we give a direction (and a magnitude). The previous example, x=2yx, y=x, says that at the point (x,y) the direction in which we should travel to satisfy the equations should be the direction of the vector (2yx,x) with the speed equal to the magnitude of this vector. So we draw the vector (2yx,x) at the point (x,y) and we do this for many points on the xy-plane. For example, at the point (1,2) we draw the vector (2(2)1,1)=(3,1), a vector pointing to the right and a little bit up, while at the point (2,1) we draw the vector (2(1)2,2)=(0,2) a vector that points straight up. When drawing the vectors, we will scale down their size to fit many of them on the same direction field. If we drew the arrows at the actual size, the diagram would be a jumbled mess once you would draw more than a couple of arrows. So we scale them all so that not even the longest one interferes with the others. We are mostly interested in their direction and relative size. See Figure 3.

Function graph showing the direction field of the system x′ = k*y - x, y′ = x, drawn from 308 sample arrows, and 9 trajectories through (1, 0), (1, 1), (-1, -1), (2, -1), (-2, 1), (-1, 1), (1, -1), (0, 2) and (0, -2). Adjustable parameter: Coefficient of y in x' (Lebl's system is k = 2) (k) = 2. Viewing window: x from -4.93 to 5.93, y from -2.86 to 3.86.
This section's own direction field, x′ = 2y − x, y′ = x, carrying nine trajectories instead of the single one Lebl's Figure 4 shows. The curve seeded at (1, 0) is his: follow it two units of t and it arrives at (2.475, 2.457), exactly the value the text computes. Four seeds sit on the two directions the section's own y″ + y′ − 2y = 0 hands you — the e^t part of the solution runs out along (1, 1), the e^(-2t) part runs in along (2, −1) — so those four draw as perfectly straight rays, the skeleton one trajectory cannot show. Now drag k, which stands in for Lebl's 2: the characteristic equation becomes λ² + λ − k = 0, so crossing k = 0 destroys the saddle outright (the whole y-axis turns into equilibria) and leaves a stable node, and below k = −0.25 the discriminant 1 + 4k goes negative and that node becomes a spiral sink — three regimes in one drag.

We can draw a path of the solution in the plane. Suppose the solution is given by x=f(t), y=g(t). We pick an interval of t (say 0t2 for our example) and plot all the points (f(t),g(t)) for t in the selected range. The resulting picture is called the phase portrait (or phase plane portrait). The particular curve obtained is called the trajectory or solution curve. See an example plot in Figure 4. In the figure the solution starts at (1,0) and travels along the vector field for a distance of 2 units of t. We solved this system precisely, so we compute x(2) and y(2) to find x(2)2.475 and y(2)2.457. This point corresponds to the top right end of the plotted solution curve in the figure.

Notice the similarity to the diagrams we drew for autonomous systems in one dimension. But note how much more complicated things become when we allow just one extra dimension.

We can draw phase portraits and trajectories in the xy-plane even if the system is not autonomous. In this case, however, we cannot draw the direction field, since the field changes as t changes. For each t we would get a different direction field.

Direction field for x' = 2y-x and y' = x
Figure 3: The direction field for x=2yx,y=x.
The direction field for x' = 2y - x, y' = x  with the trajectory of the solution starting at (1, 0) for 0 <= t <= 2.
Figure 4: The direction field for x=2yx,y=x with the trajectory of the solution starting at (1,0) for 0t2.

Picard’s theorem

Perhaps before going further, let us mention that Picard’s theorem on existence and uniqueness still holds for systems of ODE. Let us restate this theorem in the setting of systems. A general first order system is of the form

x1=F1(x1,x2,,xn,t),x2=F2(x1,x2,,xn,t),xn=Fn(x1,x2,,xn,t).

(3.1.1)

That is, a unique solution exists for any initial condition given that the system is reasonable (Fj and its partial derivatives in the x variables are continuous). As for single equations we may not have a solution for all time t, but at least for some short period of time.

As we can change any nth order ODE into a first order system, then we notice that this theorem provides also the existence and uniqueness of solutions for higher order equations that we have until now not stated explicitly.

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.