Welcome to Calculus. I'm professor Ghrist and we're about to begin Lecture 20 on O.D.E, Linearization. Differential equations open up an entire world of applications of Calculus. However, there are limits as to how far integration will get you. >> In this lesson, we'll explore those limits of integration, and see what to do when integration doesn't work. Along the way we'll learn how to linearize a differential equation. >> We have seen in the past how to use Calculus to linearize functions, but there are many other things that can be linearized. Today's lesson will consider linearization, differential equations. We're going to do so, through examining a simple model for a simple oscillator. By which I mean something that goes around and around, and is periodic in it's behavior. We're going to consider theta an angular variable, as a function of time. And we want the simplest possible Model. That is, theta simply evolves linearly over time from 0 to 2 pi, and then back to the beginning. What kind of differential equation would model that? Well, I think you can figure that out one. D theta dt equals a, a constant. This has solution by integrating theta is AT plus the constant of integration, the initial condition, theta naught. But notice that because we're interpreting this as an angle, everything is modulo 2 pi. When you get to 2 pi you are reset to 0. What happens if instead of a single oscillator we have a pair of simple oscillators? The first one, let's say, has an angle theta 1 of t. The second has an angle theta 2 of t. The differential equations would be simply d theta one dt equals a and d theta two dt equals a. Or we assume that both oscillators have the same natural frequency a that determines how fast they spin. What happens however if we have these oscillators coupled, if they exert a mutual influence, one on the other. That is if theta 2 is a little bit ahead of theta 1, we want to add something to d theta 1 dt and subtract something from d theta 2 dt. Speed one up, slow the other down. This is going to be a small amount, a small coupling. And it's going to have to depend on the values of data two and data one. The model that we'll use is adding or subtracting. A small number epsilon times the sin of theta 2 minus theta 1. We use that expression to keep things angular. This quantity, theta 2 minus theta 1, has a name. It is called the Phase of this pair of oscillators. It's the difference in angles. What we're going to do is consider how the phase evolves. How does it change? Well, to determine its rate of change, we compute the derivative, dphi dt, from the definition, that is, simply, the derivative of theta 2 minus theta 1. Now, we know what d theta 1 dt and d theta 2 dt are from our model. It is a minus epsilon Sin phi, minus quantity a plus epsilon Sin phi, or notice we've substituted in phi at the appropriate place in our model. There's some obvious cancellation that goes on and we're left with negative 2 epsilon sin phi. Notice this is a differential equation that we can solve. Dphi dt is negative 2 epsilon sin phi. So, let's try to solve it and see what happens. If we use separation, we get dphi over sin phi equals negative 2 epsilon dt. And now we integrate both sides. What do we get? Well, on the right hand side, we get, clearly, negative 2 epsilon t plus a constant. On the left hand side, well, we need to integrate the cosecant. Well, integration can be difficult. This is one of the problems in differential equations. I don't remember the integral of cosecant. But let's say that I look that up and I get that the integral of cosecant is minus log absolute value cosecant plus cotangent. Even when I have that, that does not help me, hardly at all. I can write down that solution and exponentiate to get cosecant phi plus cotangent phi is a constant times e to the 2 epsilon of t. But what I want is to know phi of t, what the phase is doing as a function of time. And I cannot solve that equation for phi. What do we do when we can do the Calculus, but can't interpret the result? We're going to simplify through linearization, not linearizing a solution, but linearizing the equation itself. If we consider dphi, dt equals negative 2 epsilon, sign phi, and we expand that sign phi about phi equals 0. We can drop thehigher order terms and keep only the linear term. Giving the linearized differential equation, dphi dt equals negative 2 epsilon phi. Now you know and I know the solution to such an equation depends on the constant, in front. Therefore we obtain the linearized solution given by the initial condition, phi naught, times e to the negative two epsilon t. This is only an approximate solution to the original differential equation, but this approximation gives us a hint. It predicts that there is an exponential decay in the phase. That is, if you have two oscillators with this coupling between them, then their angle difference. Their phase, should be decreasing exponentially to zero, this is called synchronization. It says or predicts that these two oscillators will become in sync. Now the wonderful thing about this is that you can observe this phenomenon in simple, physical systems involving oscillatory agents. With a small amount of coupling between them. And you can see that they do synchronize. Once the synchronization occurs, it is fixed, and it never changes. This is an example of something called an equilibrium solution. More generally, an equilibrium of the differential equation x dot equals f of x is a solution of the form x of t is a constant. Now otherwise said, the x dt or x dot equals zero. Now since x dot equals f of x, one could also define an equilibrium as a root of f the right hand side, the differential equation. Now if you look at solutions to x dot equals f of x and plot them as a function of time, t. You will occasionally find some initial condition for which you have a constant solution, these are equilibria of the system. If you start there, you stay there. Now these equilibria come in two forms in general these are the stable equilibria and the unstable equilibria. A stable equilibrium has the property that if you have an initial condition that is nearby and you evolve it over time. You get closer and closer to the stable equilibrium. This is what we saw with the coupled oscillator with phi equals zero. On the other hand there are unstable equilibria for which if you start at a nearby initial condition you do not converge to the equilibrium solution over time. Rather you diverge, and move away. Now, one way to determine stability of an equilibrium is to plot not x versus t, but x dot versus x. Remember, x dot equals f of x in this model. And so, by plotting f, one can see the equilibria clearly. The roots of f, that is, where it crosses the horizontal axis, are precisely the equilibria. And looking at the graph tells you whether x dot is positive, that is x is increasing or x dot is negative. That is x is decreasing and so one can see the stable equilibria as things like syncs where nearby values of x tends toward the equilibria. The unstable equilibria looks like sources, starting nearby pushes you further and further away, in the context of the system that we looked at, the phase equation. Phi dot equals negative two epsilon sin phi, what did we see? If we plot plhi dot versus phi, then we get a sin wav with a negative coefficient out in front of it. Notice that this has a root at phi equals 0. And when phi, is, less than zero, then phi dot is positive, and you're increasing, phi, as a function of time. To the right of zero, phi dot is negative, which means, that phi is decreasing as a function of time, and this tells us that zero is a stable equilibrium for this system. That means if you have no angle difference between the two isolators, it will remain that way. If you have a small angle difference. Well, it will disappear. And as we saw from linearization, that will happen exponentially fast. Notice, however, that this system also has another root. Another equilibrium at phi equals pi. Which is the same as negative pi, and this is unstable. Physically, this corresponds to an anti synchronization, where the two oscillators are perfectly out of phase. Where their angles, differ, by a value of pi. And then we've seen how linearization was useful in predicting a stable equilibrium for our phase equation. How does linearization work, in the general case, where x dot equals f of x? Well, let's make an assumption that x has an equilibrium at a. Then, what happens if we Taylor expand the equation about this equilibrium? X dot equals f of x, but that is, as you know, f of a, times f prime at a, times x minus a, plus some terms in big O of x minus a squared. Now, because a is in equilibrium, that means x dot equals 0 there, x dot is f of x, so f at a vanishes. That means, we have x is f prime of a times x minus a plus higher ordered terms. To linearize, we drop the higher ordered terms and look at the coefficient in front of the linear term. This coefficient is f prime at a. The derivative of f at the equilibrium. Now what does this mean? This means that if the derivative is positive at a, then what? Well to the left, x dot is negative and is decreasing. On the right, x dot is positive and x is increasing. That means we have an unstable equilibrium, if the derivative is positive. On the other hand, if the derivative is negative. If f prime at a is less than 0. Then to the left x dot is positive, and x is increasing to the right. X dot is negative, and x is decreasing, and we have a stable equilibrium. This follows the exact pattern that we saw for our simple linear ODE. The sign of the constant out in front tells you whether you have exponential growth or exponential decay. Whether you're unstable, or whether you're stable. This technique of linearizing a differential equation, about an equilibrium, is a very powerful method. But is really just the beginning of the wonderful subject of dynamical system. A qualitative approach to differential equations that works when in exact Calculus based solution doesn't. If you find this subject interesting you may want to take a course on dynamical systems, sometime after you've learned a bit more Calculus. Coupled iscillators provide a great example of the use of linearization in differential equations and dynamics. Head on over to the bonus material for this lecture. And we'll see if we can't get a couple of oscillators to synchronize.