 Welcome back again. So, in the previous lecture, we were discussing Lyapunov function and then Lyapunov theorems on stability and instability. As we have seen, the key idea there is to choose a positive definite function which has a required property for stability or instability as the case may be. So, it is very much dependent on the given system. So, one can easily construct positive definite functions, but that is not enough. So, we have to construct that positive definite function in order to have a stability or instability result and that involves the given system of differential equations. And now, we will discuss briefly how to construct some standard positive definite functions. So, this is and again linear algebra will help us and it is the quadratic functions which are studied in linear algebra in great detail and there are very nice results which give necessary and sufficient conditions for a quadratic form to be positive definite. So, let me just briefly discuss that. What is a quadratic form? So, in n variables, so a quadratic form, so let me again use the same letter v. So, this v x 1 x n a i j x i x j. So, i j equal to 1 to n. So, I will not be writing this summation all the time. So, I just use the summation. So, here a i j are real. Certainly v at 0, all the x i's are 0. Certainly that is 0, but this also could be 0 at some other x i's which you do not want. So, you want this v to be positive definite and then what are the conditions on a i j to ensure that thing. And note that the quadratic form is not changed if I write a i j or a j i and so this also becomes a i j plus a j i x i x j. So, the idea of writing this thing, so we may assume. So, this is the A assumption without changing assume a i j is a j. So, that means that is the matrix, the coefficient matrix a i j is real and symmetric because we are only interested in real quadratic forms real and symmetric. So, this means the coefficients the matrix elements a i j are all real and symmetry means this a i j equal to a j i. So, one of the key results in quadratic form. So, let me just state as a theorem. So, this is due to Sylvester's, it is called Sylvester's criterion. So, v is positive definite, let me do that positive definite if and only if the matrix which is already real and symmetric is and actually the Sylvester's criterion when this matrix is positive definite further a i j is positive definite if and only if all the principal minors of this matrix. So, let so we will discuss this theorem in great detail when we discuss the portions of linear algebra that are required for this course. So, let me just give an example here. So, this what does this mean in two variables. So, in n equal to 2 I am just taking that. So, now I have just let me write that this two is only for convenience c x 1 x 2 square. So, then v is positive definite if and only if a is positive a c is bigger. So, in this case the coefficient matrix is just a b b c and the principal minors are the determinants of this 1 by 1 and 2 by 2 matrix and that is what the Sylvester's criterion says both the determinants are positive. So, a is positive and then the determinant of the second principal manner that is the whole matrix that is a c minus b square that is also positive and that is says a c is bigger than b square. So, in practice what one does is choose such a quadratic positive quadratic function. So, that is always possible by we can use the Sylvester criteria and construct many quadratic forms which are positive definite and then you apply this thing to the given system of differential equations and see whether the second condition is satisfied for stability or instability and then the stability of that particular equilibrium point in this case 0 we are taking we are transforming everything to the origin and then we can decide whether that 0 is stable or unstable. So, let me explain through some examples and before going to examples. So, again let me stress that it is not always guaranteed that this quadratic form will be enough to judge the stability or instability of a particular given system one may have to go to higher degree polynomials. So, that we will see in some examples. So, the first example, so consider this 2 d system x 1 dot equal to minus x 2 cube and x 2 dot equal to x 1 cube. So, it is very similar to the simple harmonic motion we have already considered except that instead of in the simple harmonic case these are linear, but now here we have cubic nonlinearity. So, you can check easily that 0 0 is the only equilibrium point in this case of this system and if we calculate the Jacobian of this system at this critical point it is 0 0. So, it is just 0 matrix. So, we have already seen in the study of linear systems when the coefficient matrix is singular then that situation is described as degenerate system. So, the vectors in the kernel of that matrix which is not trivial now. So, it is nonzero. So, all will be solutions and in this case it since this is 0 matrix any point in R 2 is a solution of the linear system. So, that is in some sense totally degenerate. Now, let us go back to the nonlinear system. So, looking at this cubic power let us try this. So, consider this function v x 1 x 2 is equal to x 1 4 plus x 2. So, since its fourth powers both the variables. So, it is easy to check that v is positive. It is 0 only at the point x 1 equal to x 2 equal to 0 otherwise it is always positive. So, that is one criteria is satisfied and let us calculate in order to decide the stability or the stability of the origin. So, let us compute this. So, compute so in this case it is easy. So, grad v dot f. So, f is the right hand side here. So, again let me write it. So, this is x 1 and I have minus x 2 cube plus d v by d v x 2 this is x 1 cube. So, if you compute this derivative of v with respect to x 1 and x 2 and you observe that this is. So, the stability theorem of Lyapunov requires that this to be less than or equal to 0 and here it is identically equal to 0. So, it is more than that. So, therefore, 0 0 is stable and since it is not strictly less than 0 it is not asymptotically stable asymptotically stable. So, in fact so this analysis tells us that. So, in fact the orbits of the system orbits of the given system are given by x 1 4 plus x 2 4 is equal to constant. So, let me write that constant since these are both positive. So, that also is positive. So, let me write that as c 4 per c p a. Of course, when c is equal to 0 we get the equilibrium point 0 0 when c is positive. So, we get these orbits orbits. So, orbits satisfy this equation. So, as an exercise so you just for c positive show that these are closed curves just like circle these are not circles something different from that closed curves surrounding also can use if you are familiar with MATLAB or Mathematica to draw these curves for different values of c. So, just this is not a circle, but I just it is not something like that something this is R something like that not exactly that. So, you can also do that and see that they are all like that. So, constant in course, again just like circles, but something different from that. So, now let us go to the second example let me go to new page. So, this is a 3 D system. So, let me just write it x 1 dot is equal to minus 2 x 2 plus x 2 x 3 x 2 dot is equal to x 1 minus x 1 x 3 x 3 dot is equal to x 1. So, these examples will tell you the systems can have very different behavior the they though they might look somewhat similar, but you will see the difference. So, here again the origin is an equilibrium. So, there are other equilibrium points I will come to that in a minute. So, just certainly if I put all x 1 x 2 x 3 x 3. So, the right hand side vanishes you can easily check that. So, equilibrium point and if we compute the Jacobian at this point. So, again it is a 3 by 3 matrix now. So, this is some computation you have to do learn how to do that and the Eigen values of this matrix are 0 plus or minus 2 1. So, again one of the Eigen values is 0 that means the determinant is 0 this matrix is singular. So, again it is a degenerate system. So, linearized system it is degenerate system. So, all the vectors in the null space of this matrix are solutions of the linearized system and now let us try. So, since we are now familiar with quadratic functions. So, consider this. So, v x 1 x 2 x 3 a quadratic part with only diagonal elements. So, v will be positive definite v is positive definite if c j's are positive. So, that is you can also check by the Sylvester's criteria. So, this is only diagonal matrix. So, there is no problem. So, if all the c 1, c 2, c 3 are positive then this is a positive definite matrix. Now, let us compute because that is what is the requirement of Lyapunov theorems. So, little algebra if you do it. So, let me write it. So, c 1 minus c 2 plus c 3 x 1 x 2 x 3 plus minus 2 c 1 plus c 2 x 1 x 2. So, if you look at this terms x 1 x 2 x 3 and x 1 x 2 x 2 no matter what is the constants I choose either to make them this coefficient positive or negative whatever because it involves the product of this x 1 x 2 x 3 and in a neighborhood of the origin they can take both positive signs and negative signs. I will not be able to make either this if I want a non zero thing non zero coefficients here. So, it is very difficult to make this grad v dot f either a positive thing or a negative thing. So, the easiest thing since it involves this products of x 1 x 2 x 3. So, easiest thing is to make this identically 0. So, that can happen only if c 1 minus c 2 plus c 3 is 0 minus 2 c 1 plus c 2. Remember c 1, c 2, c 3 are at our disposal. So, we can choose them as long as they are positive that is fine and now these are second condition. So, there are two equations and three unknowns. So, you have plenty of choices. So, one choice is choose c 1 equal to c 3 equal to 1 and c 2 equal to 2. Then we have a positive definite function for which grad v dot f is identically 0. So, again in the like previous case. So, therefore, 0 0 the origin in 3 D is stable, but not asymptotically and in this case. So, because of this is identically 0, we also see that see that the orbits are given by x 1 square plus 2 x 2 square plus x 3 square is a constant. So, let me write that as c square. Again when c is equal to 0, we get the equilibrium point when c is positive. So, these are all ellipsoids. So, here much easier to recognize than the previous example where it was x 1 4 plus x 2 4 equal to c 3. So, this is a constant. So, let me write that as c square. Again when c is equal to 0, we get the equilibrium point when c is positive. So, these are all ellipsoids. So, here much easier to recognize than the previous example where it was x 1 4 plus x 2 4 equal to c 4, but this one only quadratic terms. So, we know this what this represents. So, these are ellipsoids again surrounding the origin. There is a reason for me stretching this. We will see later why I am stretching that. That is precisely point in Poincare fixant theorem. That is point. So, this system also has the following equilibrium points. There are infinitely many in fact. So, let me write few of them. So, this a 0 1 0 b 2 a 0 b and 0 0 c. So, these are all equilibrium points where a b c are arbitrary numbers. So, we have constructed a Lyapunov function at the origin and you can simply modify the same thing to construct Lyapunov functions for any of these equilibrium points. And you see that. So, modify suitably the previous Lyapunov function and conclude all these equilibrium points are stable, but not asymptotically stable. So, in the next example, it is a modification of 2. So, again the same system just I will perturb it little bit more minus 2 x 2 plus what was it x 2 x 3 and now I perturb it x 1 cube and x 2 dot again same thing as before again perturb it by cube same thing with third equation again I perturb it by. So, you see that the difference between the previous example and this function this example is that the system is perturbed by this non-linear terms. And now check is lit again between algebra check that 0 0 0 is the only equilibrium point. So, only here in this case we have there are no other equilibrium points. So, little little algebra 0 is certainly an equilibrium point at 0 these right hand sides vanish, but it is the only point with the the 3 equations on the right side vanish. And again the Jacobian is the same. So, there is no change in the Jacobian is the same. So, there is no change in the Jacobian 0 0 0 0. So, again it is a degenerate system there is absolutely no change. So, again let us start with that from the previous example let us consider this which has helped us in the previous example. So, again x 1 square plus 2 x 2 square x 3 square. So, it is a positive definite function and now let compute grad b dot f with respect to this system previously we constructed computed del b dot f for the previous system. And now grad b dot f. So, please do it some algebra now we see that this is less than 0 for all x 0 0 when one of them x 1 x 2 x 3 is not 0 then it is strictly right. So, this is a negative definite function. So, therefore, again by the Lyapunov theorem we conclude that 0 0 0 is asymptotically stable. You see just a perturbation of a system can change the nature of the equilibrium point. So, in previous example it was only stable, but not asymptotically stable. And in this example we have perturbed the system by some cubic nonlinearity and we now obtain that this origin is asymptotically stable. So, again if you change the sign of that perturbation instead of minus x 1 cube minus x 2 cube minus x 3 cube if you put plus you see that 0 0 0 is unstable. So, a slight perturbation can change the nature of the equilibrium point that is an important point to be observed. Because in practice we never get a system exactly it is always an approximate system. So, we would like to know what perturbations do to the equilibrium point and this is a subject of an advanced subject which is called the structural stability. So, we are not discussing in this course. So, it goes into that. So, you are perturbing the system itself and asking whether the system is stable or not. So, that is another topic. So, let me go to the next example now. So, this is a 2 D example. So, instead of x 1 x 2 let me write x dot y dot. So, this is 2 x y plus x cube y dot equal to minus x square plus. So, I will not discuss the linearized system. So, you can do it yourself. So, again 0 0. So, you can check 0 0 is the only equilibrium point. So, here also the Jacobian at this point of the system is 0 matrix. So, let me not again and again discuss that. So, let us try directly go to this non-linear system and see whether this origin is stable or not and again for that thing. So, consider this positive definite function v x y. So, I am using the notation x y instead of x 1 x 2. So, x square plus 2 y square. So, this is a positive definite function. There is no doubt about that and you see why that 2 is chosen. So, according to the system 1 has to construct this Lyapunov functions. They are not there one we have to construct these things. And if you work out the this quantity grad v dot f in this case you find it twice x 4 and because of even powers this is positive definite and therefore, by the Lyapunov instability theorem. So, 0 0 is all step. So, we also have some instability examples. So, the next one is again a 2 D system. So, this is fifth. So, 2 D system. So, let us consider this system x 1 dot is equal to minus x 2 plus x 1 x 2 minus x 1 cube minus half x 1 x 2 square and x 2 dot minus 3 x 2 plus x 1 x 2 plus x 1 square x 2 minus half x 1 x 2 square. So, 0 0 is certainly positive to a equilibrium point and I leave it to check whether the system has any other equilibrium point and study if there are any and what is their stability whether they are stable or unstable etcetera I can check that. So, here again if you compute the Jacobian this will be 0 minus 1 0 minus 3. So, again the Eigen values are 0 and minus 3. So, it is again degenerate because the matrix is singular again a degenerate system. So, now let us try this try v of x 1 x 2 is equal to half half or convenience we put it 3 x 1 square minus 2 x 1 x 2 plus x 2 square. So, if you use silvestre criterion you can easily check that this is positive definite and since we are just in two variable and a quadratic function we know how to complete the squares. So, you can also see the positive definiteness in much easier way in this case. So, this is just 2 x 1 square plus x 1 minus x 2 square. So, both these terms are non negative. So, certainly at x 1 equal to x 2 equal to 0 it is 0 and suppose this is 0 then 2 x 1 square that x 1 is 0 here it is x 1 equal to x 2. So, again we get that x 1 equal to x 2 equal to 0. So, it is for x 1 x 2 not equal to 0 v is always positive. So, either you can use silvestre criteria or this simple computation to see that it is positive definite. That is the first job we have done and now we have to compute del v compute. So, this one let me do that thing. So, this is del v by del x 1 into f 1 del v by del x 2 into f 2. So, in this case, so let me just write it. You can just compute it. So, this is 3 x 1 4 from algebra plus 2 x 1 square x 1 square x 2 minus 2 x 2 square and this you can write as minus 2 x 1 4 plus x 1 minus x 2 square x 1 square minus x 2 square plus x 2 square and all the 3 things in bracket are non negative and it is 0 only if x 1 equal to x 2. So, this is negative. So, therefore, again by silvestre Lyapunov theorem 0 0 is asymptotically stable. So, you see in the case. So, so far all our examples you also observe that the equilibrium point in question is not hyperbolic. So, the linearized system always has an eigenvalue either a 0 eigenvalue or eigenvalue with real part 0. So, these are all non hyperbolic. So, they cannot be the stability or otherwise cannot be judged by Perron's theorem or Hartman-Grobbman theorem. So, here you see the usefulness of Lyapunov function and Lyapunov's theorems on stability and instability. So, that you should bear in mind. So, all our examples depict that thing. So, all the equilibrium points in question are not hyperbolic. So, that you bear in mind. Final example. So, there will be more exercises in the assignment sheet. So, you can practice this construction of Lyapunov functions for given systems. And do not think that this in for example, in this previous example taking this. This is not just come by you know just like that. So, different constants have been put and tried and the main objective is to have a definite sign for del v dot f. So, then the suitable constants have to be chosen. So, here I am writing the final thing, but these constants have come after some trial and error that you should bear in mind. So, it is not just automatic. I given a system I cannot immediately see why this 3 minus 2 and 1 should come. No, no that is that will not happen. You have to try it and important thing is we have to have a sign for this grad v dot f. So, that you should bear in mind. And now one more example x 1 dot. So, this is somewhat special. So, let me spend some time on this x 1 dot is equal to x 1 square plus 2 x 2 phi. So, again a 2 d system x 2 dot x 1 plus 2 x 2 phi. So, again a 2 d system x 2 dot x 1 x 2 square. So, observe that if this 2 x to the phi this perturbation were not there. This is already an unstable system and if this x 1 were replaced by some positive constant again the second equation is also unstable. So, we can expect this 0 0 is the only equilibrium point. We may expect for example, here if x 1 is negative then this becomes the for second equation it becomes stable. So, we may expect that the 0 0 is unstable, but we cannot immediately see that. So, let us consider this consider this v x 1 x 2 x 1 square minus x 2. And because of this negative sign certainly v is not positive definite. So, we can have this v x 1 x 2 equal to 0 for x 1 square equal to x 2 4 and x 1 x 2 need not be 0. However, if you draw this graph in x 1 x 2 plane sort of parabola, but not exactly parabola one. So, it is something like that it is symmetric. So, these are all the points where v is 0 v 0 and inside this v is positive. So, every neighborhood of the origin may be just use this every neighborhood of the origin contains a small region where v is positive. So, since v is continuous certainly this this this set since v is continuous the set where v is positive is open. So, if it contains a point then it contains also a small ball around that you can see here clearly in the picture. And now let us compute. So, there is so recall I made a comment in the sketch of the proof of instability results. So, observation by Chathau. So, this is also called Chathau's theorem. So, recall that already done it. So, this hypothesis of Chathau's theorem is that every neighborhood of the origin contains a region where v is positive which is clearly here. So, this if I I can make this is the region where it is positive. And now let us compute grad v dot f. So, simple calculation you see that it is 2 x 1 q which is positive for x 1 positive. So, this is. So, this whole thing positive if x 1 is positive and negative if x 1 is negative. So, if you recall the second condition in Chathau's theorem what we require is this grad v dot f positive in the region or a sub region in a sub region where v is positive. And certainly here we have the immediately see that. So, this. So, in this region this grad v dot f is positive. So, now you apply Chathau's theorem and conclude that 0 0 is unstable. So, it is indeed our initial guess is right and 0 0 is unstable. And remember here the hypothesis of Lyapunov theorem is not satisfied. Lyapunov theorem requires this grad v dot f to be positive definite everywhere in a small neighborhood. But Chathau's observation was that it is sufficient to assume the positive definite as in a sub region where v is positive. So, 0 0 is unstable in this case. So, please go through all these examples. These are very important for general understanding of this stability analysis. And next time we will discuss 2 D systems. Thank you.