Section 1.3: Systems Of Differential Equations
Section 1.3: Systems Of Differential Equations
Systems of Differential Equations
In this course we will look at simple, yet powerful tools for understanding dynamical systems.
We begin with looking in detail at the language of mathematics that we will be using. I’ve already outlined 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, which can both change with time. The rate of change of X a given time is given by the difference between the values of X and Y at that time. The rate of change of Y is given by the value of X at that time. Below 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 through a system of first order differential equations. Changing the values of the functions at an initial time alter the future behaviour of them.
Let's see an example of this. If 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 the initial ‘trajectory’ of your functions. So is increasing faster than X, so Y will be approaching X...
Y
Which means that will be getting smaller...etc.
X'(t)=X(t)-Y(t)
So as we change the initial conditions we will see different future trajectories.
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
x
2
f
2
x
1
x
2
x
n
....
x
n
f
n
x
1
x
2
x
n
Where we have n variables to and their derivatives are given by n functions towhicharefunctionsofthevariables. These are called first order because we have only first derivatives.
x
1
x
n
f
1
f
n
These variables could 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 , , and are the traditional x, y and z coordinates respectively. Here is a particle moving about in three dimensions with the 's changing in time.
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 says: 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 we can 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 always do, is to define some new variable (say 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? We just need that definition function as part of out system.
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:
this->x''(t)+x'(t)+3sin(x(t))=0
becomes->y'(t)+x'(t)+3sin(x(t))=0
So now we could write:
becomes->y'(t)=-(x'(t)+3sin(x(t)))
becauseofthis->x'(t)=y(t)
We would really like to have expressions as we had in our general case for the system of equations.
We have just converted our second order equation into two first order equations which fulfil the pattern that we defined above here.
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.