 So, are there any questions? I have not been starting my classes with are there any questions? Some of the students I think. Okay, there are no questions. What we will do today is we are going to look at, I am going to do a couple of demos. We will see how much we are able to get through in this class and depending on what we are able to do this time around, we will spill over to the next class. Fine? The two sets of demos that I promised was one using a symbolic manipulation package, right? It is called Maxima. This is a useful package. I use it as in when things get a little messy and I need to use something. I typically learn, relearn whatever I need, I do it and then since I do not use it for a long time I tend to forget but there is a reasonable logic to it. So, I will just show you how this package works. I will spend a few minutes showing you how this package works and then we will look at the modified equation, right? For first order linear one-dimensional wave equation, maybe even for heat equation and we will see what happens if you add terms to it, how to go about, how would you use this package and how would you get all those terms, right? The second demo if you have a time will be the actual solution of the wave equation using FTCS, FTFS and so on. There is behavior that we have predicted saying that how the code is going to behave, we will see whether it actually behaves that, right? What do we expect, what do we get? So, let me just start with Maxima. I am running a version of it called WX Maxima. This is a public domain software that came out of a Maxima that was a commercial package earlier. It uses the WX front end which is the reason why it is called WX Maxima. What I will do is I will start that off and for the sake of these demos, of course I will give it an orange background. Normally it would be a beige background. The menus and all that are not important, right? So, I think all of you are able to see this reasonably well. So, what can you do with this? What is the point here? You can essentially do some kind of manipulation, right? So, you can x star x, 2 star x plus 1, you can manipulate in many ways. So, you can for example, say I am just doing this so that you understand what goes. So, percent basically means the last result, right? And all the results as you can make out, they are numbered. I do not know how well it will come out on the video, but they are numbered. But you can say factor percent which is the last result and indeed it gives you x plus 1 whole square, you understand? These are trivial things. I mean this is all school algebra. It is not a big deal. So, you can also define, you can define functions where you normally define functions. And what we want here is you can differentiate. f with respect to x once, right? You can differentiate, you can integrate. There are ways you can, of course, there are other things that I do not, I am not going to talk about right now which you may talk about in the future demo. You can basically do algebraic manipulation and calculus, okay? That is as far as, I will restrict it to that as far as we are concerned. There are lots of other nifty things that you can do that you can find out for yourself, okay? You can do Taylor series expansion for instance. So, you can say Taylor x star x and you can expand with respect to x about a, how many terms do you want? Three terms. And it will give you Taylor series expansion for, right? Whatever it is function that you will give, which is the kind of thing now you see where I am going. I am talking about modified equation. Taylor series is very important for me. So, yeah, you can define functions. So, you can just basically say even if you define say, g of x. So, if I say, if I take a derivative of and I do not, I, so this is an indeterminate function, the sense that I have not defined the function, right? g of x. And I define g with respect, I differentiate g with respect to x once. It gives me dg dx, fine? Okay. So, you can, you may say what is the big deal. It is just notation, but it is the ability to manipulate notation, which is what algebra and calculus is all about, right? It is the ability to manipulate symbols. So, because this d by dx is a bit cumbersome, right? I mean for instance, for example, if I, the reason why I say, so if I say, if I differentiate, what shall I differentiate? I will differentiate h of x, y with respect to x once, right? So, it should be a partial derivative. Of course, I could differentiate that result one more time with respect to y. So, I can say, diff that result with respect to y once, right? And the notation clearly gets messy. So, there is a package that will make it simple. I need it because I am going to use a time, I use this, right? In my little code that I have written for, there is a package called pdiff, partial differentiation, which uses a much more compact notation. So, effectively something like h of x, y, if I go back to this derivative, it will write the derivative as h and this one indicates this differentiation with respect to x. You understand what I am saying? And the 0 indicates it is not differentiated with respect to y. It is like the subscript notation, u sub x, u sub y, h sub x, h sub y. It makes life a lot easier. So, in a same fashion, if I were to use this, then it become, the second derivative becomes h11. It is more compact. Notation is more compact and that is the only reason why I am using that package, right? So, but as I said, the whole game is about notation. The whole game, the whole mathematics game is about notation and manipulating these symbols. So, yeah, so now we are set. So, what is it, what kind of, what do you want to do? You want to look at a modified equation. We can look at it for FTCS. I will show you a fragment of the code that I have written. It is not the cleanest maxima code, but I will show you a fragment of the code that I have written for FTCS modified equation, right? The code can actually be, you will see, you will understand what I am talking about. We will go through it. You try to get an, just try to get a feel for, right? I am not saying that oh, you have to go back and write maxima programs or something like that. That is not what I am saying. Just try to get a feel for it so that you understand the demos. That is all I want, okay? So, I go back here and in my directory maxima, I have, you can see various files that I have created called .mac files. And what I will do is I look at the FTCS.mac, okay? So, you can note, you notice I start off, I load the, I load the pdiff, right? I load pdiff. Then in line 2, I am setting up. So, I will do these maybe one by one and see what it does, right? So, you have, I have defined something called tu, which is the Taylor expansion for a function u of x, t or wave equation is in space and time u of x, t. I am asking for 4 terms in x and 4 terms in t, right? Okay? Up to the 4th derivative in x and 4th derivative in t. Basically, I want up to the 4th degree. I want to retain terms up to 4th degree. We have already seen that the 3rd degree, 2nd degree, 3rd degree, 4th degree, they have an effect, right? We have already seen that. So, let me, let me just get back here, stick that in here and see what it does. So, Taylor's, we will get the Taylor expansion, right? For this and it gives a mess. But it is not that bad. I mean, since you know Taylor's expansion and Taylor series expansion in two dimensions. So, I am expanding about the point AB. So, I have u of AB, time derivative times, right? t-b, the 2nd time derivative times t-b squared, 3rd time derivative times t-b cubed and so on, 4th time derivative times t-b to the 4th, okay? 1st spatial derivative times x, x-, where is that? 1st spatial derivative, or the x-a is outside. 1st spatial derivative, 2nd spatial derivative, 1st spatial derivative, 1st spatial derivative, 2nd time derivative, 3rd time derivative, 4th time derivative, 4 multiplied by x-a. And it is doing it in a systematic fashion. This is not how we would write it. This is not how it was introduced to you when you did Taylor series in multiple dimensions. But this is a program, right? So, it is doing it in a, you can see it is doing x-0 first and then x-1 derivative 1, derivative 2, derivative 3 in a systematic fashion, okay? So, as I said, so this is, yeah, this is the kind of thing that you could manipulate manually. You can do it manually, right? And I have actually done it manually. But it is also convenient to be able to do it in an automated fashion. And once you have confidence in that automation, you can at least sort of check out exploratory stuff you can do. So, I have defined something called TuA, which is a convenient term, which basically is the Taylor series expansion in 2D with x equals a substitute, you understand? Right? So, you are expanding only in time. Taylor series expansion only in time, x is substituted as a. So, as a consequence, you get something that is very small. Basically, get a Taylor series expansion in one variable, okay? I do not want to, as I say, I do not want to sort of vary out with this, but there is a TuB similarly and maybe I will just do TuB also. Just for fun, TuB and yes, x-1 is a, right? The same thing. You get expansion, you get an expansion of Taylor series expansion about the point, right? About the point AB, purely an x in this case, okay, in the x direction. Fine. Now, what I propose to do, what is, so let me stick with this for some time. I have defined a whole bunch of higher order mixed derivatives here. I tell you why I have defined them. I propose to retain only terms up to the fourth derivative. I do not want to track higher derivative terms, okay? The second thing is you remember from the modified equation. What you basically did was you substituted, you took time derivatives of the modified equation and substituted for those temporal derivatives in the sense that you are going to end up, if you keep taking time derivatives of the modified equation, you are going to end up with mixed derivatives, right? Modified equation has terms that are in terms of x and t and if you differentiate it purely with respect to t, then you will get mixed derivatives, right? And I want to just set, I want my objective is to use the modified equation itself and derivatives of the modified equation to eliminate all higher derivative terms in time whether they are mixed or pure derivatives in time, so that I have only t spatial derivatives on the right hand side. The only temporal derivative I have is dou u dou t, that is what I want, that is the objective of the modified equation, okay, for this setup. So all the other derivatives I want to set them equal to 0, these are various powers that you get for mixed derivatives. So I am defining them so that at a later date I can say if this term occurs set it to 0, okay. That being done, now say all of this is just what I would call setup time, then I define 4 quantities, upq, so just read it the way it is written upq, I substitute upq, does that make sense? You want me to show you what upq is? Upq I will run that, so the point pq is at the point ab, right? Okay, so upq is basically uab, is that fine, fine, we are approximating the differential equation at the point ab, right? So upq is uab, okay. So up plus 1q, so I have a funny notation here, up plus 1q, p plus 1 means x is a plus delta x, right? p minus 1 means x is a minus delta x, that is the next one, p minus 1 means x is a minus delta x, right? Upq plus 1 is b plus delta t, fine? So this looks familiar, this looks like what we have been doing so far, sigma that is s is the speed of propagation in this case is l, l delta t by delta x, that is sigma, I will go to the next page. I do have a lot of messy stuff, let me see if I can get you something that you can see, yeah, that is the one you do to be, there you go. And this is what we have, so upq plus 1, ftcs is upq minus sigma times up plus 1q minus up minus 1q divided by 2, fine? That is ftcs and after this it is all a matter of substituting Taylor series, so that is what I am doing now, when I define this ftcs, I substitute Taylor series into ftcs. So what I will do now is instead of painting you by cutting and pasting, I am going to run that batch file. I will just run the batch file and we will get the modified equation right at the end and then I will tell you what it is that we have done. So ftcs, I open it, it runs through my script and comes to the end. This needs a little explanation because I made some substitutions and all of that stuff. In fact, you can see that up here I have substituted for the fourth derivative, third derivative and second derivative. I have called them f4, f3, f2, that is an operational reason, it makes it more compact, so I have just called them f4, f3, f2. So the fourth derivative with respect to x is f4, the third derivative with respect to x is f3 and the second derivative is f2. Is that fine everyone? Okay. So here we have it. What is this? l dou u dou x, right? I hope you understand now that this is l dou u dou x. This term is l dou u dou x. This is dou u dou t. So what I have on the left hand side is my linear wave equation, dou u dou t plus l dou u dou x. What I have on the right hand side is the terms that I have carried so far. There is a fourth derivative term, there is a third derivative term, right? This is the fourth derivative term. This is the third derivative term and there is a second derivative term. There is a divided by 12, so you have to appropriately take care of that. Is that fine? Okay. So the cheat sheet that I used that day and wrote it out was basically from here, right? Okay. I just basically took it from here and wrote that out. Let us look at but see how did this come? How did we get here? So if I type, if I go to FTCS which I have defined right in the beginning, right? So this FTCS is basically a substitution from the various terms, right? In our discretization and from there I have created the whole series. I have solved for dou u dou t. I have solved for dou u dou t because I need dou u dou t, right? I have to get dou u dou t differentiated once. I get dou square u dou t square, substitute back. Differentiated one more time, get dou cube u dou t cube, substitute it back, right? And I systematically go through trying to eliminate and each time I get, what do I get? Each time I get a dou u dou t which does not have certain terms in it, okay? So I call dou u dou t, I call it u sub t or ut, okay? That is ut. So I solve for ut from the previous equation and this is what I get, fine? Okay? I am going to skip a few steps here because it will get you, otherwise I will vary you out. You will become very tired, right? This is too much detail. This is a lot of detail, right? So this is u sub t. I just want to show you. So if I go to ut one which I generate in between, so from u sub t, my very first one, what does it have? It has a third spatial derivative with respect to x, first derivative with respect to x, fourth derivative with respect to t, third derivative with respect to t, second derivative with respect to t. When I come back, by the time I have come to ut one, something funny has happened. The second derivative with respect to t is gone. That is what I did. I eliminated it. The 0, 2 term is gone. If you stare at it long enough, you will see it, right? The 0, 2 term is gone. But I have been gifted in exchange for that 1, 1 term across derivative term. So now I have a headache. That is the reason why this is a, this is a pain. You have to be systematic. You have to be organized, right? I managed to get rid of the time derivative, the second time derivative but I have got a mixed derivative. So now I have to take the dou u dou t differentiated with respect to x and eliminate the mixed derivative. You understand? So you have to go through this in a careful fashion. It is like solving a system of equations. You have to do the elimination process in a systematic fashion. I will show you one more. Sometimes it is not quite an improvement, right? So you could sit down. So you can see that I have the second derivative. I have a third derivative which is mixed. I have a, I am sorry, a fourth derivative which is mixed, a fourth derivative which is mixed the other way around, right? Xt cubed and so on. Then I have all these other terms that I had. So I just eliminated, what did I eliminate? I eliminated the 1, 1 derivative, right? So you can see that you go through systematically eliminate all of these and every time you differentiate you get a fifth derivative term which you do not want. You set it equal to 0, right? Every time you differentiate once you will get a bunch of fifth derivative terms but you know the nature of those terms. There are only so many terms. You set them all systematically to 0, right? That is what I have done. And finally you got the modified equation, is that clear? Right? If you were to do it manually that is what you would do. You have to be very organized, right? In fact, I apologize for my last quiz but it was a very quiz because you have to, there are a lot of key strokes involved, right? So if you look at, if you look at the time that you have 3000 seconds and the number of key strokes that you had to do, you will see the key strokes per second was quite large. I mean that fraction, it was a fraction but it was quite large. That is the key. So it gives you an appreciation for, it is an anticipation of demos like this. It gives you an appreciation for why we use these kinds of things, okay? It is a headache. You cannot, we cannot sit down systematically do, right? A whole set of these calculations manually, right? It takes a lot of effort. It takes a lot of care, fine? Okay? So yeah, that is basically what we have. In fact, I was just thinking whether I should narrate experience of my own as a student. I was given an assignment to teach me the same lesson. Of course, you had it sort of in the quiz to do the determinant of a 7 by 7 matrix by hand. I was supposed to do it the long way. It was an assignment, 1 out of 15 assignments. I was supposed to do it the long way and show all calculations. 5040 calculations. I learnt a lesson. I cannot do 5040 calculations in a row without making mistakes. I did it once. I got a number. I was not sure. I did it a second time. I got a different number. So then we do the standard engineering test. Do it a third time. It has to match one of these. It did not. Not only it did not match one of these, the numbers were diverging, right? So at that point, I stopped saying that. So my assignment basically said, which apparently what the teacher was looking for. The conclusion I had was I cannot do 5040 calculations in a row without making a mistake, right? So there is, but you have to, but when we do symbolic manipulation, you can be a little more careful because there are patterns. These kinds of things we can do actually. There are patterns. But a package like this will get rid of the drudgery, right? But I would always cross check, right? I would always cross check. Is that fine? So we have FTCS. If you want to see that, I can show you a few more of these. So the penultimate. So you go to UT8. You see my God. Before it simplifies, it gets really bad, right? Here now I have made substitutions, differentiated, made substitutions. You try UT9, right? So there are a lot of these, but this is just near that. And finally, let me see if I have an MW. So that is a modified wave equation. I have already simplified it a little, right? And then I decided that I wanted to gather terms, collect them and put them in a little more easier fashion, which is why I created the way F2, F3, F4 so that it came out in a compact fashion, right? So that is the sequence basically. You sit down, you systematically eliminate. And as I said, I am sure there are better ways to write this program than the way I have written it. Are there any questions? So this is a pretty straightforward demo. I mean, it is not, there is nothing spectacular about it. I can try, if you want me to try another, if you want me to try something else, we can look at FTFS okay. And FTFS gives you, because I have shown you these terms. So this is the second derivative term here, right? Second derivative term. Second derivative term is multiplied by sigma-1, right? A sigma-1 in our notation. I used L here because when I was doing this derivation, I was talking, I was using lambda, dou U dou t plus lambda dou U dou x. So you can see that the terms, but these in this case, I am using the modified equation to eliminate the higher derivative, higher order temporal derivatives, okay. So you could also do it using the wave equation. So that is something that you can try out, right? So that is the third derivative term. So you know that any scheme that does this is going to be dispersive. It is going to be unstable because there is a negative sign in front of the second derivative term. FTFS is unstable. It is going to be dispersive because it has a third derivative term, right? The existence of the third derivative tells you it is dispersive. And the existence of the fourth derivative with a negative sign could stabilize it, but we do not know. Our analysis showed that it is unstable. We have to actually run it to see what happens. Is that fine? You know? Shall we look at something else? What would you like to look at FTBS? I think it is something that we have done. So there is FTBS. And again, just to bother you one last but one time, I am going to do this one more time. So you have the wave equation there, dou U dou t plus l dou U dou x. FTBS as we suspected has a fourth derivative term. It has a third derivative term. It is dispersive. And yes, it has a second derivative term. There should be a negative sign outside somewhere here. That is a sigma minus 1 minus 12. Where is there a negative sign? Unless I made a mistake. Yeah. Anyway, that is something that you can, that is something that you can check up. Off-hand, I cannot seem to make it out. Right? You can look at that. You can look at that file. So FTBS dot mac upq minus up minus 1q, right? And I am substituting, I am solving for this term there. I am actually solving for dou U dou t, right? From the FTBS term. Is that fine? Okay. So yeah, indeed I am doing FTBS. It is a long painful equation in painful program. But you finally get to get here. Let me look at Mw1 just to make sure that I do not have a problem. Yeah, this is one of the reasons why I do the factoring because you get these terms that are, so this is positive, that is negative, a, oh yeah, fine. This is, yeah, this is sigma minus 1. It is not 1 minus sigma. Sigma minus 1. Sigma is less than 1. As we are negative sign, negative sign in there somewhere. Okay, fine. For a minute there I was a bit concerned. So if you look at the earlier one, see, you should not just let me get away with this, right? That is, so if you look at the earlier one, if you look at the one we had, oops, that is going to take some. Let me do FTFS just to convince you that I am not cheating you. The sigma minus 1 is what does it? So I go through do FTFS and here it is a sigma plus 1. That is the thing, that makes a difference. That sign makes a difference, right? Sigma is less than 1, so for stability. That is where that condition comes from. Okay, so yeah, so you can get the modified equation. What else can you do with this? Well, I have one file that I have created just for this reason and if you want we can play around with that file or we can, so I have got something where I have added artificial dissipation. I have something where I have added artificial dissipation. I am doing the same and you can see that what I have done is I have added a sigma squared UP plus 1Q. I will just select that a sigma squared UP plus 1Q minus 2UPQ plus UP minus 1Q divided by 2, fine? I am just doing FTCS. I just add that extra term and then you can ask the question what happens to that. You can actually ask the question what happens to my, what happens to FTCS if I add that extra artificial dissipation term. That is the neat thing here. Now we can do this what if kind of, right? You can play around and what happened? F2 disappeared, the second derivative disappeared. So I figured out that term that I added was exactly the term that I needed to add, sigma squared by 2, second derivative, discretization of second derivative. But that is not the term that you get with the modified equation. There you get some sigma minus 1, right? We just saw that, minus 12, minus half sigma minus 1 by 2. What is the deal? Am I making sense? See if you add a second, so you have to realize this. If you say that I am going to add a second derivative term, you look at the modified equation, you look at the modified equation and you say, aha, there is a second derivative term. So let us look at the modified equation again. I will go back and I am going to just rerun the modified equation because this just generates a lot of, okay. Maybe I have, is it FTBS modified equation? Is that what it is called? Yeah, there we have it, okay. So there is a 12, remember there is divided by 24, so it is a half. So you can say, wait a minute, why do not you add a times sigma minus 1 divided by 2, dou squared, you dou x squared. That is what you should add to eliminate the term. Why do not I add that? Why am I adding something else? Does the question make sense to you? Do you understand what I am saying? I want to eliminate this term. I want to eliminate this term. In order to eliminate that term, I should just add that term to the modified equation. In order to eliminate this term, how come I am adding some other term? The key is, the key is in my discretization, I never add dou squared, you dou x squared. I do not add the F2 term. I add a discretization of dou squared, you dou x squared. Now I have a new discretization. I find the modified equation for that. Am I making sense? So the, am I making sense? I find the modified equation for the discretization of dou squared, I do not add dou squared, you dou x squared. I add a discrete representation of dou squared, you dou x squared. I do not add dou squared, you dou x squared. It is important. I add the discrete representation of dou squared, you dou x squared. I get a new improved modified equation which will still have the second derivative term. And if I go through systematically, I say, okay, I will add that, add that, add that and I keep on adding extra terms. All of those terms will combine into sigma squared by 2 dou squared divided by dou x squared. That terms out to be the modified equation term that you get if you were to use your original equation. That is what I was trying to say. I want you to, you need to think about that. You need to think about this. It is not that difficult but it is because there are so many different equations that are there, you have to be able to knock it out. I mean you have to be able to figure out how you can knock out that term, okay. So my suggestion is if you try this out, you know how to knock out the second derivative term. See if you can figure out how to knock out the third derivative term. I have knocked out the second derivative term. See if you can figure out how to knock out the third derivative term. Is that fine? Are there any questions? So yeah, this is basically what we have as far as this is concerned. If there are no questions, maybe then I will go on to the solution of the equation and see what is the effect that these modified equations have on the solution of the equation, okay. So to that end, unless you mean, unless you want to try adding other artificial dissipation terms to see what happens. If you want to modify this thing and see if it makes a change, if you want to add any other term, you can add any other term. Maybe we will do that. Why do not we do that? Before I go on, let me just edit, I will change this, okay. So I will copy that ftcs underscore artificial dissipation to ftcs, I will just say NPTEL. It looks like I do not have a enter in the last term. What do you want to do? You want to make this sigma minus 1 and see what happens, right. That is what we had. We will make it sigma minus 1 and see what happens. Maybe I should have done that first, but anyway it is okay. Next time I do this. Insert f bracket s minus 1, 1 minus s because I have a plus sign in the front, okay. Fine. Everyone, that is what it is. Speed into 1 minus s divided by 2. I would not save it, I will just write it. In case you want to make a change, let me reload that batch file and see what happens. So I called it ftcs. Yeah, it got a lot messier. Modified equation got a lot messier, right. There is the 12f2 term that is still there, but this is what happened. And that does not look like it is going to cancel. It does not look like anything is going to cancel that. It is making sense. So as you can imagine, as you go through each time you made, so you can now potentially turn around and say no, no, I will add this term. Go back and say I will add this term to it, fine. That is what I meant. So in order to get rid of it, you have to find out the actual term that you need to add in a discrete form. You want to find the actual term that you need to add in a discrete form that is involving p plus 1, p, p minus 1. What are the terms that I need to add? Linear combination of p plus 1, p, p minus 1, so that the modified equation does not have a secondary. That is really the question we are asking. And it turns out that it comes from sigma squared by 2 to the square du du x square for the wave equation. For the wave equation you will have to figure out what it is. Is that fine? Yeah, there was one other thing that I promised to do for you. I mean unless you guys want to try something else out, I will go ahead. I do not know. What was the difference between FTBS, I mean central space, central difference and forward difference, do you remember that? That was just a sigma by 2. Sigma by 2 into a delta x actually. So let us see. So we have a sigma star dx by 2. That is what it was. If you go back and look at it, that is what it was. I will write that file. See if it makes what it does. So I run the batch file. I will run it again. And this is what you get. Hang on. Let me make sure that am I doing this to FTCS? Yeah, I am doing it to FTCS. Fine. Okay. So this is what I get. Does this look familiar? Right? You look at this. Let me see if this works. Percent minus FTBS modified wave. I am not sure if I have done that right. Sometimes let me just look at FTBS modified wave. FTBS modified wave should basically give me that and that are essentially the same. Okay. Here I seem to have some extra terms that I will have to possibly simplify. Question? Okay. So yeah, maybe I will get back. I will do FTBS minus modified wave. See what it is doing. Okay. So if there are no questions, what I will do is I will just start over. Yeah, I am sorry. There is one last thing that I wanted to do which was something that I have not done in class. This is a modified equation for the heat equation. Modified equation for the heat equation. And there is a reason why I want to do this. I am doing this simply because when we did the modified equation for the wave equation, right, I connected up the stability analysis, the linear stability analysis that we did for the wave equation for FTBS, FTFS, FTCS. I connected it up with the modified equation and the various terms appearing in the modified equation. Okay. And I basically showed that if the second derivative term was negative, the coefficient of the second derivative term was negative. That is the second derivative term was, right, what you are adding was negative, that you are, you had instability, that it corresponded, right, those corresponded. So I may, I do not want to leave you with the feeling that, oh, I just have to do the modified equation, which is a mess, but I just have to do the modified equation and I will get the same stability condition that I get with the linear analysis, linear stability analysis. Okay. So to do that, I know an equation where it does not actually work out exactly, that is the heat equation. So we will do the modified equation for the heat equation, so that you will actually see that, you will actually see that that does not work. So I run the modified equation, so this is just sort of thing streaming past. Heat equation is very simple, right. It does not have the odd derivative terms, nice dissipative system. Heat equation is very simple, dou u dou t, that is the first term, dou u dou t – l dou squared u dou x squared, that is heat equation. Equals, there is no third derivative, no dispersion, they are not going to get dispersion, it is not there. And you get a fourth derivative, right, you get a fourth derivative, am I making sense? So you can ask the question, the fourth derivative and now for stability the fourth derivative has to be negative, there is a negative sign in front, so you can ask the question, when is this positive, when is this, when is this thing in the brackets positive. And it does not give you the same stability condition that linear analysis gave us. The von Neumann stability analysis that we did by substituting exponentials, cosines and sines, gave us a one half, this seems to give us a one sixth, am I making sense? Okay, so you have to have an awareness. So if it is less than one sixth it will work, but you can actually go up to one half. The guarantee still works, if it is less than one sixth, yes it does work. It is just that you can actually go to a larger value. Okay, so that in itself should give you a clue about these stability conditions, what they mean, what is the analysis, what is the result that we get, what do we expect from it? Okay, what do we expect from the behavior? Fine, okay, so I think I leave it at that, of course this is the fourth derivative, so you expect that as it gets small it is going to get really bad, okay. And we will remember this one sixth maybe when we run, when we run our codes. Okay, let me now go to, let me now go to the, I will just start off the other demo, we will most probably not be able to finish it in this class, we will go on to the next class, right. Let us start off the second demo. This is for the wave equation, right, I have over the years these demos have evolved and now finally I have added a small sort of user interface to it, not a big deal. So what I will do is I will run the demo and we will see how far we can take it in this class. So let me quickly get that bright thing out of there, okay. Yeah, so this is what I can do, so some of this may not come out because the font is quite small, I was not able to figure out how to make the font larger right now before this demo, so it does not matter, maybe I will be able to fix it but anyway we will see. Right now it is ready to run FTCS, okay. The number of grid points is 10, that is what is set here. The number of time steps that I take at every time I click this go button is one time step. The CFL that I am running for, remember what I told you, so people you typically ask what is the CFL condition for which, not condition, what is the CFL for which you are running. That sigma is 1 and this other stuff I will tell you what it is later. So there are no scales because actually I do not care, I just want to see behavior, right. There are no scales, I have not bothered with scales. So that is the initial condition is a step, right. So with that initial condition of course if you have 10 grid points or what are that, you can only represent a ramp, you cannot actually get a step, right. By increasing the number of grid points you can make it better. But this is FTCS, so what was the expectation that we had FTCS? It is going to diverge, it is going to diverge, second derivative was negative, there was a third derivative. It is also going to be dispersive, okay. It is also going to be dispersive. So the question is, is it going to diverge? Yes, it is already gone above 1. So it is going to diverge and it is wavy, it is all I can say, I mean something that started off as a ramp now has waves in it. So it looks like it is dispersive, so maybe that is true, maybe that is a fact. Let us take more grid points and see what happens. So instead of 10 grid points, I will take 101 grid points. Let me reset that. I take one time step. Because I have more grid points, my ramp is closer to the step, I have a step function, it is much closer to the step. So if I take one step at a time, you know, of the first two steps it looks like it works but afterwards it is just not going to work and you can see indeed it is, I mean it is like you have a rope and you are shaking that rope. I mean it is really oscillating. I have not bothered rescaling nothing of that sort. I do not care if it is off the scale. When I start with 01, I already have problems, right. I already have problems. So indeed it oscillates. So there is not much that we can do. Can we take a smaller, you think maybe if we take a smaller time step it may work? In mathematics it is unstable but do you trust it? If I take a smaller time step would it work? So let us try 0.1. I will reset. If I do not reset it will sort of continue with that which is not what my intention is right now. That is 0.1. Well 0.1 basically means I am taking one-tenth of a time step. So maybe I will take 10 time steps at a time. So yeah for a minute there, for a minute there it looked very open but it does not look like there is one thing that is happened though. It is not diverging as fast. So the dispersion is becoming much more clear right because the coefficient in front of the second derivative term is small. It is going to diverge. It will eventually diverge, fine. It will eventually diverge but because the coefficient is small it is not diverging that quickly fine. So but it looks like the dispersion is very clear and you can actually make out that what started off what should have been a step function or what could have just diverged right. The values could have diverged is in fact oscillating. Is that fine? I will choose as I said in the next time that we do it I will choose a more what should I put it in the next class when I do continue with this demo. I will choose a more I mean I have a tuned set of I can tune this. I will choose and just for fun there seems to be some sinusoidal something riding on top of right. So you have to order what is that? So it does have to do with it does have to do with the fact that the scheme is dispersive that that is happening okay. It is not an illusion it is there. That is not an illusion you may think oh it is an illusion it is not an illusion it is actually there. Is that fine? Okay just so that we do not end this day with your disappointment okay. I will run FTBS right. We will run FTBS and from what I told you FTBS with sigma equals 1 was supposed to have worked. They do FTFS or I did FTFS. I will do FTFS in the next class FTBS with sigma equals 1 I want to leave FTFS see whether you guys can predict what is going to happen right. So before we work last word for the day we will run FTBS with sigma equals 1 first let me take 1 time step at a time reset it oh it is a ramp but that is the way it should behave 10 time steps right that step no distortion in that ramp but it is a ramp right. So you say wait a minute how do you know that it is let me run 50 steps. So if I run 50 steps it should come half way right I will reset it run 50 steps yeah it comes half way goes right up to the end just to the end okay. So I am picking up the propagation speed I am actually picking it up exactly is that fine okay. So when we come back in the next class I will run the rest of the we will see we will try to explore what happens with numerical solution to wave equation and the lots of lots of nooks and crannies that we have to look at lot of okay fine right thank you.