No longer exact, but if we do this right, we can maybe do something with it. These by the way are called Adam's Methods. Generically when you cast it in terms of cynical formulation. So let me talk to you about one class first, which is called Adams-Bashforth. What Adams-Bashforth does, it says tell you what, how about we do the following. We will only use current time points and pass points to approximate that peak. You have to figure out how to proximate that function P. So, how about we just make that as a rule? I can use the current point and past points. Presumably, I know these things, right? So, part of the iteration is, the future is what it is now or in the past, plus something. That's it, okay? So let's say, for instance, the easiest thing to do is say, how about P(t, y). Now, if this isn't your favorite polynomial to start with, then we need to talk but, think about it for a minute. Let's just do the following. That's the simplest polynomial ever, constant. Now I love to integrate constants. I don't know about you, but I just take them out of the integral, and I got a DT left and its just so awesome. If you gave me like a whole 100 of them to do, I could just whip them out. Love that. Okay. Now if we do this what constants should we pick? Well, how bout we pick. Y then? Sorry, solution, so it is, sorry. We'll pick this to be this following constant. We'll evaluate the polynomial. It's constant, just make it the value of F at the current time. Okay so there's my constant. I fixed the time. I fixed the current time and I just plug this here in to here. Now this is a constant, it comes out. I just got to a t, I have a delta t left. When I just push this in here and I integrate lower nb whole. Here is what I get. The way formula, same thing I got before.
Great, so in some sense there's a sanity
check that goes on here. Which is like hey, I've got something I already know. Alright, so let's get a little more sophisticated. My claim here is the higher polynomial pick, and this, by the way, happens also with the fourth-order Runge-Kutta. The higher, the more complicated polynomials you pick, the more accurate a representation of the solution you get. And we are actually very interested in accuracy, and so we could say, well, let's do something a little bit more fancy than this. So, you might want to say okay, so let's pick something that looks like this, then. A line, after the constant, if you are forced to pick a polynomial to work with, pick a line, okay? Alright cuz I can still integrate a line. You integrate T, you get T squared over two, okay? >> [laugh] >> Okay, after that it gets really hard. Okay. But I like the constant, and so here's going to be my line. Let me tell you what my line looks like. Remember, Adams-Bashforth, I can only use current time points and pass points, so my line is going to look like the following. I'll explain where I got my line in a minute. I made up a line, that at time t of n, it goes through the current point, y of n. And at time t of n-1, it went through y of n-1. This kind of makes sense, right, because my solution was at y of n-1 and then it was y of n. And maybe, others draw that line between these things. It goes, so this line here goes through y of n-1, y of n, and let's try to make it go through y of n+1. Now, I have to throw this in. Remember, this is the constant, this is a fancy looking constant. There's the only thing I got to work, worry about that t right there. And I integrate that, and, remember, I get t squared of two. We just throw that in there, and I integrate, collect terms. What do you get? I can get something a little fancier. We will write right here. Y of m plus one.
I'll write it and then I'll explain it.
There, the solution in the future. It is what it is right now plus a little bit of something and what is this little bit of something? Well, it's three of the current solution, evaluation of the derivative at the current time, minus the derivative, one time ago. This is the formula times delta t that gives me predictions for the future. Turns out this, if this, the accuracy of this is, this is a second order scheme so this here is first order. So your error is going to be, globally. It's called, delta t. This is delta t squared so by doing that little extra, I drop my error a whole order of magnitude smaller in respect to delta t. Okay? Now, the problem with this is, this Adams-Bashforth scheme is that now, whenever I do iteration, I have to use the current time and a past time. Alright? So past, present, future. So that's fine, but what happens if I just give you an initial condition? I say, here's the solution at time zero. How do you start the scheme off? It requires two slices of time. There. So you can't see two from there. There. Two. Okay. Two slices of time. That means, what you got to do, at least at first, is do what's called a bootstrap. Which means you gotta get yourself a second slice of time. And then, once you have two slices of time, you can just motor on the way, all the way forward. Okay. These are Adams-Bashforth. We talked about Adams-Moulton. I'll illustrate one example with Adams-Moulton. Adams-moulton has the following rule. You are allowed to use the future points, the current point, and the past points. Okay this one only allows you to use the current and past. This allows you to use the future. Now this is an interesting concept so I'm going to come back again and just say well what's my simplest constant I can pick? Well, how about the following constant.
Since I have to use the future points,
what I'll use is use, evaluate this function F in the future. Now, plug that in. Here's what I'm going to get, y of m plus one is equal to y of n, plus delta t, f of. Now at first this would seem just silly and dumb. Because you say, my future, is what it is now, plus a little bit of my future, which I don't know. Right? This is kind of doesn't make sense to you. Why do people come up with these schemes? The reason people come up with these schemes, it's called an implicit scheme because you have your future in it. You know you, you're trying to solve for this but it's all wrapped up here implicitly. The reason people like this, these schemes typically have unbelievable stability properties when it comes to the iteration scheme, okay? This is why people like these schemes. They're not going to go away because people will do a lot to get that stability scheme, okay? Final comment. This is a problem. So, the final comment I want to make about this is when you go to the future, using the future, you want to get the power of the implicit scheme, but without having this problem of figuring out, well, I don't know what the future is. So people have come up with a called predictor-corrector methods. Here's how predictor-corrector works. There's just a simple example there at the end of the notes, we're now going to get to. But what it does it says, the problem is I don't know that. So what I can do is I can say well, let me take my oiler technique which predicts my future so what I'll do is I'll first predict my future. So let's call this y of p. Now, I don't want to keep using this scheme cuz it's unstable, often. But what I can do is predict this future point. And what I'll do is use that value of predictor point in here then to correct my future. It's kind of like Terminator. >> [laugh] >> Okay? This is like the correction stage.
I don't know how many correctors there are
cuz now we're on Terminator four, right? And we really don't know the future anymore I think.