 what this dynamical system does, right? Then you would say it starts with some x naught, right? And let me concentrate on the interval of zero to one. So we're gonna assume that this function is defined on interval of zero to one. So initially the value is in the interval and then if I were to graph this, it's obviously a quadratic upside down and it has a peak here, right? So let's see, peak is halfway in between, so that's one half. So when you compute g at one half, you get a over four, right? So if I want that the new value of x to be also between zero and one, I need this a over four to be less than one, right? So we're gonna talk about the case when a is of course positive and less than four, okay? Then a over four is less than one, so when we apply g to any number here, we're gonna get x one in that interval and so forth, right? So x one is g of x naught. It's gonna be interval zero to one. x two is gonna be g of x one, right? Now, because g is not linear, what's this gonna be if I were to write in terms of g naught? Well, it's gonna be g of x naught, right? So it's g composed with g, right? So if you know composition, it's g composed with g. So sometimes you write this as g square or something, but it's not, I mean, it's g composed with g itself. Okay, so then you keep going like this. So xn is gonna be g of xn minus one. So it's gonna be g composed with g, composed with gn times g of x naught, okay? But you can see that it's becoming, it's actually difficult to do it by hand now because you don't have, it's a nonlinear, so it's not just raising something to a power, right? I mean, even in computing the g composed with g, it's, I don't think you would just be able to do it in your head, right? So you need to write if g of x is ax y minus x, what is g, g composed with g? Every time you see ax, you put g of x, right? One minus ax. So it looks like it's sort of being quadratic is gonna be fourth order, right? polynomial. Okay, so we'll use this a little bit later, but that's kind of the idea. So again, by hand, unless you take a number and then you punch it in a computer, it's gonna be difficult to see what this dynamical system does. Again, if I were to do it, let's say a is two, or 2.5, let's do 2.5, okay? Then I take x naught to be, or x, initially to be, what do you want it to be? 0.33 or something, or 0.1, okay? And then what do I do? I do ax equals a times x times one minus x, and this gives me the next, right? The new value of x, right? I do it again, I'm gonna get the x two, right? Do it again, right? So what am I gonna expect to happen? Well, it's not that I expected, but I notice that this is gonna actually stabilize around this value, which it's not very clear from just, I don't know, a few, right? Because if you display more decimals then you can see how it's kind of oscillates a little bit between that, right? Okay, so I told you last time that, well, one of the previous times, I said that you can actually visualize this in much better fashion, and that is using one of the, what's called a cobweb, right? So let's see, where was that cobweb thing? So it was in the, I think I had it in this, ooh. Wasn't it a code that I gave a code? I don't remember, what was it? We saw that code of the, I showed you a code last time, maybe I'll find it. But let's see, I made a link to an interactive job. Yeah, I think I looked at that, but it wasn't there. So let me just show you on this, I guess. I mean, it's not something we can control much, but this is the same thing. So here's that function, right? Here's some value of A, which I don't know, that's what I'm saying. I think this is a half, right? Point, point five. I think that would be like point, point, no, what am I saying, an eighth, right? That was an eighth, but this is probably gonna be 2.5, okay? So you see that whatever I start with initial condition here, let's say initial condition is a point one, then it just computes the new value and then the new value, right? So the heights of these points are the values of the values of x that are iterated. Now, remember why we go this way horizontal? Well, simply, this is x not, x one is gonna be here, right? So now you move on this horizontal so that x one is plotted down here and then you move up and so forth, right? Exactly, that's y equals x. And this line is just y equals x, exactly. And we saw that those values kind of oscillate around point six in that particular case and point six turns out to be exactly the steady state, right? So if you set this equal to x, you know, with that value of a, you're gonna find that that value is a steady state. Not only is a steady state, but it's a stable steady state, okay? Also zero is another steady state, but this is unstable steady state, okay? So for the range of this of this parameter a between one and three and 2.5 is in that range, zero is unstable equilibrium and that value is a stable equilibrium, right? Okay, so I'm wondering that we had the code sometime. Maybe I can find it here, let's see. Oh, here it is, I'm sorry. Number six, I know, but I don't know where the code is. I think this must be the code, let's see. Right, and I couldn't find it right now. I think this is it, yeah, so this is it, okay. So, 2.5 and K, this is one in our case. Oh yeah, and I have to plot things between zero and one, so I have to make a slight change here, let's see. 0.1, 0.2, 0.5, 0.7, I don't know. Okay, so let's see now, this should work. Okay, so, right, so that's what I was showing on that applet for a specific value of A is 2.5, okay? And notice that regardless of where you start, you're gonna actually approach this equilibrium, okay? By the way, this is not obvious why the fact that we have a stable equilibrium here and unstable equilibrium doesn't really explain why every initial condition here will go to this equilibrium, right? Remember, stability of the equilibrium means what? If you start closing up to it, you're gonna stay within it, okay? So there's extra arguments that one needs to make to justify, you know, to basically explain what you see here, okay? That everything, everywhere you start, no matter where you start initially, you let it run enough times, you're gonna go to that stable equilibrium. Do you just have one stable equilibrium or no? Say it again? Is that always true? You just have one stable equilibrium, so can you? Yes, I mean, so in one dimension, it's true. I mean, there is an argument which says, if you have a stable equilibrium and your dynamical system is bounded, so it stays always between negative one and one. There is no other way of an initial condition to do. It has to approach the stable equilibrium, right? But for continuous, for continuous dynamical system, that's not true in two dimensions and so forth, yeah? So you're saying that even if you were to start at zero? Oh yeah, of course, no, no, no, it's zero, okay, except in zero, yeah, of course. But zero's unstable, but it's still with zero. It's an equilibrium. You're gonna go to zero. You're gonna stay at zero. Stay at zero. Yeah. Okay, but I think that this kind of dynamical system is interesting because of the change in behavior with this parameter A. So if we increase this parameter A, remember, I think even in our exam was to find the range of A's for which you have a stable equilibrium and that was zero to three, okay? So the moment you increase A beyond three, or even if three is gonna be, let's see what happens. BG, BG, okay, so, so you see what happens? You see that it's still stable, but it kind of goes very slow to this, right? Yeah, and this is kind of a borderline case where I think in all the cases you're still gonna kind of spiraling in if you want, but at a very slow pace compared to the previous one. Like if I put two nine nine, you'll see that this is actually gonna go, should go faster, but there is no, so you see in the same number of iterations, which I think in this case was a hundred, it actually got a lot closer to that, right? So let's just increase very, very slightly. Maybe 3.01, oops. As long as the moment A is greater than three, both equilibrium are unstable. You cannot really see this, but it turns out that if we do not a hundred, but we do like 200 iterations, what you will see is that you actually never gonna close in to that equilibrium because that equilibrium is unstable, it's gonna repelling the things, right? So I put 200, and you see you're still not going towards that point, right? So it's kind of hard to see here, but so let me do 3.1, let me do it, and I'm sorry, I shouldn't have taken 200, it takes a long time. I just want to accept it, let me have the process. You learned something today. Take a look at what happens here. Well, that is not so clear, but this is obviously clear. In fact, you can look at the, I put the circle so you can see where the X's are, right? You see it actually kind of bounces back and forth, right? So this is what we call a cycle of period two. Right, so conceivably there is, I mean, you can actually see here that there's gonna be a value of X that if you start there, the next one you're gonna go to another value, and the next one you're gonna come back to the original value. So it's a cycle two or a period two, okay? So you have a new kind of behavior. The one behavior was if you started at the equilibrium, you stay at the equilibrium, right? But if you start anywhere, well, if you start at this other special point, which you can actually compute, then you're gonna go back and forth, back and forth between two values. And if you start anywhere else, you're gonna actually approach that back and forth cycle, two period cycle, okay? How do we, so how do we see this? Cycle of length or period two, what would be a cycle of length two? Would it be Xn plus two, so that this is X, GXn plus one, which is G composed with G at Xn, and you want this to be equal to Xn, right? So it's basically solving a solution to this equation rather than G of X equals X, right? And remember this was fourth order, and it had an X multiplied to it, so an X and an X canceled, so zero is a solution, right? That we knew, and then it's gonna be a third order polynomial, messy, which is gonna give you how many solutions? Well, one or three, right? But in that range, I think of A equals, well, there's gonna be a range of values of A for which this is gonna give four solutions. Well, two are gonna be steady states, whatever it is, right? What was it? Anybody remembers? One over one minus A, right? So these are gonna be the steady states. The steady states are, I mean, they're not really cycles, but you can think of it as, you know, it repeats itself every other iterations, iteration. So, and two more. And guess what is the role of the other two more? Well, those will be exactly the ones that the back and forth one, right? So this picture is gonna, so you can actually do it by hand, except you're gonna have to solve a cubic equation, and that you may actually run the problems. So what you had to get there was gonna be cubic, it's fourth order on the one side and the X on the other one side. This was fourth order polynomial, and this was X, and this polynomial had X as a common factor, as a factor. So you could cancel that and be left with a third order polynomial. Now, I'm not doing it because it's actually done in this handout that I gave you. So if you look in this first page, second on the right-hand side, except the fact that they use R is the same thing. So you can actually see the formulas for the value of the two-cycle, okay? And by the way, I should mention that these, this is just like a few pages that I printed from this book, okay? And this book is freely available to you guys, as you know. It's actually linked here in the syllabus. So it's chapter three actually deals with discrete time diagonal systems. I don't know if I probably mentioned this before, but now it's a good time to kind of look at this. There are a few more things that we're gonna talk about. Anyway, so okay, so basically this is, if you work it out, this is what the two other solutions will look like, right? And you see that A has to be greater than three, at least three to have a real, those have to be real solutions, right? So A, in this case, R has to be greater than three, right? Before that, you don't have the cycles, okay? Now you can see it in this applet because, kind of the nice thing. So this shows, you see there's this moment when the second, when this non-zero steady state becomes unstable and you have this cycle. Now, of course, this cycle depends on A, right? So if I increase A, it's gonna, looks like it's gonna move apart, right? I mean, those two values are gonna depend on A, obviously. But what's more interesting is actually there's gonna be a next value. So number three was what's called bifurcation point for this parameter, right? Something is happening as you pass that value three. But as you increase, and you can see it in the picture, of course, and then you can go to the paper, paper and pencil end. Well, let's see. This still looks like a two cycle. Yeah, this one. So there's some other, the next value of A that is once that's passed, there's a four cycle, right? So how do you find these values of the four cycle? You take that g, you know, you compose it with itself four times, set it equal to x, and you're gonna end up with an eighth degree polynomial after you cancel the, let's see, it's getting a little bit hairier now. But once you cancel the x, it's gonna be seventh degree polynomial which can have at most seven solutions, seven roots, right? So those will be, hmm, okay. So these are the four, right? So these are gonna be the four, and these are gonna be the fifth, so I don't know why I'm getting seven. But anyway, you get the idea, right? You don't really wanna do that by hand at all, but this is kind of the reason why you see this four, the four cycle show up, right? Yeah. You could always say, you could always come up with three more a's down, you know, plus a's back in the other range, a's 2.5, right? You could say, what's the... Sure. What do you get in that case then? It seems like it's still good. What, are they gonna get the two cycles? Even before the two cycles, they'll say you're moving for, before you get the two cycles, right? Okay, so the question is, what? It's not general. So what happens, so this is gonna give you a third order polynomial, right? Which may have how many real roots can a third order polynomial have? Three or? One. So I would say it has three, make it have three or more. Or one, right? So depending on a's, and then the value of a for which it has three. One is less. Right, so when we got to the next one, the fourth cycle is probably, this is the reason why, even though it's a seventh degree polynomial, you're probably gonna have five, five roots in that range, right? Obviously it's seven to three polynomial, so you can have one solution, seven to three polynomial. Because you can come up with a seven to three polynomial, like you can ask for a later range, right? Sure, but then you will have, you could still have one root, right? You have a seven polynomial, one root, right? Yeah, yeah, but the complex roots are not, you know, are not solution, I mean are not steady states or cycles or anything for this dynamical system, right? So we're not looking for the real ones. Let's see, 3.5, I mean it's just kind of, again, you could actually do it more systematically. Figure out what the threshold, ooh, 3.5 seems to be too big, right? For the fourth cycle. Either, so I don't know what the next value, the first value was easy, right? The first value was three, there was a change between stable and unstable. But now, you see here, it looks like it's gonna be, it's already, well, this looks like a two cycle, this looks like a two cycle. Yeah, so this seems to be a value for which you have a two cycle, still a two cycle, and then as you move to the next one, and it still won't matter, it will not matter of the initial condition. Because this is independent of that, right? It's just saying, what are the some special, okay, so this looks like it's gonna four cycle, right? So anyway, so there's actually a sequence of values for A for which this gets more and more complicated. And you will say, well, maybe we should just keep increasing this. And from four, we're gonna see eight, and 16, and so forth, right? So we're gonna see a power of two cycle, right? But actually what happens is past yet another value, which is something of 3.8 something, things get, I think this is the, I don't know, there's gonna be a value here. So if you're gonna put it right at four, so A is just four, right? Then, and you look at the initial condition here, you're gonna see actually things, there's gonna be no more, you know, there's basically gonna be cycles of any order, depending, you could find initial conditions for which you can create cycles of any size, okay? And that's actually the signature of, well, that's one of the kind of manifestation of this chaotic behavior, is that you can have cycles of any size, right? Again, depending on initial condition. Remember before, when you had like a four cycle, right? It didn't matter what you had for the initial condition, everything was doing the same thing, right? Even if you had like a, I don't know, two to the 20 cycle, right? Everything is kind of behaving the same, meaning that it's not sensitive to the initial condition, right? The long time behavior or the behavior of the system, whereas you see past a certain value, you're gonna start, well, still, right? So this still means that you have some, let's see this one, still, right? So it has to be kind of, it's probably hard to see that in fact, you see that these initial conditions give you different behaviors, but they do. So, and we'll talk a little bit more about this, about how does, how is this sensitive to the initial condition, right? In what sense is this sensitive to the initial condition? But you can see this behavior emerge even in this very simple system. Any questions on this? It's too bad you cannot pick the values, but again, you can do this on MATLAB. It's just not so interactive, I guess. Okay, so the code that I posted, which is called period doubling, it's just another way of seeing this kind of behavior. So let me run this. And it might take a while, let's see how long it takes. So what I'm doing here is actually, I'm plotting for a bunch of values of A between 2.5 and 4, right? Those are the kind of the interesting ones. I'm plotting only kind of the limiting behavior. So you will see in a second, so notice that I'm picking a value for A, then I'm picking a random initial condition. I'm doing 100 iterations, but I'm not plotting them. And it's only after the 100 iteration, I'm still doing the same iteration, but then I'm starting to plot them. So that's all it is. Now the reason it takes long is because I'm picking a very small increment for A, right? So between 2.5 and 4, I'm plotting lots of points here. So this is the A-axis, yep. All right, so this is the A, I should have labeled this to be A, then what? Then what's on the vertical axis? Just the X, right? And remember, these are the X, these are the computed values of X past the first 100. Why are we not plotting the first 100? They're gonna be actually just kind of noise in this picture, right? So this picture just presents, for instance, think about between A between 2.5 and 3. This picture just shows the corresponding steady state, which is 1 over 1 minus A. So if you think about it, it's just 1 over 1 minus A, 1 minus 1 over A, okay? Now it's plotting lots of points. For each A, it's plotting from 100 to 200. So it plots the 100 points, but you see only one. Why do you see only one? Because they're all there, they're all very close to it, right? So you don't see any distinction. If you were starting with your field to plot the first 100 points, you would see lots of, well, not lots, but some, right? Because remember, the initial condition was picked to be random. Okay, so that's what happens here now. What happens past three, between three and 3.4, you, again, it would be, you know, one in a million chances that you start with a random point that's exactly an unstable steady state. If that were to happen, you would actually see one point, right? Which would, by the way, would actually be just extending this curve, right? But that hasn't happened in this run, and it probably won't happen ever. That you just picked a random point and then after 100 iterations, you see the kind of, the only thing that you see is basically the back and forth. Then between 3.4 and whatever, right? By the way, this point, this thresholds are not number you can write down, you know, with radicals and stuff, right? So these are, you know, values that I think can be computed, but they're not, you know, principle can be computed. Anyhow, so you see the four cycle showing up, and then the eighth, and then very soon, it's kind of, it comes impossible to see, right? I believe this is still a region of values of A for which you see some cycles, right? But certainly past, you know, 3.8, I believe it's a number. It's actually written here, so 3.82828, okay? With the second and fourth cycles, when those lines diverge, that's an indicator for different steady states that exist. They're not steady states. I thought you said that the first line was a steady state. Yeah, this is a steady state, right? This is a two cycle. Two cycle, okay. Then this is a four cycle. Now there might be a two cycle here, but unstable. That's why you don't pick that, you don't see that. It has to be like, again, one million chances just like here. This is still gonna be an equilibrium, right? The function one, the one minus one over A is gonna be an equilibrium, but it's gonna be unstable. So unless you start right on that value, which on the computer you never do, okay? So yeah, so 3.82 somewhere here, right? Somewhere. Then past that, there are cycles of any size, okay? And so this is the kind of picture everybody puts up for chaotic behavior. So what's going on there? There's a big white space there. I get that question every time. And I still haven't. Yeah. No, no, it's, no, I mean, there's nothing kind of subtle about this code. It's just plotting massive amount of points. Well, so this is actually, you can see it in the here. And you see, there's kind of a range. It's kind of quite down in the region here, see? So there are some values of A, even that high in the range that you still get a, what is this? One, two, three cycle. Actually, that's a good, this looks like it's a three cycle, right? Cause it has one value here, one value here, and one value here, okay? And if you, so in fact, that's, so on that plot, right, there's very few points. There's just three points, right? For that value of A, yeah? Cause you see, an initial condition is kind of going towards that, so, and then there's like, there's maybe there's a value for A for which, not a three cycle, but a five cycle, right? So the point is that if you have in the same system of a two cycle, any power of two cycle, and then something that's not a power of two, like a three cycle, then there is a result that says that you can make any number, any cycle. So it's already in the chaotic regime, okay? It's above that, right? See, it's kind of pretty, I mean, again, it's hard to, well, you can experiment on your own with this code, right? 3.9, let's see. This may be, okay. So there's some kind of theory that one has to, yeah, this is, anyway, I'm not in that range, basically. Now, so this second page of this handout just basically talks about the value when A is four, and it actually shows you how explicitly you can write down the iteration. So you can write down the iteration. Yeah, so 3.83 was, you see, for some initial condition is like this, but other, so it looks like that that Aploc may not actually be very correct, because, right? So, but this is just a, I mean, pu, I mean computation. So when A equals four, you can actually, if you try really hard, you can actually write down explicitly what x sub n is in terms of sine squared and stuff like this. And then this kind of, this computation shows kind of why this behavior, why is this, why is that A equals four is actually in the chaotic regime. So what does it mean to have cycles of any size, right? What does it mean to that? The behavior is sensitive to the initial condition. I mean, for that value of the parameter. Okay, but you can certainly see it in this picture, right? All right, now, let me come back to, I'm gonna come back to this. Any questions about this? I don't know if you've seen it before or if you haven't seen it before, probably you'll remember it from now on. But I want to go to the whale problem, for instance. So, I think it's, so let's kind of run this. And this code again, just remember from last time that it had roll basically in approximating the solution of the continuous dynamical system using Euler's method, the simplest of all, using a certain time step, right? And I think we were using a time step of one year here and time span was 200 years, maybe, yeah. So, okay, I actually did this kind of exercise for the other, for the RLC circuit. Just change this age, but not change it into making it smaller but changing it into making it bigger, okay? Now, notice what, you know, the iteration is very simple. Like, of course, it's a two-component. So, it's two-component, two-component vector. So, right, so it's not a single equation, it's a pair of equations. But notice the roll of age, which is just a time step, right? Think about it, as I'm increasing age, it almost looks like that A, right? From the logistic map. I mean, it's not exactly logistic map but it's not far from that either, right? Because, you know, of course, it has this X here, so if you, I don't know. I mean, this is not an exercise of tweaking this to look like a logistic map. But just to indicate that if age is gonna be increased, you're gonna expect things to occur that are not in the continuous system. Like, well, let's change age to, I don't know, not the exact values, but let's just try this. Okay, so two is still kind of a, it's an okay value, so okay meaning what? The behavior still looks like it's doing what the continuous system is doing, right? With a lot fewer, I mean, because age is now bigger, you do only a hundred iterations, right? So maybe I should increase it to five. I don't know, let's do it slowly, three. Okay, well, still pretty good. I mean, nothing is insensitive to this, right? Still good, although obviously, you know, these things are not gonna be all the same, but I think five is gonna be the one that's gonna look different. No? Okay, let me do 10. Okay, well, let's see, it's kind of hard to see. Wow, this is resilient here. 20, well, I think it's gonna, we're gonna run into. Okay, well, you should kind of, well, you should at least see some slight variation here and in these things, but let me just skip the numbers. 24, that was close. Now, making 24, yeah, and then you kind of start seeing a zigzag thing and this is not something that will stabilize, actually. And you can see this if we increase T. Let's do not T to 200, but let's do T equals 1,000 just to see more points. Okay, so, all right, so I was wrong. It does stabilize after a while, right? So let's see, what's the value that will stop stabilizing? 27, okay, so 27. We're taking as 27 runs if I were going one by one. Right, so now you see clearly this pure doubling, okay? And look, I think this is hard to explain. I mean, this would be kind of hard to explain or just impossible to explain for this dynamical system, okay? And it certainly would be unexpected, right? Oh, yeah, that just seems like you just had a big time step in here, but we're... Yeah. There's no physical thing behind it. No, no, no, so it's not, right, so it's not actually, okay, so this is not actually trying to go towards the continuous time dynamical systems. In fact, it's trying to get away from it, right? So it's trying to say the following, it's saying that if you have a process, like, I mean, a dynamical system in the real world, right? And if your kind of experiments or observations happen at the wrong time scale, that you may actually miss kind of important features in that system, right? Or you may see something distorted, so you may see something that's not real. And this is kind of what it's saying. It says that if I don't pick the, you know, in this case it would be 27 years, but you can think about it at 27 minutes or something, 27 minutes or something, right? That if you only kind of try to model this dynamical system at this different time scale than a large enough time scale, because that's feasible or reasonable to do, then you actually will see different behaviors. And I think if you go to 37, whoops, then you will see basically nothing, okay? Again, to me that's, yeah, I mean, obviously you see nothing coherent. So the point of this exercise is to see that, again, if you try to model something by, say, sampling data at two cores of a, the time is two cores, right? Then what you do, you run into the risk of not seeing the behavior of the system that's, or describing the, modeling the behavior of the system in between, accurately. Now, you're right, this is not very, I mean, this is not physical in the sense that in this kind of problems, you don't go by increasing the time step, right? Your goal is to actually decrease the time step to approximate a continuous system. This is where the surprise came basically when chaotic behavior was discovered also in continuous time dynamical systems. So this is by, I mean, this is by all means, if you think about it as a continuous time dynamical system, this is not chaotic, right? It's just very deterministic. Well, not only deterministic, but the solutions are insensitive to initial conditions. So you can work with, you can change a little bit the initial condition and you'll see a similar behavior, right? Whereas, and I'm just gonna flush this here, where's this command line? And continuous time dynamical systems such as, okay, I don't want P plane, I want OD solve. Okay. Which is as small as three-dimensional, so, I mean, three components, X, Y, and Z, okay? It's called Lorentz system and you can see that it's nonlinear. So you can see it's nonlinear because the right hand side has X times Z, X times Y, right? So it has those competition types terms, right? Maybe predator, prey type terms. The rest are linear, by the way, okay? But it takes three equations. You cannot do it in two equations, in two dimensions. So in three equations, we just, very specific, with some specific parameters, which again, we'll talk about this in a while. If you just run this and you plot it versus time, that's what you see, each component looks kind of weird. So in what sense is this chaotic? Well, you have to go back and remember, what was chaotic about the logistic map? Yes, you had cycles of any order, but that's hard here because in continuous time dynamical systems, we don't talk about cycles as much. I mean, just periodic solutions. But the more important thing was that sensitivity to initial condition. So in other words, if I change the initial conditions by just a bit, the dynamics changes drastically, right? So again, it will be difficult to see because we have to save this somehow. I mean, we can save this picture, no problem, but not just the picture. You wanna basically compare the two, right? And you wanna just slightly change the initial condition there, and you should see how they differ, right? So everybody has a good memory, a visual memory, take a snapshot, okay, good. And now we're gonna change this by a little bit, 9.9. Well, again, it's impossible to compare, right? But the point of this comparison is that you can make that as close to 10 as possible, and this will still look very different from that one is 10, okay? Now, the better way to see this is to do a 3D plot, X versus Y versus Z. Again, when you do this, it's like a P-plane, right? You see only the trace of the trajectory. You don't, I mean, you just see the trajectory. You don't see the time evolution of that, so. But anyway, so this is kind of, I think I can rotate this. Can we rotate this? Oh, okay, so I'm sorry, this doesn't let you, okay, but, right, so you start, this is the initial condition, and then it kind of goes in this wild pattern, right? Which is, it's called a strange attractor, because it doesn't matter, well, it will matter. If you start really far away with initial condition, then it's gonna look different. But if you start with initial conditions in a certain region which is close to this attractor, then things are gonna look like this attractor, okay? So, why is then sensitive? Like if I put 10 here and I do the same thing, it's gonna look exactly the same. So, why don't we say that it's not sensitive? Why don't we say that it is sensitive? It's still computing. You see, the trace, I mean, the trajectory looks, I mean, on ink, looks the same, right? Independent of initial condition. But what is different is actually the, in time, if you are to compare, you know, for each time, the two solutions, they're not gonna get, stay close to each other. In fact, there's gonna be times when they're close to each other and there's times when they're on different loads, right? Okay, so that, in that sense, it's sensitive to initial condition. That's the meaning of this. And again, this is a continuous time to enable system which was discovered right by Lawrence. And it is just a very simple to write down, okay? So you can write this down. I mean, you can imagine a type of, even population dynamics, I guess, where that kind of interaction exists between three species, right? This model was actually a toy model for weather, right? For weather prediction. So X was a temperature, Y was pressure, and Z was maybe humidity or something, okay? Perfect example if you look out the window. They closed the school district 20, right? This morning, well, anyway. But you can just, so this was kind of a, for instance, where a simple three component system, ordinary differential equations, ordinary differential system, temperature, pressure, and let's say humidity, exhibits this kind of behavior, right? Behavior that is very sensitive to initial conditions. So it makes it hard to predict, all right? Unless you know exactly your initial condition. And in weather models, you never know initial conditions, right? Correctly, I mean, precisely. Okay, let's see. Do I wanna, any questions on those things? I think some of the homework, I'm going actually all the way to the next homework assignment. So that's maybe a good thing. You can just do both and be done with it. But yes. So you say a small change of initial conditions, it's gonna, by a lot, that makes it chaotic. But the question is, how much does it need to be altered before it's considered chaotic? What is the, I mean, because I could alter some dynamical system, some initial condition, and it'll change how steps are gonna be, but maybe not as much to make it quote chaotic. So what is the defining attribute that makes these systems quote chaotic? Yeah, well, okay. So the precise definition of a chaotic system involves, yeah, it involves things that we haven't talked about, like Lyapunov exponents, I mean, things that are, so you can actually label the system as being chaotic. Now, heuristically, just talking about this, yes, you can have a very nicely behaved system that if you change initial condition by 1%, it's gonna cause the, whatever you observe to change by a large percentage, right? So that sensitivity number that we talked about, it can be large, so, right? Without the system being chaotic, okay? So I think the best way to think about it is, is to remember that if you lower, in those systems, if you lower from 1% to like half a percent, then typically that lowers the sensitivity, right? So that ratio is relatively constant, whereas in chaotic systems, you can have a very, very small change, and still the change in the observable is not diminished, so it's not, so, so that, you know, there's no number that you can assign to it to say a number is 500. The sensitivity is 500, wow, that's huge, right? But there's no number that it can actually assign to it. It's just, no matter how small you make the change, whatever you observe, still is, has a large, you know, large deviation. So this question here to see, and I think I caught you say this, a two-dimensional dynamic system cannot be chaotic. Yeah. Without it being actually going to visualize, why is that a simple answer? Yeah, well. Because I could, you know, make a simple answer. There's no simple answer. Yeah, in two-dimensions, for autonomous systems, so this is autonomous, right, but it's three-dimensions. So in two-dimensions, when you have a phase plane, that's why, you know, I said, I started with a P-plane, but then I moved to it from it. If you have a two-dimensional, right, and you just plot these things, the types of behaviors that happen in two-dimensions are very limited. There are steady states. I'm talking long-term behaviors. There are steady states, so if you start on point, you stay on point, then there are stable equilibrium, right? Where actually, this is a bad example. This looks like some sort of octopus here, I mean, sepia, right? So let me pick a different one. Anyway, so for instance, for a van der Poel, you have steady states, you have stable or unstable equilibrium, then you have these limit cycles, right? The point is that you are bound by these features of a dynamical system. So for instance, this particular dynamic system has these features. It has one unstable equilibrium, and then it has a limiting cycle, which is stable. So anything else does one of these two things. Well, it actually does one thing. It always goes towards a limited cycle. So in that sense, it doesn't matter where you start, you use same limiting behavior, right? So it's insensitive to initial conditions. All right, then it's go to infinity. That would be better if it does that. No, no, so okay, so question is, if it shoots the other way, well, maybe there's another cycle outside that things go to. But we just don't see it, right? Because we don't plot it. And if it just goes to infinity, I mean, that's just, I don't know, that's a behavior. It goes to infinity, yeah. Which you just said that a two-dimensional system is insensitive to initial conditions. The limiting behavior of a two-dimensional system continues. But in a three-dimensional system, it is sensitive to initial conditions. So if you keep it in that sense, I mean, yeah. So if you can demonstrate that there is sensitive to initial conditions. Yes. Then you have... Exactly. Some sort of chaos going on. Exactly, but in two dimensions, there's actually theory, there's whole, you know, everything's kind of, that you cannot have that kind of behavior. It has to, you have to have another dimension so you can bypass these kind of limit cycles. If they exist or you have to bypass, okay? Anyway, it gets it kind of into a very, advanced area of, you know, dynamical systems. Even today, this is far from being well understood. For the simple reason that, like if somebody's asking you, you know, here's a system, okay, and it's not that simple, but it's still polynomial. So I give you a third-degree polynomial here. Like, remember that, well, this is third-degree polynomial. But maybe here, this is a fifth-degree polynomial, right? And find all the limit cycles. Find all the, find what can happen with the system, right? And very, very quick, you get two things that are not known. I mean, you can try, you know, I mean, you can plot things, right? But remember, you have a limitation because what if something like really big is happening outside, right? How would you know that? You don't know. So there are things that you can do with a computer, but things that you cannot do with a computer. So anyway, so the one interesting thing is though is that for discrete dynamical system, even in one dimension, you have this limiting behavior which is the sensitive to initial conditions, okay? All right. Last thing that I wanted to mention so that you can do your homework and I have one minute left is problem number four, which I assigned. No, I'm sorry, which one is it? Problem number five, chapter six, refers as it revisits basically number 10 of chapter four. And that's the infectious disease problem. So for the infectious disease problem, I just want to write down the system here. We talked a little bit, we said that in a population of 100,000 people, there are three types. There is susceptible, S of T, there is infected, I of T, and there is immune, that's C of T, okay? And I wrote the system before, but I didn't give you, I mean, just kind of to simplify this. So one thing that is clear is that the sum of the three at all times is 100,000. And the change in susceptible is proportional to the product between the two S and I. The change in I is again proportional to S and I with the same constant minus one third I. So one third comes from the whatever number of weeks. So I'm just writing this so you can just write this down. A is, the number A is 40 over 18 times 70,000. And again, this is because the initial susceptible population is 70,000. The initial infected population is the 818. So what you need to do is in this problem is, I think, just to simulate this dynamical system, okay? And again, answer the questions that are in that original problem. And keep in mind, because this thing, this thing always adds up to 100,000, really the third is, this is the second, this is a two-dimensional system. The third one is always determined by the other two. So you can actually, I think you can just take the first two, right? Time's up, so. All right, but anyway, these are the values that you can just use. So it's just a question of modifying that Welles code or ROC code. If you think that you did more than I asked in class. Oh, yeah.