[next] [prev] [prev-tail] [tail] [up]

### 3.1Introduction to systems of ODEs

Note: 1 lecture, §4.1 in [EP], §7.1 in [BD]

Often we do not have just one dependent variable and one equation. And 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 , , …, , then we can have a diﬀerential equation involving all of them and their derivatives. For example, . Usually, when we have two dependent variables we have two equations such as

for some functions and . We call the above a system of diﬀerential equations. More precisely, the above is a second order system of ODEs.

Example 3.1.1: Sometimes a system is easy to solve by solving for one variable and then for the second variable. Take the ﬁrst order system

with initial conditions of the form , .

We note that is the general solution of the ﬁrst equation. We then plug this into the second equation and get the equation , which is a linear ﬁrst order equation that is easily solved for . By the method of integrating factor we get

or . The general solution to the system is, therefore,

We solve for and given the initial conditions. We substitute and ﬁnd that and . Thus the solution is , and .

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.

As an example application, let us think of mass and spring systems again. Suppose we have one spring with constant , but two masses and . We can think of the masses as carts, and we will suppose that they ride along a straight track with no friction. Let be the displacement of the ﬁrst cart and be the displacement of the second cart. That is, we put the two carts somewhere with no tension on the spring, and we mark the position of the ﬁrst and second cart and call those the zero positions. Then measures how far the ﬁrst cart is from its zero position, and measures how far the second cart is from its zero position. The force exerted by the spring on the ﬁrst cart is , since is how far the string is stretched (or compressed) from the rest position. The force exerted on the second cart is the opposite, thus the same thing with a negative sign. Newton’s second law states that force equals mass times acceleration. So the system of equations governing the setup is

In this system we cannot solve for the or variable separately. That we must solve for both and at once is intuitively clear, since where the ﬁrst cart goes depends on exactly where the second cart goes and vice-versa.

Before we talk about how to handle systems, let us note that in some sense we need only consider ﬁrst order systems. Let us take an order diﬀerential equation

We deﬁne new variables and write the system

We solve this system for , , …, . Once we have solved for the ’s, we can discard through and let . We note that this solves the original equation.

For example, take . Letting , , , we ﬁnd the system:

A similar process can be followed for a system of higher order diﬀerential equations. For example, a system of diﬀerential equations in unknowns, all of order , can be transformed into a ﬁrst order system of equations and unknowns.

Example 3.1.2: We can use this idea in reverse as well. Let us consider the system

where the independent variable is . We wish to solve for the initial conditions , .

If we diﬀerentiate the second equation we get . We know what is in terms of and , and we know that . So,

We now have the equation . We know how to solve this equation and we ﬁnd that . Once we have we use the equation to get .

We solve for the initial conditions and . Hence, and . So and . Our solution is

Exercise 3.1.1: Plug in and check that this really is the solution.

It is useful to go back and forth between systems and higher order equations for other reasons. For example, the ODE approximation methods are generally only given as solutions for ﬁrst order systems. It is not very hard to adapt the code for the Euler method for ﬁrst order equations to handle ﬁrst order systems. We essentially just treat the dependent variable not as a number but as a vector. In many mathematical computer languages there is almost no distinction in syntax.

The above example is what we call a linear ﬁrst order system, as none of the dependent variables appear in any functions or with any higher powers than one. It is also autonomous as the equations do not depend on the independent variable .

For autonomous systems we can draw the so-called direction ﬁeld or vector ﬁeld. That is, a plot similar to a slope ﬁeld, but instead of giving a slope at each point, we give a direction (and a magnitude). The previous example , says that at the point the direction in which we should travel to satisfy the equations should be the direction of the vector with the speed equal to the magnitude of this vector. So we draw the vector based at the point and we do this for many points on the -plane. We may want to scale down the size of our vectors to ﬁt many of them on the same direction ﬁeld. See Figure 3.1.

We can draw a path of the solution in the plane. Suppose the solution is given by , . We pick an interval of (say for our example) and plot all the points for 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 3.2. In the ﬁgure the solution starts at and travels along the vector ﬁeld for a distance of 2 units of . We solved this system precisely, so we compute and to ﬁnd and . This point corresponds to the top right end of the plotted solution curve in the ﬁgure.

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 -plane even if the system is not autonomous. In this case however we cannot draw the direction ﬁeld, since the ﬁeld changes as changes. For each we would get a diﬀerent direction ﬁeld.

#### 3.1.1Exercises

Exercise 3.1.2: Find the general solution of , .

Exercise 3.1.3: Find the general solution of , .

Exercise 3.1.4: Write as a ﬁrst order system of ODEs.

Exercise 3.1.5: Write , as a ﬁrst order system of ODEs.

Exercise 3.1.101: Find the general solution to , , .

Exercise 3.1.102: Solve , , , .

Exercise 3.1.103: Write as a ﬁrst order system.

Exercise 3.1.104: Write , as a ﬁrst order system.

Exercise 3.1.105: Suppose two masses on carts on frictionless surface are at displacements and as in the example of this section. Suppose initial displacement is , and initial velocity is for some number . Use your intuition to solve the system, explain your reasoning.