Video length is 21:14

Differential Equations and Linear Algebra, 1.7c: The Stability and Instability of Steady States

From the series: Differential Equations and Linear Algebra

Gilbert Strang, Massachusetts Institute of Technology (MIT)

Steady state solutions can be stable or unstable – a simple test decides.

Published: 27 Jan 2016

This is a topic I think is interesting. I like this one. It's about stability or instability of a steady state. So let me show you the differential equation. It could be linear, but might be non linear. dy dt is f of y. I'm going to-- I keep it that right hand side not depending on t, so just a function of y. And when do I have a steady state? There's a steady state when the derivative is 0. So if the derivative is 0 when f of y equals 0, let me call those special y's by a capital letter. So capital Y is a number, a starting value, where the right hand side of the equation is 0. And if the right hand side of the equation is 0, the left side of the equation is 0, and dy dt is 0, and we don't go anywhere.

So the solution-- if f or y is equal to 0, then we have y stays at y. It's a constant for all time, and my question is, if we start near capital Y, do we approach capital Y as time goes on? It's, in that case, I would say, stable-- or does the solution when we start near y go far away from Y? From capital Y? Leave the steady state? In that case, I would call the steady state unstable. So stable or unstable, and it's very important to know which it is. And let me just do some examples, and you'll see the whole point.

So here is first starting with a linear equation. So what is capital Y in this case? Well, this is f of y here. So if I set that to 0, the steady state is capital Y-- capital-- equals 0 in this case. That is 0. So if I start at 0, I stay at 0. Here is a second example, the logistic equation, where I've taken the coefficients to be 1. What are the steady states for the logistic equation? Again, I set the right hand side to 0. I find two possible steady states-- capital Y equals 0 or 1. That right hand side is 0 for both of those, so in both cases, those are both constant solutions, steady states. If the solution starts at 0, it stays there because the derivative is 0. Has no reason to move.

And finally, now I let y minus y cubed equals 0. I solve y equals y cubed, and I find three solutions, three steady states. Y could be 0 again. It could be 1 again, or it could be minus 1. y equals y cubed. Then y can be any of those three groups, and of course, these are examples. The actual problem could have sines, and cosines, and exponentials, but these are three clear cases, and of course, the linear case is always the good guide.

So in the linear case, when does a solution stay near 0? If I start small, when do I go to 0, and when do I leave? So I'm ready for the answer here. So, stable or not. In this example, y equals 0. That's stable if-- well, do you see what's coming? The solution is e to the at if I start-- or constant times e to the at. When does that go to 0? When does it approach the steady state? I need a to be negative. That's going to be the key to everything. That number a should be negative.

Now, over here, we don't have an a. The key point will be to see what is that that should be negative in these examples. And can I tell you the answer? So the thing to look at, negative or positive, stable or unstable, is the derivative. Look at the derivative of that right hand side at y equals y at the steady state. And if the derivative df dy is negative, then stable. That was correct in this linear case. The derivative of ay was just a, we know that we get stable when a is negative because the solution has an e to the at. a is negative. We go to 0.

What about examples two and three? So with those two examples you'll see the whole idea. So look at the second example, y minus y squared. f is y minus y squared. We look at its derivative. Its derivative is 1 minus 2y. The derivative of-- so I'm looking at 1 minus 2y. That's df dy. So what's the story on that? If y is 0, then that derivative is 1 plus 1 unstable. So y equals 0 is now unstable, and the other possibility, y equals 1, I think, will be stable, because when y is 1, 1 minus 2y-- that derivative that we check-- 1 minus 2y comes out minus 1 now-- negative-- and that's the test for stability. So capital Y equals 1-- you remember how those S curves went up and approached the horizontal line, the steady state capital Y equals 1? So OK with two different steady states there-- one unstable and one stable. And now here we have three steady states, and in other examples, we could have many, or they might be hard to find, but here we can see exactly what's happening.

Now, I look at the derivative df dy. It's the derivative of y minus y cubed. So that's 1 minus 3y squared. So again, y equals 0 is bad news. y equals 0 I get 1-- positive number, unstable. So y equals 0, unstable. Whereas y equals 1 or minus 1-- those are the other two steady states-- then 1 minus 3y squared. y squared will be 1 in those cases. So I have 1 minus 3 minus 2. -- it's negative. So those are stable.

Do you see how easy the test is? Compute the derivative df dy at the steady state, and just see is it stable or is it not stable, and that gives the-- see whether is it negative or is it positive. That decides stable or unstable. Now, I just want to show why briefly and then show you an example by throwing the book, and this would be an example in three dimensions that we will get to when we're doing a system of equations. So for something flying in three dimensions, we'll need three differential equations, and all this discussion, which is coming to the end of first order-- one first order equation. So this stability is one of the nice topics.

Now, what's the reasoning behind it? Behind this test? Here's our test. If df dy is 0, that's our test, and why is that our test? Can I explain it here? I want to look at the difference between y and the steady state. And my question is, if that goes to 0, I have something stable. If that blows up, if y goes further away from this steady state, it's unstable. So dy dt is f of y. d capital Y dt-- well, that's actually 0. Capital Y is that constant steady state, and at the same time, f of Y is 0. So I've just put a 0 on the left side and a 0 on the right side, remembering that capital Y solves the equation with no movement at all. It's just steady.

Now I have f of y minus f at capital Y. I'm going to use calculus. The difference between the function at a point and the function at a nearby point is approximately-- and the mean value theorem tells me that it really is-- is approximately the derivative df dy times y minus 1. That's the whole point of calculus actually-- to be able to estimate the difference between f at two points. This is delta f, if you like, and this is delta Y. And delta f divided by delta Y is approximately df dy, and approximately means more and more approximately, closer and closer, as these points-- as little y and capital Y come close.

So in other words, what I have is approximately the linear equation-- the linear equation where the test is this is my a. Here is the a. Well, it's only approximate because this isn't a truly linear equation. We are allowing more terms, but calculus says it's better and better when you're close, and so our question is, do we get closer or do we not get close? And the answer is that when that a is negative, then it's just like the linear equation. The exponential of at goes to 0. y minus capital Y goes to 0-- stable-- when this thing is positive or maybe even 0. 0 is kind of a marginal case. I don't know whether I shoot off or go to 0, so I'm only going to say if that is negative, it's stable, and if it's positive, then my e to the at blows up. And that e to the at is y minus capital Y. It gets bigger and bigger-- unstable. So that's the reasoning behind the beautiful, simple, easy to apply test, which is, if the derivative is negative, then stable.

That's good, and now I'm ready to show you the example of a tumbling box. That is, I'm more or less ready. I'm going to take a copy of the book, and I'm going to throw it in the air. Well, I have put on a rubber band to hold it together, because the book is rather precious to be throwing around. And let me say here I learned about this experiment from Professor Alar Toomre and just today I've asked him would he like to do the experiment on a video? If yes, then he will do it properly. If no, I will do more with it when we get to three equations, because we're in three dimensions, but let me just show you the point.

So the point is I'm going to throw this book up. Does it wobble all over the place-- unstable-- or does it turn nicely on its axis? I'm going to throw it up on the narrow axis here, the thin axis, half an inch or so. To me, that's stable. I'm not as good as Professor Toomre at catching it, but with a rubber band on it I caught. Now, that's one axis, but I'm in 3D. Here's another way to throw it-- is this way. Now, you can try this on somebody else's book.

I'm going to throw it now this way. I'm going to start it this way, and the question is, does it turn steadily this way or not? No. Absolutely not. It went all over the place. Shall I do that one again? You see how it tumbles? Not so easy to catch. So that is unstable, and then there is a third direction. Let's see. I've done the very narrow one, the middle one. Probably the third direction is this one, and if I do it-- I'm going to leave well enough alone-- it will come out stable. So two directions-- stable, one unstable-- for a tumbling box, and the website and the book have lots more details, and we'll do more.

One more thing I want to add to this board for these three examples-- can I do that? One more thing. I want a picture that shows-- so here's a line off to plus infinity, and this way to minus infinity. And if I took this example, 0 in example one, say, for dy dt equals minus y a negative is stable. It is stable. So the solutions here are approaching 0. This is approaching-- so my first example is dy dt equals minus y. I draw a line of y's. There's y equals 0, and the solution, wherever it starts, approaches 0.

Now I'm ready to do the logistic equation. dy dt equals y minus y squared. Now I have y equals 0 is unstable now. y equals 0 is now unstable. y doesn't approach 0 anymore. It goes away from 0. And what does it go to? The other steady state, if you remember, was y equals 1. 1 minus 1 is 0. The derivative is 0. That's a steady state. Let me put it in here-- 1-- and that was a stable steady state. So that arrow is correct, and it goes to 1, and it's also going to 1 from above. So there is the stability line. Let me call this the stability line of y's that shows in the simplest possible picture what direction what direction the solution moves, which is the same as showing me the sine of dy dt. The sine of dy dt is positive, and this y minus y squared is positive for y between 0 and 1. Between 0 and 1, 1/2 would be a 1/2 minus 1/4 positive. So it increases, but it approaches 1.

And now finally can I add in-- can I create the stability line for y minus y cubed? This is still correct. y equals 1 is still a stable point. 0 is an unstable point, but now I have 0, 1, or that other possibility, minus 1. So let me put that into the picture-- minus 1. That is a stable one. So for the y minus y cubed example, I'm stable, unstable-- you see the arrow is going away and going into 1 and minus 1, and then they go in from both sides. Isn't that a simple picture to put together what we discovered from the derivatives of this thing, the 1 minus 3y squared at those three points? At this point, the derivative was negative. We go to it. At this point, the derivative, one minus 3y squared, was positive. We leave it. At this point, this is another stable one. The derivative df dy is negative there, and the solution approaches y equals 1. We didn't have any formula for the solution. That's the nice thing. We're getting this essential information by just taking the derivative of that simple function and looking to see is it negative or positive and getting that picture without a formula. So tumbling book, stability, and instability, and more to do in higher dimensions. Thank you.