Artificial Intelligence 🤖
Differential equations
Ordinary differential equations
Systems of linear and nonlinear ODEs
Introduction

Introduction

In Chapters 12 and 13, the differential equations we looked at involved a single dependent variable and a single independent variable. Many real-life situations are modelled by more than one differential equation involving several dependent variables. To model the behaviour of such situations therefore, we study the subject of systems of differential equations.

Some examples of popular mathematical models represented by systems of ODEs are presented below.

Predator-prey models

Consider two species populations: (i) the prey, x(t)x(t) and (ii) the predator, y(t)y(t). Their growth rate is given by dx/dtd x / d t and dy/dtd y / d t, respectively. For constant values of a,b,ca, b, c and dd, the interaction of the two species may be modelled by the following system of ODEs:

dxdt=axbxy,dydt=cy+dxy.\begin{aligned} & \frac{d x}{d t}=a x-b x y, \\ & \frac{d y}{d t}=-c y+d x y . \end{aligned}

The first equation models the growth/decay rate of the prey while the second one models the growth/decay of the predator. The interaction terms, bxy and dxyd x y imply that the rates are affected by both the prey and the predator population. A system of equations in which both equations depend on both dependent variables is called coupled. Another observation we can make about the predator-prey model is that the system is nonlinear; for system of equations with two or more dependent variables, the nonlinearity of the system can be dictated by products of the dependent variables, i.e. xyx y. Finally, the system is said to be autonomous as the equations do not explicitly depend on the independent variable, tt.

Epidemic models

In epidemic models, in addition to considering the spread of infected individuals, it is also important to take into account the growth/decay rate of individuals who are susceptible to the disease and those who recovered from it. The model therefore, may consist of 3 dependent variables: - S(t)S(t) - individuals susceptible to disease;

  • I(t)I(t) - infected individuals;
  • R(t)R(t) - infected and recovered.

A possible system of equations that may be used to model the interaction between the SS, II and RR populations, is given as follows,

dSdt=aSI;dIdt=aSIbIdRdt=bI.\begin{aligned} \frac{d S}{d t} & =-a S I ; \\ \frac{d I}{d t} & =a S I-b I \\ \frac{d R}{d t} & =b I . \end{aligned}

Just as in the predator-prey model above, the epidemic model is also first order (first order time derivatives), autonomous (no explicit tt dependence) and nonlinear (products of dependent variables appear, e.g. SI).

Love affairs

As a final example, we take a look at how systems of first order ODEs may be used to model love stories. Here we consider the growing/dying love of a Romeo-Juliet example. We choose to describe the affection of Romeo towards Juliet by R(t)R(t) and Juliet's affection towards Romeo by J(t)J(t). Therefore, we seek 2 differential equations for the growth/decay of R(t)R(t) and J(t)J(t). Let us consider the following system

dRdt=aR+bJdJdt=aJ+bR.\begin{aligned} & \frac{d R}{d t}=-a R+b J \\ & \frac{d J}{d t}=-a J+b R . \end{aligned}

Assuming that aa and bb are positive constants, the above system models two cautious lovers: as Romeo's affection increases, he is driven away from Juliet but he is drawn to her more and more as her love towards him increases. The growth/decay rate of Juliet's affection is modeled in a similar way. The above system is first order and autonomous but, in contrast to the system of ODEs in the predator-prey and epidemic models, this system is linear (there exist no products of RR and JJ ).

In this chapter, we start by studying the simplest type of systems; these have the following properties

  • they are linear;
  • they are first order (i.e. only first order derivatives of the dependent variables appear).

Next, with knowledge of the behaviour of linear systems, we move on to nonlinear systems where we study the qualitative behaviour of solutions; we obtain information on the solutions by identifying what trajectories look like in the phase plane. We first discussed qualitative solutions and phase portraits in Section 12.6 for a single differential equation, which we referred to as a 1D system. In this chapter, we mainly focus on 2D2 \mathrm{D} systems which consist of two ODEs.

Linear differential equations of order nn

Every nth n^{\text {th }} order linear differential equation can be expressed in terms of a system of nn linear, first-order ODEs.

Expressing a second order ODE into a 2×22 \times 2 system

Consider the following second order LODE

2y5y+y=02 y^{\prime \prime}-5 y^{\prime}+y=0

for y(t)y(t). Of course, this is a constant coefficient, linear ODE and hence very easily solved (algebraically, using the characteristic equation). At this point we do not want to solve Eq. (14.1), we merely want to express it as an equivalent system of first order ODEs.

Method

Step 1: Define new variables for the system

The idea is to end up with a first order system so we proceed by defining new variables, say x1(t)x_{1}(t) and x2(t)x_{2}(t) for the system as follows,

x1(t)=y(t);x2(t)=y(t).\begin{aligned} & x_{1}(t)=y(t) ; \\ & x_{2}(t)=y^{\prime}(t) . \end{aligned}

Step 2: Form the system of ODEs.

  • The first differential equation is very easy to obtain [note this method applies to any high order linear differential equation (higher than 1)], we simply take Eq. (14.2) and differentiate once with respect to tt :
x1=yx_{1}^{\prime}=y^{\prime}

and, with x2=yx_{2}=y^{\prime},

x1=x2.x_{1}^{\prime}=x_{2} .

Equation (14.5) is the first ODE we are looking for: it is a first order differential equation and it is expressed in terms of the dependent variables associated with the system (i.e. x2x_{2} not yy ).

  • For the second ODE, we start by differentiating (14.3) wrt tt :
x2=yx_{2}^{\prime}=y^{\prime \prime}

and, we note that, by rearraging Eq. (14.1), we have:

y=12(5yy)y^{\prime \prime}=\frac{1}{2}\left(5 y^{\prime}-y\right)

Substituting (14.7) in (14.6) yields

x2=12(5yy)x_{2}^{\prime}=\frac{1}{2}\left(5 y^{\prime}-y\right)

and, with x2=y,x1=yx_{2}=y^{\prime}, x_{1}=y,

x2=12(5x2x1).x_{2}^{\prime}=\frac{1}{2}\left(5 x_{2}-x_{1}\right) .

Equations (14.5) and (14.9) give the following first order system of ODEs

x1=x2,x2=12(5x2x1).\begin{aligned} & x_{1}^{\prime}=x_{2}, \\ & x_{2}^{\prime}=\frac{1}{2}\left(5 x_{2}-x_{1}\right) . \end{aligned}

The system given by (14.10) is equivalent to the second order ODE given by (14.1). Note that the final system of ODEs is only a function of x1x_{1} and x2x_{2}; it should be independent of the original variable and its derivatives, i.e. y,yy, y^{\prime} and yy^{\prime \prime}.

Matrix notation

Consider a general 2×22 \times 2 system given by the following equations:

x1=4x1+7x2;x2=2x15x2.\begin{aligned} & x_{1}^{\prime}=4 x_{1}+7 x_{2} ; \\ & x_{2}^{\prime}=-2 x_{1}-5 x_{2} . \end{aligned}

We can express this system using matrices and vectors, as follows:

(x1x2)=(4725)(x1x2).\left(\begin{array}{l} x_{1}^{\prime} \\ x_{2}^{\prime} \end{array}\right)=\left(\begin{array}{cc} 4 & 7 \\ -2 & -5 \end{array}\right)\left(\begin{array}{l} x_{1} \\ x_{2} \end{array}\right) .

The system given by (14.11) may be expressed in an even more compact form than the one given by (14.12). If we define the matrix AA to be

A=(4725)A=\left(\begin{array}{cc} 4 & 7 \\ -2 & -5 \end{array}\right)

and the vectors, x=(x1x2)\boldsymbol{x}^{\prime}=\left(\begin{array}{ll}x_{1}^{\prime} & x_{2}^{\prime}\end{array}\right)^{\top} and x=(x1x2)\boldsymbol{x}=\left(\begin{array}{ll}x_{1} & x_{2}\end{array}\right)^{\top}, we can rewrite Eq. (14.12) as:

x=Ax.\boldsymbol{x}^{\prime}=A \boldsymbol{x} .

Note that the column vectors are defined with the transpose notation (see also Chapter 10 for matrix notation and definitions).

Terminology

  • Consider an arbitrary 2×22 \times 2 system of ODEs:
x1=ax1(t)+bx2(t)+g1(t);x2=cx1(t)+dx2(t)+g2(t).\begin{aligned} & x_{1}^{\prime}=a x_{1}(t)+b x_{2}(t)+g_{1}(t) ; \\ & x_{2}^{\prime}=c x_{1}(t)+d x_{2}(t)+g_{2}(t) . \end{aligned}

The system (14.14) is equivalent to:

x=Ax+g(t)\boldsymbol{x}^{\prime}=A \boldsymbol{x}+\boldsymbol{g}(t)

where A=(abcd)A=\left(\begin{array}{ll}a & b \\ c & d\end{array}\right) and g(t)=(g1(t)g2(t))\boldsymbol{g}(\boldsymbol{t})=\left(\begin{array}{ll}g_{1}(t) & g_{2}(t)\end{array}\right)^{\top}.

  • If g(t)=0\boldsymbol{g}(\boldsymbol{t})=\mathbf{0} then, (14.15) is homogeneous.
  • If any term in g(t)\boldsymbol{g}(\boldsymbol{t}) is nonzero, then (14.15) is said to be nonhomogeneous. - Initial conditions Suppose we have a 2×22 \times 2 system of first order ODEs for x1(t)x_{1}(t) and x2(t)x_{2}(t), where tt is the independent variable. When we seek a particular solution to a system of first order ODEs, we use initial conditions given by particular values of the dependent variables at a certain value of the independent variable, say at t=t0t=t_{0}. For instance
x1(t0)=k1 and x2(t0)=k2x_{1}\left(t_{0}\right)=k_{1} \text { and } x_{2}\left(t_{0}\right)=k_{2}

where k1k_{1} and k2k_{2} are constants. Typically, we are interested in the bigger picture, i.e. what are the qualitative features of the solutions x(t)x(t) and y(t)y(t) starting from different initial conditions.