## Section 1.3: Introduction - Systems of differential equations

Section 1.3: Introduction - Systems of differential equations

In this course we will start to look at some very simple, yet powerful tools for understanding dynamical systems.

The first thing that we’re going to have to look at it in detail is the language of mathematics that we will be using. I’ve already outlined above that we will be using differential equations, but these come in a variety of forms.

In this course we will almost entirely be using First order systems of differential equations. An example of this might be:

X'(t)=X(t)-Y(t)

Y'(t)=X(t)

This says that I have two variables, X and Y. They can both change with time. The rate of change of X at any given time is given by the difference between the values of X and Y at that time, and the rate of change of Y is given by the value of X at that time. In the following you can see the solution to these equations plotted as a function of t. As you change the initial values (ie. at time t=0) of X and Y, the solutions change. You don’t need to be able to solve these equations.

In[]:=

solutions[c1_,c2_]={x[t],y[t]}/.DSolve[{x'[t]==x[t]-y[t],y'[t]==x[t],x[0]==c1,y[0]==c2},{x,y},t][[1]]plots=Table[Plot[Evaluate[solutions[c1,c2]],{t,0,6},PlotRange->{-10,10},PlotStyle->{Red,Blue},PlotLabels{"X(t)","Y(t)"},AxesLabel{"t","X,Y"},ImageSize500,PlotLabel" = "<>ToString[c1]<>", = "<>ToString[c2],PlotPoints30],{c1,0,1,0.2},{c2,0,1,0.2}];Manipulate[plots[[c1,c2]],{{c1,3,""},1,Length[plots],1},{{c2,3,""},1,Length[plots[[1]]],1},SaveDefinitions->True]

x

0

y

0

x

0

y

0

Out[]=

--3c1Cos-+2,3c2Cos+2-

1

3

t/2

3

t2

3

c1Sin3

t2

3

c2Sin3

t2

1

3

t/2

3

t2

3

c1Sin3

t2

3

c2Sin3

t2

Out[]=

What are we seeing here? Well, we have these two functions, X and Y, which are changing in time, and they are related to through a system of first order differential equations. Changing the values of the functions at t=0 (though one could do this at any time) alter the future behaviour of them. Let’s just see an example of this. Let’s say that you start off with and From the differential equations this immediately sets:

X(0)=1.5

Y(0)=0.5.

X'(0)=1.5-0.5=1

Y'(0)=1.5

And that is then the initial ‘trajectory’ of your functions. So is increasing a little faster than X, which means that Y will be approaching X...which means that will be getting smaller...etc. So as we change the initial conditions we will see different future trajectories.

Y

X'(t)=X(t)-Y(t)

OK, so that is one example of a first order system of two differential equations. We can be a bit more general. We can write down a system of n first-order differential equations:

x

1

f

1

x

1

x

2

x

n

(

0

.1

)x

2

f

2

x

1

x

2

x

n

(

0

.2

)....

x

n

f

n

x

1

x

2

x

n

(

0

.3

)where we have n variables to and their derivatives are given by n functions towhichmaybefunctionsofallofthevariables. These are called first order because we have only first derivatives.

x

1

x

n

f

1

f

n

These 'scould be many things. For instance if we were talking about a particle moving around in three dimensions then they might correspond to the coordinates so we would have that is the traditional x coordinate, is the y coordinate, and is the z coordinate. Here is a particle moving about in three dimensions with the 's changing in time.

x

i

x

1

x

2

x

3

x

i

In[]:=

frames=Table[ListPointPlot3D[{{Sin[t],Cos[t],Sin[t]*Cos[t]}}/.t->3,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}},BoxRatios->1,PlotStyle->PointSize[0.02],PlotLabel->"{="<>ToString[Sin[t]]<>", ="<>ToString[Cos[t]]<>", ="<>ToString[Sin[t]Cos[t]]<>"}"],{t,0,10,0.25}];ListAnimate[frames,SaveDefinitionsTrue,AnimationRate4]

x

1

x

2

x

3

Out[]=

The differential equation just says that however the thing is moving, the rate of change of the 's has some fixed relationship with the value of the 'sthemselves.

x

i

x

i

If we had second derivatives, these would be second order differential equations. Here is an example of a single, second order differential equation:

x''(t)+x'(t)+3sin(x(t))=0

Now comes some magic. It turns out that we can always take a second order differential equation and turn it into two first order differential equations. Let’s actually take this one above. The first thing that we will do...and this is what you should always do, is to define some new variable (let’s call it y) as the derivative of your first variable. So we are simply going to define:

y(t)=x'(t)

You agree that I can do that right? I can always have a new function which is simply defined as the derivative of our original one. OK, very good. Well, that means that the second derivative of x is the first derivative of y:

y'(t)=x''(t)

Now our job will be to eliminate all second derivatives using that last expression:

x''(t)+x'(t)+3sin(x(t))=0⟶y'(t)+x'(t)+3sin(x(t))=0

So now we could write:

y'(t)=-(x'(t)+3sin(x(t)))

x'(t)=y(t)

In fact we could do better than that. We would really like to have expressions as we had in our general case for the system of equations. So we can also get rid of the on the right hand side and just replace it with y(t). So now we have:

x'(t)

y'(t)=-(y(t)+3sin(x(t)))

x'(t)=y(t)

We have just converted our second order equation into two first order equations which fulfil the pattern that we defined above in equations 0.1 to 0.3.

Hang on a minute. Why are we doing this? Well, it turns out to be really convenient to work with systems of first order equations in general.

## JonathanShock,UniversityofCapeTown2021jon.shock@gmail.com

JonathanShock,UniversityofCapeTown2021jon.shock@gmail.com