Welcome to the introduction
to systems of ordinary differential equations.
Often we do not have just one dependent variable
and one equation.
As we will see, 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 y one comma y two all the way through y n
then we have a differential equation
involving all of them and their derivatives
with respect to one independent variable x.
For example, y one double prime equals
f of y one prime comma y two prime
comma y one comma y two comma x.
This indicates y one double prime is expressed
as a function of the variables y one y two
and their first derivatives,
as well as the independent variable x.
Usually when we have two dependent variables
we have two equations as shown below
for some functions, f one and f two.
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 shown below is a first order system
where x one, x two, and x three 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
x one of t comma x two of t comma x3 of t
such that the three functions satisfy
the three differential equations.
We usually also have an initial condition.
Just like for single equations,
we specify x one comma x two comma and x three,
for some fixed t.
For example x one of zero equals a one,
x two of zero equals a two, x three of zero equals a three
for some constants a one, a two, and a three.
For the second order system
we would also specify the first derivatives at a point.
And if we have a solution with constants in it
whereby solving for the constants
we find a solution for any initial condition,
we call the solution the general solution.
Let's look at an example.
Let's consider the system y one prime equals y one
and y two prime equals y one minus y two
with y one and y two as dependent variables
and x as the independent variable.
Let's also consider the initial conditions
y one of zero equals one,
and y two of zero equals two.
Looking at the equations, we can solve the first equation
for y one using separation of variables.
We can write the equation
as one divided by y one d y one equals d x.
Integrating both sides,
we have natural log y one equals x plus c.
Exponentiating both sides with a base of e,
we have e raised to the power of natural log y one
equals e to the power of x plus c.
Simplifying, we have y one
equals e to the x times e to the c,
and let's call the constant e to the c "c sub one."
This gives us y one equals c one e to the x.
This is the general solution for the first equation
and now we plug y one into the second equation
and we get the equation y two prime equals,
instead of y one, we have c one e to the x minus y two,
which is a linear first order equation that we can solve
using the method of an integrating factor
which I've shown below.
The first step is to add y two
to both sides of the equation.
In this form, p of x is equal to one,
the coefficient of y two,
and therefore the integrating factor of r of x
is equal to E to the power of the integral
of one d x, giving us r of x equals e to the x.
Next, we multiply both sides of the equation by e to the x.
When doing this, the left side is now equal
to the derivative of the integrating factor
and the variable y two.
Also notice on the right side,
e to the x times c one times e to the x
is equal to e one e to the two x.
The next step is integrate both sides of the equation
which is shown here on the far right in blue.
Simplifying on the left, the integral undoes the derivative,
and we're left with e to the x y two.
On the right, we perform a u-substitution
where u is equal to two x,
giving us c sub one divided by two e to the two x
plus the constant c two.
And the last step is to multiply both sides
by either negative x to solve for y two
which gives us y two equals c one divided by two e to the x
plus c two e to the negative x.
This is the general solution for the second equation.
And now we solve for c one and c two
given the initial conditions
The first initial condition was y one of zero equals one,
so using our solution y one equals c one e to the x,
we substitute zero for x,
and set the function value equal to one,
which I've shown here below in blue.
This gives us c one e to the zero equals one,
giving us c one equals one.
Because C one is equal to one
we now know y one is equal to e to the x.
We also know y two is equal to one half e to the x
plus c two e to the negative x.
And now we use a second initial condition to find c two.
Using y two of zero equals two,
we substitute zero for x in y two,
and set the function value equal to two.
Again, I've shown this below in blue.
This gives us one half e to the zero
plus c two e to the zero equals two.
Solving for c two, we have c two equals three halves.
So now we know y one equals e to the x,
and y two equals one half e to the x
plus three halves e to the negative x.
This is the solution to the system of equations
with the given initial conditions.
Generally, we are not so lucky to be able to solve
for each variable separately as in our example,
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 these solutions together.
We will mostly consider linear systems.
The example above is a linear first order system.
It is linear as none of the dependent variables
or the derivatives appear in non-linear functions
or with powers higher than one.
X, y, x prime, and y prime constants
and functions of t can appear,
but not x times y, or the square of y prime, or x cubed.
Another more complicated example
of a linear system is shown below.
I hope you found this introduction helpful.