143 - 1 - week 1- 1.6 - adams time-stepping schemes (9-41)

Download 143 - 1 - Week 1- 1.6 - Adams Time-stepping Schemes (9-41)

If you can't read please download the document

Upload: yeong-gyu-kim

Post on 24-Jan-2016

216 views

Category:

Documents


3 download

DESCRIPTION

week adams

TRANSCRIPT

Okay, so we're going to fit this, sohere's the big approximation.No longer exact, but if we do this right,we can maybe do something with it.These by the way are called Adam'sMethods.Generically when you cast it in terms ofcynical formulation.So let me talk to you about one classfirst, which is called Adams-Bashforth.What Adams-Bashforth does, it says tellyou what, how about we do the following.We will only use current time points andpass points to approximate that peak.You have to figure out how to proximatethat function P.So, how about we just make that as a rule?I can use the current point and pastpoints.Presumably, I know these things, right?So, part of the iteration is, the futureis what it is now or in the past, plussomething.That's it, okay?So let's say, for instance, the easiestthing to do is say, how about P(t, y).Now, if this isn't your favoritepolynomial to start with, then we need totalk 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 takethem out of the integral, and I got a DTleft and its just so awesome.If you gave me like a whole 100 of them todo, I could just whip them out.Love that.Okay.Now if we do this what constants should wepick?Well, how bout we pick.Y then?Sorry, solution, so it is, sorry.We'll pick this to be this followingconstant.We'll evaluate the polynomial.It's constant, just make it the value of Fat the current time.Okay so there's my constant.I fixed the time.I fixed the current time and I just plugthis 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 Iintegrate lower nb whole.Here is what I get.The way formula, same thing I got before.Great, so in some sense there's a sanitycheck that goes on here.Which is like hey, I've got something Ialready know.Alright, so let's get a little moresophisticated.My claim here is the higher polynomialpick, and this, by the way, happens alsowith the fourth-order Runge-Kutta.The higher, the more complicatedpolynomials you pick, the more accurate arepresentation of the solution you get.And we are actually very interested inaccuracy, and so we could say, well, let'sdo something a little bit more fancy thanthis.So, you might want to say okay, so let'spick something that looks like this, then.A line, after the constant, if you areforced 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 overtwo, okay?>> [laugh] >> Okay, after that it getsreally hard.Okay.But I like the constant, and so here'sgoing to be my line.Let me tell you what my line looks like.Remember, Adams-Bashforth, I can only usecurrent time points and pass points, so myline is going to look like the following.I'll explain where I got my line in aminute.I made up a line, that at time t of n, itgoes through the current point, y of n.And at time t of n-1, it went through y ofn-1.This kind of makes sense, right, becausemy solution was at y of n-1 and then itwas y of n.And maybe, others draw that line betweenthese things.It goes, so this line here goes through yof n-1, y of n, and let's try to make itgo through y of n+1.Now, I have to throw this in.Remember, this is the constant, this is afancy looking constant.There's the only thing I got to work,worry about that t right there.And I integrate that, and, remember, I gett squared of two.We just throw that in there, and Iintegrate, 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 littlebit of something and what is this littlebit of something?Well, it's three of the current solution,evaluation of the derivative at thecurrent time, minus the derivative, onetime ago.This is the formula times delta t thatgives me predictions for the future.Turns out this, if this, the accuracy ofthis is, this is a second order scheme sothis 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 thatlittle extra, I drop my error a wholeorder of magnitude smaller in respect todelta t.Okay?Now, the problem with this is, thisAdams-Bashforth scheme is that now,whenever I do iteration, I have to use thecurrent time and a past time.Alright?So past, present, future.So that's fine, but what happens if I justgive 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 leastat first, is do what's called a bootstrap.Which means you gotta get yourself asecond slice of time.And then, once you have two slices oftime, you can just motor on the way, allthe way forward.Okay.These are Adams-Bashforth.We talked about Adams-Moulton.I'll illustrate one example withAdams-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 thecurrent and past.This allows you to use the future.Now this is an interesting concept so I'mgoing to come back again and just say wellwhat'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 thisfunction F in the future.Now, plug that in.Here's what I'm going to get, y of m plusone is equal to y of n, plus delta t, fof.Now at first this would seem just sillyand dumb.Because you say, my future, is what it isnow, plus a little bit of my future, whichI 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 theseschemes, it's called an implicit schemebecause you have your future in it.You know you, you're trying to solve forthis but it's all wrapped up hereimplicitly.The reason people like this, these schemestypically have unbelievable stabilityproperties when it comes to the iterationscheme, okay?This is why people like these schemes.They're not going to go away becausepeople will do a lot to get that stabilityscheme, okay?Final comment.This is a problem.So, the final comment I want to make aboutthis is when you go to the future, usingthe future, you want to get the power ofthe implicit scheme, but without havingthis problem of figuring out, well, Idon't know what the future is.So people have come up with a calledpredictor-corrector methods.Here's how predictor-corrector works.There's just a simple example there at theend of the notes, we're now going to getto.But what it does it says, the problem is Idon't know that.So what I can do is I can say well, let metake my oiler technique which predicts myfuture so what I'll do is I'll firstpredict my future.So let's call this y of p.Now, I don't want to keep using thisscheme cuz it's unstable, often.But what I can do is predict this futurepoint.And what I'll do is use that value ofpredictor point in here then to correct myfuture.It's kind of like Terminator.>> [laugh] >> Okay?This is like the correction stage.I don't know how many correctors there arecuz now we're on Terminator four, right?And we really don't know the futureanymore I think.