# 10: Linear Systems of Differential Equations - Mathematics

IN THIS CHAPTER we consider systems of differential equations involving more than one unknown function. SECTION 10.7 presents the method of variation of parameters for nonhomogeneous linear systems.

One example is application of Newton's law of cooling to an object submerged in a coolant or heating fluid, which is itself exposed to an ambient environment.

Suppose that a doting father is warming a refrigerated bottle of milk for his infant son by submerging it in a bowl of hot water. If $M$ is the temperature of the milk in the bottle and $W$ is the temperature of the water in the bowl, then

Where the coefficients $K_,$ $K_$, and $K_$ are given or determined experimentally. This makes for a simple non-homogeneous linear system.

I do inflow/outflow problems with more than one tank. If x(t) represents the amount of salt in a tank as a function of time, and you have brine (or pure water) coming in and thoroughly mixed brine going out, then the differential equation for one tank is

dx/dt = INFLOW RATE - OUTFLOW RATE

If you have two tanks, one with x(t) kg of salt and the other with y(t) kg of salt, and they are interconnected, then you get a system of differential equations:

dx/dt = INFLOW RATE - OUTFLOW RATE dy/dt = INFLOW RATE - OUTFLOW RATE

However the rates can be interdependent.

One popular application is predator prey systems. It's a fairly obvious one, but an interesting one no doubt.

You have the system egin frac

= x(a-by) end egin frac
= cy(x-d) end Where $x$ is the population of zebras, $y$ is the population of lions, and $a$,$b$,$c$,$d$ are just constants of your choice. (You can just make $a = b = c = d = 1$. You would need MATLAB, or MAPLE, or any software that can draw solution curves to the system of ODEs. You can then explain to your students what the solution curve means.

There are many states in this predator-prey system.

[A] The population of lions and zebras is relatively small.

[B] The small number of lions allows the zebra population to increase.

[C] The increased number of zebras allows the lion population to increase.

[D] The increase in lion population causes the zebra population to decrease.

[E] The decrease in the zebra population causes the lion population to decrease. We then end back in Stage A.

Personally, I think predator-prey models are a great application of systems of ODEs. Most of the time, students are expected to just solve systems of ODEs, but being able to look at how much information a solution curve to a system of ODEs can tell you is amazing.

## Linear System of Differential Equations - Why can the coefficients be variable?

Consider $n$ variables $x_1, cdots, x_n$ in a linear system of differential equations.

## The foundations of geometry

By the late 19th century the hegemony of Euclidean geometry had been challenged by non-Euclidean geometry and projective geometry. The first notable attempt to reorganize the study of geometry was made by the German mathematician Felix Klein and published at Erlangen in 1872. In his Erlanger Programm Klein proposed that Euclidean and non-Euclidean geometry be regarded as special cases of projective geometry. In each case the common features that, in Klein’s opinion, made them geometries were that there were a set of points, called a “ space,” and a group of transformations by means of which figures could be moved around in the space without altering their essential properties. For example, in Euclidean plane geometry the space is the familiar plane, and the transformations are rotations, reflections, translations, and their composites, none of which change either length or angle, the basic properties of figures in Euclidean geometry. Different geometries would have different spaces and different groups, and the figures would have different basic properties.

Klein produced an account that unified a large class of geometries—roughly speaking, all those that were homogeneous in the sense that every piece of the space looked like every other piece of the space. This excluded, for example, geometries on surfaces of variable curvature, but it produced an attractive package for the rest and gratified the intuition of those who felt that somehow projective geometry was basic. It continued to look like the right approach when Lie’s ideas appeared, and there seemed to be a good connection between Lie’s classification and the types of geometry organized by Klein.

Mathematicians could now ask why they had believed Euclidean geometry to be the only one when, in fact, many different geometries existed. The first to take up this question successfully was the German mathematician Moritz Pasch, who argued in 1882 that the mistake had been to rely too heavily on physical intuition. In his view an argument in mathematics should depend for its validity not on the physical interpretation of the terms involved but upon purely formal criteria. Indeed, the principle of duality did violence to the sense of geometry as a formalization of what one believed about (physical) points and lines one did not believe that these terms were interchangeable.

The ideas of Pasch caught the attention of the German mathematician David Hilbert, who, with the French mathematician Henri Poincaré, came to dominate mathematics at the beginning of the 20th century. In wondering why it was that mathematics—and in particular geometry—produced correct results, he came to feel increasingly that it was not because of the lucidity of its definitions. Rather, mathematics worked because its (elementary) terms were meaningless. What kept it heading in the right direction was its rules of inference. Proofs were valid because they were constructed through the application of the rules of inference, according to which new assertions could be declared to be true simply because they could be derived, by means of these rules, from the axioms or previously proven theorems. The theorems and axioms were viewed as formal statements that expressed the relationships between these terms.

The rules governing the use of mathematical terms were arbitrary, Hilbert argued, and each mathematician could choose them at will, provided only that the choices made were self-consistent. A mathematician produced abstract systems unconstrained by the needs of science, and if scientists found an abstract system that fit one of their concerns, they could apply the system secure in the knowledge that it was logically consistent.

Hilbert first became excited about this point of view (presented in his Grundlagen der Geometrie [1899 “ Foundations of Geometry”) when he saw that it led not merely to a clear way of sorting out the geometries in Klein’s hierarchy according to the different axiom systems they obeyed but to new geometries as well. For the first time there was a way of discussing geometry that lay beyond even the very general terms proposed by Riemann. Not all of these geometries have continued to be of interest, but the general moral that Hilbert first drew for geometry he was shortly to draw for the whole of mathematics.

## 10: Linear Systems of Differential Equations - Mathematics

Because we are going to be working almost exclusively with systems of equations in which the number of unknowns equals the number of equations we will restrict our review to these kinds of systems.

All of what we will be doing here can be easily extended to systems with more unknowns than equations or more equations than unknowns if need be.

Let’s start with the following system of (n) equations with the (n) unknowns, (x_<1>), (x_<2>),…, (x_).

Note that in the subscripts on the coefficients in this system, (a_), the (i) corresponds to the equation that the coefficient is in and the (j) corresponds to the unknown that is multiplied by the coefficient.

To use linear algebra to solve this system we will first write down the augmented matrix for this system. An augmented matrix is really just all the coefficients of the system and the numbers for the right side of the system written in matrix form. Here is the augmented matrix for this system.

To solve this system we will use elementary row operations (which we’ll define these in a bit) to rewrite the augmented matrix in triangular form. The matrix will be in triangular form if all the entries below the main diagonal (the diagonal containing (a_<11>), (a_<22>), …,(a_)) are zeroes.

Once this is done we can recall that each row in the augmented matrix corresponds to an equation. We will then convert our new augmented matrix back to equations and at this point solving the system will become very easy.

Before working an example let’s first define the elementary row operations. There are three of them.

Interchange two rows. This is exactly what it says. We will interchange row (i) with row (j). The notation that we’ll use to denote this operation is : ( leftrightarrow )

It’s always a little easier to understand these operations if we see them in action. So, let’s solve a couple of systems.

The first step is to write down the augmented matrix for this system. Don’t forget that coefficients of terms that aren’t present are zero.

Now, we want the entries below the main diagonal to be zero. The main diagonal has been colored red so we can keep track of it during this first example. For reasons that will be apparent eventually we would prefer to get the main diagonal entries to all be ones as well.

We can get a one in the upper most spot by noticing that if we interchange the first and second row we will get a one in the uppermost spot for free. So let’s do that.

Now we need to get the last two entries (the -2 and 3) in the first column to be zero. We can do this using the third row operation. Note that if we take 2 times the first row and add it to the second row we will get a zero in the second entry in the first column and if we take -3 times the first row to the third row we will get the 3 to be a zero. We can do both of these operations at the same time so let’s do that.

Before proceeding with the next step, let’s make sure that you followed what we just did. Let’s take a look at the first operation that we performed. This operation says to multiply an entry in row 1 by 2 and add this to the corresponding entry in row 2 then replace the old entry in row 2 with this new entry. The following are the four individual operations that we performed to do this.

[egin2left( 1 ight) + left( < - 2> ight) & = 0 2left( 2 ight) + 1 & = 5 2left( 3 ight) + left( < - 1> ight) & = 5 2left( <13> ight) + 4 & = 30end]

Okay, the next step optional, but again is convenient to do. Technically, the 5 in the second column is okay to leave. However, it will make our life easier down the road if it is a 1. We can use the second row operation to take care of this. We can divide the whole row by 5. Doing this gives,

The next step is to then use the third row operation to make the -6 in the second column into a zero.

Now, officially we are done, but again it’s somewhat convenient to get all ones on the main diagonal so we’ll do one last step.

We can now convert back to equations.

At this point the solving is quite easy. We get (x_<3>) for free and once we get that we can plug this into the second equation and get (x_<2>). We can then use the first equation to get (x_<1>). Note as well that having 1’s along the main diagonal helped somewhat with this process.

The solution to this system of equation is

The process used in this example is called Gaussian Elimination. Let’s take a look at another example.

First write down the augmented matrix.

We won’t put down as many words in working this example. Here’s the work for this augmented matrix.

We won’t go any farther in this example. Let’s go back to equations to see why.

The last equation should cause some concern. There’s one of three options here. First, we’ve somehow managed to prove that 0 equals 8 and we know that’s not possible. Second, we’ve made a mistake, but after going back over our work it doesn’t appear that we have made a mistake.

This leaves the third option. When we get something like the third equation that simply doesn’t make sense we immediately know that there is no solution. In other words, there is no set of three numbers that will make all three of the equations true at the same time.

Let’s work another example. We are going to get the system for this new example by making a very small change to the system from the previous example.

So, the only difference between this system and the system from the second example is we changed the 1 on the right side of the equal sign in the third equation to a -7.

Now write down the augmented matrix for this system.

The steps for this problem are identical to the steps for the second problem so we won’t write them all down. Upon performing the same steps we arrive at the following matrix.

This time the last equation reduces to

and unlike the second example this is not a problem. Zero does in fact equal zero!

We could stop here and go back to equations to get a solution and there is a solution in this case. However, if we go one more step and get a zero above the one in the second column as well as below it our life will be a little simpler. Doing this gives,

If we now go back to equation we get the following two equations.

We have two equations and three unknowns. This means that we can solve for two of the variables in terms of the remaining variable. Since (x_<3>) is in both equations we will solve in terms of that.

What this solution means is that we can pick the value of (x_<3>) to be anything that we’d like and then find values of (x_<1>) and (x_<2>). In these cases, we typically write the solution as follows,

In this way we get an infinite number of solutions, one for each and every value of (t).

These three examples lead us to a nice fact about systems of equations.

Given a system of equations, (eqref), we will have one of the three possibilities for the number of solutions.

Before moving on to the next section we need to take a look at one more situation. The system of equations in (eqref) is called a nonhomogeneous system if at least one of the bis is not zero. If however all of the (b_)'s are zero we call the system homogeneous and the system will be,

Now, notice that in the homogeneous case we are guaranteed to have the following solution.

This solution is often called the trivial solution.

For homogeneous systems the fact above can be modified to the following.

Given a homogeneous system of equations, (eqref), we will have one of the two possibilities for the number of solutions.

Exactly one solution, the trivial solution

In the second possibility we can say non-zero solution because if there are going to be infinitely many solutions and we know that one of them is the trivial solution then all the rest must have at least one of the (x_)'s be non-zero and hence we get a non-zero solution.

## Lecture 24: Introduction to First-order Systems of ODEs  Topics covered: Introduction to First-order Systems of ODE's Solution by Elimination, Geometric Interpretation of a System.

Instructor/speaker: Prof. Arthur Mattuck Lecture 1: The Geometrical . Lecture 2: Euler's Numerica. Lecture 3: Solving First-or. Lecture 4: First-order Subs. Lecture 5: First-order Auto. Lecture 6: Complex Numbers . Lecture 7: First-order Line.  Lecture 9: Solving Second-o. Lecture 10: Continuation: C. Lecture 11: Theory of Gener. Lecture 12: Continuation: G. Lecture 13: Finding Particu. Lecture 14: Interpretation . Lecture 15: Introduction to. Lecture 16: Continuation: M. Lecture 17: Finding Particu. Lecture 19: Introduction to. Lecture 20: Derivative Form. Lecture 21: Convolution For. Lecture 22: Using Laplace T. Lecture 23: Use with Impuls. Lecture 24: Introduction to. Lecture 25: Homogeneous Lin. Lecture 26: Continuation: R.

Lecture 27: Sketching Solut. Lecture 28: Matrix Methods . Lecture 29: Matrix Exponent. Lecture 30: Decoupling Line. Lecture 31: Non-linear Auto.  Lecture 33: Relation Betwee.

For the rest of the term, we are going to be studying not just one differential equation at a time, but rather what are called systems of differential equations.

Those are like systems of linear equations.

They have to be solved simultaneously, in other words, not just one at a time.

So, how does a system look when you write it down?

Well, since we are going to be talking about systems of ordinary differential equations, there still will be only one independent variable, but there will be several dependent variables. I am going to call, let's say two. The dependent variables are going to be, I will call them x and y, and then the first order system, something involving just first derivatives, will look like this. On the left-hand side will be x prime, in other words. On the right-hand side will be the dependent variables and then also the independent variables.

I will indicate that, I will separate it all from the others by putting a semicolon there.

And the same way y prime, the derivative of y with respect to t, will be some other function of (x, y) and t. Let's write down explicitly that x and y are dependent variables.

And what they depend upon is the independent variable t, time. A system like this is going to be called first order. And we are going to consider basically only first-order systems for a secret reason that I will explain at the end of the period.

This is a first-order system, meaning that the only kind of derivatives that are up here are first derivatives.

So x prime is dx over dt and so on.

Now, there is still more terminology.

Of course, practically all the equations after the term started, virtually all the equations we have been considering are linear equations, so it must be true that linear systems are the best kind.

And, boy, they certainly are. When are we going to call a system linear? I think in the beginning you should learn a little terminology before we launch in and actually try to start to solve these things.

Well, the x and y, the dependent variables must occur linearly. In other words, it must look like this, ax plus by.

Now, the t can be a mess. And so I will throw in an extra function of t there. And y prime will be some other linear combination of x and y, plus some other messy function of t. But even the a, b, c, and d are allowed to be functions of t.

They could be one over t cubed or sine t or something like that. So I have to distinguish those cases. The case where a, b, c, and d are constants, that I will call -- Well, there are different things you can call it.

We will simply call it a constant coefficient system.

A system with coefficients would probably be better English. On the other hand, a, b, c, and d, this system will still be called linear if these are functions of t.

Can also be functions of t.

So it would be a perfectly good linear system to have x prime equals tx plus sine t times y plus e to the minus t squared.

You would never see something like that but it is okay.

What else do you need to know? Well, what would a homogenous system be? A homogenous system is one without these extra guys. That doesn't mean there is no t in it. There could be t in the a, b, c and d, but these terms with no x and y in them must not occur. So, a linear homogenous.

And that is the kind we are going to start studying first in the same way when we studied higher order equations.

We studied first homogenous. You had to know how to solve those first, and then you could learn how to solve the more general kind. So linear homogenous means that r1 is zero and r2 is zero for all time.

They are identically zero. They are not there.

You don't see them. Have I left anything out?

Yes, the initial conditions. Since that is quite general, let's talk about what would initial conditions look like?

Well, in a general way, the reason you have to have initial conditions is to get values for the arbitrary constants that appear in the solution.

The question is, how many arbitrary constants are going to appear in the solutions of these equations?

Well, I will just give you the answer.

Two. The number of arbitrary constants that appear is the total order of the system.

For example, if this were a second derivative and this were a first derivative, I would expect three arbitrary constants in the system -- -- because the total, the sum of two and one makes three. So you must have as many initial conditions as you have arbitrary constants in the solution. And that, of course, explains when we studied second-order equations, we had to have two initial conditions.

I had to specify the initial starting point and the initial velocity. And the reason we had to have two conditions was because the general solution had two arbitrary constants in it. The same thing happens here but the answer is it is more natural, the conditions here are more natural. I don't have to specify the velocity. Why not?

Well, because an initial condition, of course, would want me to say what the starting value of x is, some number, and it will also want to know what the starting value of y is at that same point.

Well, there are my two conditions.

And since this is going to have two arbitrary constants in it, it is these initial conditions that will satisfy, the arbitrary constants will have to be picked so as to satisfy those initial conditions.

In some sense, the giving of initial conditions for a system is a more natural activity than giving the initial conditions of a second order system.

You don't have to be the least bit cleaver about it.

Anybody would give these two numbers.

Whereas, somebody faced with a second order system might scratch his head. And, in fact, there are other kinds of conditions.

There are boundary conditions you learned a little bit about instead of initial conditions for a second order equation.

I cannot think of any more general terminology, so it sounds like we are going to actually have to get to work.

Okay, let's get to work. I want to set up a system and solve it. And since one of the things in this course is supposed to be simple modeling, it should be a system that models something.

In general, the kinds of models we are going to use when we study systems are the same ones we used in studying just first-order equations. Mixing, radioactive decay, temperature, the motion of temperature.

Heat, heat conduction, in other words.

Diffusion. I have given you a diffusion problem for your first homework on this subject.

What else did we do? That's all I can think of for the moment, but I am sure they will occur to me.

When, out of those physical ideas, are we going to get a system? The answer is, whenever there are two of something that there was only one of before. For example, if I have mixing with two tanks where the fluid goes like that.

Say you want to have a big tank and a little tank here and you want to put some stuff into the little tank so that it will get mixed in the big tank without having to climb a big ladder and stop and drop the stuff in. That will require two tanks, the concentration of the substance in each tank, therefore, that will require a system of equations rather than just one. Or, to give something closer to home, closer to this backboard, anyway, suppose you have dah, dah, dah, don't groan, at least not audibly, something that looks like that. And next to it put an EMF there. That is just a first order.

That just leads to a single first order equation.

But suppose it is a two loop circuit.

Now I need a pair of equations. Each of these loops gives a first order differential equation, but they have to be solved simultaneously to find the current or the charges on the condensers. And if I want a system of three equations, throw in another loop.

Now, suppose I put in a coil instead.

What is this going to lead to? This is going to give me a system of three equations of which this will be first order, first order. And this will be second order because it has a coil. You are up to that, right? You've had coils, inductance? Good.

So the whole thing is going to count as first-order, first-order, second-order.

To find out how complicated it is, you have to add up the orders. That is one and one, and two. This is really fourth-order stuff that we are talking about here.

We can expect it to be a little complicated.

Well, now let's take a modest little problem.

I am going to return to a problem we considered earlier in the problem of heat conduction. I had forgotten whether it was on the problem set or I did it in class, but I am choosing it because it leads to something we will be able to solve.

And because it illustrates how to add a little sophistication to something that was unsophisticated before.

A pot of water. External temperature Te of t.

I am talking about the temperature of something. And what I am talking about the temperature of will be an egg that is cooking inside, but with a difference. This egg is not homogenous inside. Instead it has a white and it has a yolk in the middle. In other words, it is a real egg and not a phony egg.

That is a small pot, or it is an ostrich egg.

[LAUGHTER] That is the yoke. The yolk is contained in a little membrane inside. And there are little yucky things that hold it in position. And we are going to let the temperature of the yolk, if you can see in the back of the room, be T1. That is the temperature of the yolk. The temperature of the white, which we will assume is uniform, is going to be T2.

Oh, that's the water bath. The temperature of the white is T2, and then the temperature of the external water bath.

In other words, the reason for introducing two variables instead of just the one variable for the overall temperature of the egg we had is because egg white is liquid pure protein, more or less, and the T1, the yolk has a lot of fat and cholesterol and other stuff like that which is supposed to be bad for you. It certainly has different conducting. It is liquid, at the beginning at any rate, but it certainly has different constants of conductivity than the egg white would.

And the condition of heat through the shell of the egg would be different from the conduction of heat through the membrane that keeps the yoke together.

So it is quite reasonable to consider that the white and the yolk will be at different temperatures and will have different conductivity properties.

I am going to use Newton's laws but with this further refinement. In other words, introducing two temperatures. Whereas, before we only had one temperature. But let's use Newton's law.

Let's see. The question is how does T1, the temperature of the yolk, vary with time?

Well, the yolk is getting all its heat from the white.

Therefore, Newton's law of conduction will be some constant of conductivity for the yolk times T2 minus T1.

The yolk does not know anything about the external temperature of the water bath. It is completely surrounded, snug and secure within itself. But how about the temperature of the egg white? That gets heat and gives heat to two sources, from the external water and also from the internal yolk inside.

So you have to take into account both of those.

Its conduction of the heat through that membrane, we will use the same a, which is going to be a times T1 minus T2. Remember the order in which you have to write these is governed by the yolk outside to the white. Therefore, that has to come first when I write it in order that a be a positive constant.

But it is also getting heat from the water bath.

And, presumably, the conductivity through the shell is different from what it is through this membrane around the yolk. So I am going to call that by a different constant. This is the conductivity through the shell into the white.

And that is going to be T, the external temperature minus the temperature of the egg white.

Here I have a system of equations because I want to make two dependent variables by refining the original problem.

Now, you always have to write a system in standard form to solve it. You will see that the left-hand side will give the dependent variables in a certain order.

In this case, the temperature of the yolk and then the temperature of the white.

The law is that in order not to make mistakes -- And it's a very frequent source of error so learn from the beginning not to do this. You must write the variables on the right-hand side in the same order left to right in which they occur top to bottom here. In other words, this is not a good way to leave that.

This is the first attempt in writing this system, but the final version should like this.

T1 prime, I won't bother writing dT / dt, is equal to -- T1 must come first, so minus a times T1 plus a times T2.

And the same law for the second one.

It must come in the same order. Now, the coefficient of T1, that is easy. That's a times T1.

The coefficient of T2 is minus a minus b, so minus (a plus b) times T2.

But I am not done yet. There is still this external temperature I must put into the equation.

Now, that is not a variable. This is some given function of t. And what the function of t is, of course, depends upon what the problem is.

So that, for example, what might be some possibilities, well, suppose the problem was I wanted to coddle the egg. I think there is a generation gap here. How many of you know what a coddled egg is? How many of you don't know?

Well, I'm just saying my daughter didn't know.

I mentioned it to her. I said I think I'm going to do a coddled egg tomorrow in class. And she said what is that?

And so I said a cuddled egg? She said why would someone cuddle an egg? I said coddle.

And she said, oh, you mean like a person, like what you do to somebody you like or don't like or I don't know. Whatever.

I thought a while and said, yeah, more like that.

[LAUGHTER] Anyway, for the enrichment of your cooking skills, to coddle an egg, it is considered to produce a better quality product than boiling an egg. That is why people do it.

You heat up the water to boiling, the egg should be at room temperature, and then you carefully lower the egg into the water. And you turn off the heat so the water bath cools exponentially while the egg inside is rising in temperature. And then you wait four minutes or six minutes or whatever and take it out.

You have a perfect egg. So for coddling, spelled so, what will the external temperature be?

Well, it starts out at time zero at 100 degrees centigrade because the water is supposed to be boiling.

The reason you have it boiling is for calibration so that you can know what temperature it is without having to use a thermometer, unless you're on Pike's Peak or some place.

It starts out at 100 degrees. And after that, since the light is off, it cools exponential because that is another law. You only have to know what K is for your particular pot and you will be able to solve the coddled egg problem. In other words, you will then be able to solve these equations and know how the temperature rises. I am going to solve a different problem because I don't want to have to deal with this inhomogeneous term. Let's use, as a different problem, a person cooks an egg. Coddles the egg by the first process, decides the egg is done, let's say hardboiled, and then you are supposed to drop a hardboiled egg into cold water. Not just to cool it but also because I think it prevents that dark thing from forming that looks sort of unattractive. Let's ice bath.

The only reason for dropping the egg into an ice bath is so that you could have a homogenous equation to solve.

And since this a first system we are going to solve, let's make life easy for ourselves.

Now, all my work in preparing this example, and it took considerably longer time than actually solving the problem, was in picking values for a and b which would make everything come out nice. It's harder than it looks.

The values that we are going to use, which make no physical sense whatsoever, but a equals 2 and b equals 3. These are called nice numbers.

What is the equation? What is the system?

Can somebody read it off for me?

It is T1 prime equals, what is it, minus 2T1 plus 2T2.

I think this is 2T1. And the other one is minus a plus b, so minus 5.

This is a system. Now, on Wednesday I will teach you a fancy way of solving this. But, to be honest, the fancy way will take roughly about as long as the way I am going to do it now. The main reason for doing it is that it introduces new vocabulary which everyone wants you to have. And also, more important reasons, it gives more insight into the solution than this method. This method just produces the answer, but you want insight, also.

And that is just as important. But for now, let's use a method which always works and which in 40 years, after you have forgotten all other fancy methods, will still be available to you because it is method you can figure out yourself. You don't have to remember anything. The method is to eliminate one of the dependent variables. It is just the way you solve systems of linear equations in general if you aren't doing something fancy with determinants and matrices.

If you just eliminate variables.

We are going to eliminate one of these variables.

Let's eliminate T2. You could also eliminate T1.

The main thing is eliminate one of them so you will have just one left to work with. How do I eliminate T2?

Beg your pardon? Is something wrong?

If somebody thinks something is wrong raise his hand.

Why do I want to get rid of T1? Well, I can add them.

But, on the left-hand side, I will have T1 prime plus T2 prime. What good is that?

[LAUGHTER] I think you will want to do it my way.

[APPLAUSE] Solve for T2 in terms of T1. That is going to be T1 prime plus 2T1 divided by 2.

Now, take that and substitute it into the second equation.

Wherever you see a T2, put that in, and what you will be left with is something just in T1.

To be honest, I don't know any other good way of doing this. There is a fancy method that I think is talked about in your book, which leads to extraneous solutions and so on, but you don't want to know about that. This will work for a simple linear equation with constant coefficients, always. Substitute in.

What do I do? Now, here I do not advise doing this mentally. It is just too easy to make a mistake. Here, I will do it carefully, writing everything out just as you would.

T1 prime plus 2T1 over 2, prime, equals 2T1 minus 5 time T1 prime plus 2T1 over two.

I took that and substituted into this equation. Now, I don't like those two's.

Let's get rid of them by multiplying.

And now write this out. What is this when you look at it? This is an equation just in T1.

It has constant coefficients. And what is its order?

Its order is two because T1 prime primed.

In other words, I can eliminate T2 okay, but the equation I am going to get is no longer a first-order.

It becomes a second-order differential equation.

And that's a basic law. Even if you have a system of more equations, three or four or whatever, the law is that after you do the elimination successfully and end up with a single equation, normally the order of that equation will be the sum of the orders of the things you started with. So two first-order equations will always produce a second-order equation in just one dependent variable, three will produce a third order equation and so on. So you trade one complexity for another. You trade the complexity of having to deal with two equations simultaneously instead of just one for the complexity of having to deal with a single higher order equation which is more trouble to solve.

It is like all mathematical problems.

Unless you are very lucky, if you push them down one way, they are really simple now, they just pop up some place else. You say, oh, I didn't save anything after all.

That is the law of conservation of mathematical difficulty.

[LAUGHTER] You saw that even with the Laplace transform.

In the beginning it looks great, you've got these tables, take the equation, horrible to solve.

Take some transform, trivial to solve for capital Y.

Now I have to find the inverse Laplace transform.

And suddenly all the work is there, partial fractions, funny formulas and so on. It is very hard in mathematics to get away with something. It happens now and then and everybody cheers. Let's write this out now in the form in which it looks like an equation we can actually solve.

Just be careful. Now it is all right to use the method by which you collect terms.

There is only one term involving T1 double prime.

It's the one that comes from here.

How about the terms in T1 prime?

There is a 2. Here, there is minus 5 T1 prime. If I put it on the other side it makes plus 5 T1 prime plus this two makes 7 T1 prime.

And how many T1's are there? Well, none on the left-hand side. On the right-hand side I have 4 here minus 10. 4 minus 10 is negative 6.

Negative 6 T1 put on this left-hand side the way we want to do makes plus 6 T1.

There are no inhomogeneous terms, so that is equal to zero.

If I had gotten a negative number for one of these coefficients, I would instantly know if I had made a mistake. Why?

Why must those numbers come out to be positive?

It is because the system must be, the system must be, fill in with one word, stable.

And why must this system be stable?

In other words, the long-term solutions must be zero, must all go to zero, whatever they are.

Why is that? Well, because you are putting the egg into an ice bath. Or, because we know it was living but after being hardboiled it is dead and, therefore, dead systems are stable.

That's not a good reason but it is, so to speak, the real one. It's clear anyway that all solutions must tend to zero physically.

That's obvious. And, therefore, the differential equation must have the same property, and that means that its coefficients must be positive.

All its coefficients must be positive.

If this weren't there, I would get oscillating solutions, which wouldn't go to zero.

That is physical impossible for this egg.

Now the rest is just solving. The characteristic equation, if you can remember way, way back in prehistoric times when we were solving these equations, is this.

And what you want to do is factor it.

This is where all the work was, getting those numbers so that this would factor. So it's r plus 1 times r plus 6 And so the solutions are, the roots are r equals negative 1. I am just making marks on the board, but you have done this often enough, you know what I am talking about.

So the characteristic roots are those two numbers.

And, therefore, the solution is, I could write down immediately with its arbitrary constant as c1 times e to the negative t plus c2 times e to the negative 6t. Now, I have got to get T2.

Here the first worry is T2 is going to give me two more arbitrary constants. It better not.

The system is only allowed to have two arbitrary constants in its solution because that is the initial conditions we are giving it. By the way, I forgot to give initial conditions. Let's give initial conditions.

Let's say the initial temperature of the yolk, when it is put in the ice bath, is 40 degrees centigrade, Celsius. And T2, let's say the white ought to be a little hotter than the yolk is always cooler than the white for a soft boiled egg, I don't know, or a hardboiled egg if it hasn't been chilled too long.

Let's make this 45. Realistic numbers.

Now, the thing not to do is to say, hey, I found T1.

Okay, I will find T2 by the same procedure.

I will go through the whole thing.

I will eliminate T1 instead. Then I will end up with an equation T2 and I will solve that and get T2 equals blah, blah, blah. That is no good, A, because you are working too hard and, B, because you are going to get two more arbitrary constants unrelated to these two. And that is no good.

Because the correct solution only has two constants in it.

Not four. So that procedure is wrong.

You must calculate T2 from the T1 that you found, and that is the equation which does it.

That's the one we have to have. Where is the chalk?

Yes. Maybe I can have a little thing so I can just carry this around with me.

That is the relation between T2 and T1.

Or, if you don't like it, either one of these equations will express T2 in terms of T1 for you.

It doesn't matter. Whichever one you use, however you do it, that's the way you must calculate T2. So what is it?

T2 is calculated from that pink box.

It is one-half of T1 prime plus T1.

Now, if I take the derivative of this, I get minus c1 times the exponential. The coefficient is minus c1, take half of that, that is minus a half c1 and add it to T1. Minus one-half c1 plus c1 gives me one-half c1.

And here I take the derivative, it is minus 6 c2.

Take half of that, minus 3 c2 and add this c2 to it, minus 3 plus 1 makes minus 2.

That is T2. And notice it uses the same arbitrary constants that T1 uses.

So we end up with just two because we calculated T2 from that formula or from the equation which is equivalent to it, not from scratch. We haven't put in the initial conditions yet, but that is easy to do.

Everybody, when working with exponentials, of course, you always want the initial conditions to be when T is equal to zero because that makes all the exponentials one and you don't have to worry about them.

But this you know. If I put in the initial conditions, at time zero, T1 has the value 40.

So 40 should be equal to c1 + c2.

And the other equation will say that 45 is equal to one-half c1 minus 2 c2. Now we are supposed to solve these. Well, this is called solving simultaneous linear equations. We could use Kramer's rule, inverse matrices, but why don't we just eliminate. Let me see.

If I multiply by, 45, so multiply by two, you get 90 equals c1 minus 4 c2.

Then subtract this guy from that guy.

So, 40 taken from 90 makes 50. And c1 taken from c1, because I multiplied by two, makes zero.

And c2 taken from minus 4 c2, that makes minus 5 c2, I guess.

I seem to get c2 is equal to negative 10.

And if c2 is negative 10, then c1 must be 50.

There are two ways of checking the answer.

One is to plug it into the equations, and the other is to peak. Yes, that's right.

[LAUGHTER] The final answer is, in other words, you put a 50 here, 25 there, negative 10 here, and positive 20 there. That gives the answer to the problem. It tells you, in other words, how the temperature of the yolk varies with time and how the temperature of the white varies with time. As I said, we are going to learn a slick way of doing this problem, or at least a very different way of doing the same problem next time, but let's put that on ice for the moment.

And instead I would like to spend the rest of the period doing for first order systems the same thing that I did for you the very first day of the term.

Remember, I walked in assuming that you knew how to separate variables the first day of the term, and I did not talk to you about how to solve fancier equations by fancier methods.

I instead talked to you about the geometric significance, what the geometric meaning of a single first order equation was and how that geometric meaning enabled you to solve it numerically. And we spent a little while working on such problems because nowadays with computers it is really important that you get a feeling for what these things mean as opposed to just algorithms for solving them.

As I say, most differential equations, especially systems, are likely to be solved by a computer anyway.

You have to be the guiding genius that interprets the answers and can see when mistakes are being made, stuff like that. The problem is, therefore, what is the meaning of this system?

Well, you are not going to get anywhere interpreting it geometrically, unless you get rid of that t on the right-hand side. And the only way of getting rid of the t is to declare it is not there.

So I hereby declare that I will only consider, for the rest of the period, that is only ten minutes, systems in which no t appears explicitly on the right-hand side. Because I don't know what to do if it does up here. We have a word for these.

Remember what the first order word was?

A first order equation where there was no t explicitly on the right-hand side, we called it, anybody remember? Just curious.

This is an autonomous system. It is not a linear system because these are messy functions.

This could be x times y or x squared minus 3y squared divided by sine of x plus y.

It could be a mess. Definitely not linear.

But autonomous means no t. t means the independent variable appears on the right-hand side.

Of course, it is there. It is buried in the dx/dt and dy/dt. But it is not on the right-hand side. No t appears on the right-hand side.

Because no t appears on the right-hand side, I can now draw a picture of this.

But, let's see, what does a solution look like?

What is the solution? Well, the solution, maybe you took it for granted, is a pair of functions, x of t, y of t if when you plug it in it satisfies the equation. And so what else is new?

The solution is x equals x of t, y equals y of t.

If I draw a picture of that what would it look like?

This is where your previous knowledge of physics above all 18.02, maybe 18.01 if you learned this in high school, what is x equals x of t and y equals y of t?

How do you draw a picture of that? What does it represent?

A curve. And what will be the title of the chapter of the calculus book in which that is discussed?

Parametric equations. This is a parameterized curve.

So we know what the solution looks like.

Our solution is a parameterized curve.

And what does a parameterized curve look like?

Well, it travels, and in a certain direction.

Why do I have several of those curves?

Well, because I have several solutions.

In fact, given any initial starting point, there is a solution that goes through it.

I will put in possible starting points.

And you can do this on the computer screen with a little program you will have, one of the visuals you'll have.

It's being made right now. You put down starter point, put down a click, and then it just draws the curve passing through that point.

Didn't we do this early in the term?

Yes. But there is a difference now which I will explain. These are various possible starting points at time zero for this solution, and then you see what happens to it afterwards.

In fact, through every point in the plane will pass a solution curve, parameterized curve. Now, what is then the representation of this? Well, what is the meaning of x prime of t and y prime of t?

I am not going to worry for the moment about the right-hand side. What does this mean by itself?

If this is the curve, the parameterized motion, then this represents its velocity vector.

It is the velocity of the solution at time t.

If I think of the solution as being a parameterized motion.

All I have drawn here is the trace, the path of the motion.

This hasn't indicated how fast it was going.

One solution might go whoosh and another one might go rah.

That is a velocity, and that velocity changes from point to point. It changes direction.

Well, we know its direction at each point.

That's tangent. What I cannot tell is the speed. From this picture, I cannot tell what the speed was.

Too bad. Now, what is then the meaning of the system? What the system does, it prescribes at each point the velocity vector.

If you tell me what the point (x, y) is in the plane then these equations give you the velocity vector at that point.

And, therefore, what I end up with, the system is what you call in physics and what you call in 18.02 a velocity field. So at each point there is a certain vector. The vector is always tangent to the solution curve through there, but I cannot predict from just this picture what its length will be because at some points, it might be going slow. The solution might be going slowly. In other words, the plane is filled up with these guys.

So on and so on. We can say a system of first order equations, ODEs of first order equations, autonomous because there must be no t on the right-hand side, is equal to a velocity field. A field of velocity.

The plane covered with velocity vectors.

And a solution is a parameterized curve with the right velocity everywhere.

Now, there obviously must be a connection between that and the direction fields we studied at the beginning of the term.

And there is. It is a very important connection. It is too important to talk about in minus one minute. When we need it, I will have to spend some time talking about it then.

## 10: Linear Systems of Differential Equations - Mathematics

The first definition that we should cover should be that of differential equation. A differential equation is any equation which contains derivatives, either ordinary derivatives or partial derivatives.

There is one differential equation that everybody probably knows, that is Newton’s Second Law of Motion. If an object of mass (m) is moving with acceleration (a) and being acted on with force (F) then Newton’s Second Law tells us.

To see that this is in fact a differential equation we need to rewrite it a little. First, remember that we can rewrite the acceleration, (a), in one of two ways.

Where (v) is the velocity of the object and (u) is the position function of the object at any time (t). We should also remember at this point that the force, (F) may also be a function of time, velocity, and/or position.

So, with all these things in mind Newton’s Second Law can now be written as a differential equation in terms of either the velocity, (v), or the position, (u), of the object as follows.

So, here is our first differential equation. We will see both forms of this in later chapters.

Here are a few more examples of differential equations.

#### Order

The order of a differential equation is the largest derivative present in the differential equation. In the differential equations listed above (eqref) is a first order differential equation, (eqref), (eqref), (eqref), (eqref), and (eqref) are second order differential equations, (eqref) is a third order differential equation and (eqref) is a fourth order differential equation.

Note that the order does not depend on whether or not you’ve got ordinary or partial derivatives in the differential equation.

We will be looking almost exclusively at first and second order differential equations in these notes. As you will see most of the solution techniques for second order differential equations can be easily (and naturally) extended to higher order differential equations and we’ll discuss that idea later on.

#### Ordinary and Partial Differential Equations

A differential equation is called an ordinary differential equation, abbreviated by ode, if it has ordinary derivatives in it. Likewise, a differential equation is called a partial differential equation, abbreviated by pde, if it has partial derivatives in it. In the differential equations above (eqref) - (eqref) are ode’s and (eqref) - (eqref) are pde’s.

The vast majority of these notes will deal with ode’s. The only exception to this will be the last chapter in which we’ll take a brief look at a common and basic solution technique for solving pde’s.

#### Linear Differential Equations

A linear differential equation is any differential equation that can be written in the following form.

[egin left( t ight)>left( t ight) + <>>left( t ight) ight)>>left( t ight) + cdots + left( t ight)y'left( t ight) + left( t ight)yleft( t ight) = gleft( t ight) labelend]

The important thing to note about linear differential equations is that there are no products of the function, (yleft( t ight)), and its derivatives and neither the function or its derivatives occur to any power other than the first power. Also note that neither the function or its derivatives are “inside” another function, for example, (sqrt ) or (<<f>^y>).

The coefficients (left( t ight),,, ldots ,,,left( t ight)) and (gleft( t ight)) can be zero or non-zero functions, constant or non-constant functions, linear or non-linear functions. Only the function,(yleft( t ight)), and its derivatives are used in determining if a differential equation is linear.

If a differential equation cannot be written in the form, (eqref) then it is called a non-linear differential equation.

In (eqref) - (eqref) above only (eqref) is non-linear, the other two are linear differential equations. We can’t classify (eqref) and (eqref) since we do not know what form the function (F) has. These could be either linear or non-linear depending on (F).

#### Solution

A solution to a differential equation on an interval (alpha < t < eta ) is any function (yleft( t ight)) which satisfies the differential equation in question on the interval (alpha < t < eta ). It is important to note that solutions are often accompanied by intervals and these intervals can impart some important information about the solution. Consider the following example.

We’ll need the first and second derivative to do this.

Plug these as well as the function into the differential equation.

So, (yleft( x ight) = <2>>>) does satisfy the differential equation and hence is a solution. Why then did we include the condition that (x > 0)? We did not use this condition anywhere in the work showing that the function would satisfy the differential equation.

In this form it is clear that we’ll need to avoid (x = 0) at the least as this would give division by zero.

Also, there is a general rule of thumb that we’re going to run with in this class. This rule of thumb is : Start with real numbers, end with real numbers. In other words, if our differential equation only contains real numbers then we don’t want solutions that give complex numbers. So, in order to avoid complex numbers we will also need to avoid negative values of (x).

So, we saw in the last example that even though a function may symbolically satisfy a differential equation, because of certain restrictions brought about by the solution we cannot use all values of the independent variable and hence, must make a restriction on the independent variable. This will be the case with many solutions to differential equations.

In the last example, note that there are in fact many more possible solutions to the differential equation given. For instance, all of the following are also solutions

We’ll leave the details to you to check that these are in fact solutions. Given these examples can you come up with any other solutions to the differential equation? There are in fact an infinite number of solutions to this differential equation.

So, given that there are an infinite number of solutions to the differential equation in the last example (provided you believe us when we say that anyway….) we can ask a natural question. Which is the solution that we want or does it matter which solution we use? This question leads us to the next definition in this section.

#### Initial Condition(s)

Initial Condition(s) are a condition, or set of conditions, on the solution that will allow us to determine which solution that we are after. Initial conditions (often abbreviated i.c.’s when we’re feeling lazy…) are of the form,

So, in other words, initial conditions are values of the solution and/or its derivative(s) at specific points. As we will see eventually, solutions to “nice enough” differential equations are unique and hence only one solution will meet the given initial conditions.

The number of initial conditions that are required for a given differential equation will depend upon the order of the differential equation as we will see.

As we saw in previous example the function is a solution and we can then note that

and so this solution also meets the initial conditions of (yleft( 4 ight) = frac<1><8>) and (y'left( 4 ight) = - frac<3><<64>>). In fact, (yleft( x ight) = <2>>>) is the only solution to this differential equation that satisfies these two initial conditions.

#### Initial Value Problem

An Initial Value Problem (or IVP) is a differential equation along with an appropriate number of initial conditions.

As we noted earlier the number of initial conditions required will depend on the order of the differential equation.

#### Interval of Validity

The interval of validity for an IVP with initial condition(s)

is the largest possible interval on which the solution is valid and contains (). These are easy to define, but can be difficult to find, so we’re going to put off saying anything more about these until we get into actually solving differential equations and need the interval of validity.

#### General Solution

The general solution to a differential equation is the most general form that the solution can take and doesn’t take any initial conditions into account.

We’ll leave it to you to check that this function is in fact a solution to the given differential equation. In fact, all solutions to this differential equation will be in this form. This is one of the first differential equations that you will learn how to solve and you will be able to verify this shortly for yourself.

#### Actual Solution

The actual solution to a differential equation is the specific solution that not only satisfies the differential equation, but also satisfies the given initial condition(s).

This is actually easier to do than it might at first appear. From the previous example we already know (well that is provided you believe our solution to this example…) that all solutions to the differential equation are of the form.

All that we need to do is determine the value of (c) that will give us the solution that we’re after. To find this all we need do is use our initial condition as follows.

[ - 4 = yleft( 1 ight) = frac<3> <4>+ frac<<<1^2>>>hspace <0.25in>Rightarrow hspace<0.25in>c = - 4 - frac<3> <4>= - frac<<19>><4>]

So, the actual solution to the IVP is.

From this last example we can see that once we have the general solution to a differential equation finding the actual solution is nothing more than applying the initial condition(s) and solving for the constant(s) that are in the general solution.

#### Implicit/Explicit Solution

In this case it’s easier to define an explicit solution, then tell you what an implicit solution isn’t, and then give you an example to show you the difference. So, that’s what we’ll do.

An explicit solution is any solution that is given in the form (y = yleft( t ight)). In other words, the only place that (y) actually shows up is once on the left side and only raised to the first power. An implicit solution is any solution that isn’t in explicit form. Note that it is possible to have either general implicit/explicit solutions and actual implicit/explicit solutions.

At this point we will ask that you trust us that this is in fact a solution to the differential equation. You will learn how to get this solution in a later section. The point of this example is that since there is a () on the left side instead of a single (yleft( t ight))this is not an explicit solution!

We already know from the previous example that an implicit solution to this IVP is ( = - 3). To find the explicit solution all we need to do is solve for (yleft( t ight)).

[yleft( t ight) = pm sqrt <- 3> ]

Now, we’ve got a problem here. There are two functions here and we only want one and in fact only one will be correct! We can determine the correct function by reapplying the initial condition. Only one of them will satisfy the initial condition.

In this case we can see that the “-“ solution will be the correct one. The actual explicit solution is then

In this case we were able to find an explicit solution to the differential equation. It should be noted however that it will not always be possible to find an explicit solution.

Also, note that in this case we were only able to get the explicit actual solution because we had the initial condition to help us determine which of the two functions would be the correct solution.

We’ve now gotten most of the basic definitions out of the way and so we can move onto other topics.