I didn't spell out the precise equations for this assignment, but I hope it's obvious to you.
We're talking about Newton's gravitational law. You know, an inverse square attraction.
And of course, the gravitational constant is one. I don't mean you to use physical quantities.
So if there's any doubt about that, check with me or to.
But the obvious interpretation is the interpretation I want to pass around a few books, tell you about a few books.
So a numerical Modise is a very well-developed subject with a number of outstanding textbooks,
and this is only a fraction of those that I'm aware of that the authors are listed in the lecture notes online, so you can get more details that way.
For example, there's a very nice one by Griffith and Higham.
Numerical methods for ordinary differential equations. Pass them along.
Perhaps a bit more advanced. There's one by default heart in born of modern scientific computing with ordinary differential equations.
One of the themes of this subject that we won't really talk about is so-called differential algebraic equations,
which is when you mix A.D with some algebraic conditions.
So it's as if some of your time scales are infinitely fast in your body.
So. DS That's called, and this is a textbook by Asher and Petzold,
which talks about days as well as holds computer methods for ordinary differential equations and differential algebraic equations.
There's a wonderful pair of books, thick and forbidding, looking by Hira, Noor, Sid and Varner, which are just wonderful.
These are called solving ordinary differential equations one and two.
They're, of course, more advanced with all the numerical analysis of this field is summarised in here.
But what makes them so much fun is the historical flavour here.
These guys love to quote from the original authors.
You'll find Euler in Latin and Gauss in German or in pictures everywhere, many of them copied from old papers.
There's a wonderful zest about these books, which to my mind,
represent how much fun academics can be because these are academics studying an important subject, enjoying the scholarly aspect of that subject.
The final two books I mentioned have the theme that they combine oldies and please and show you some of the analogies.
So this one is by Aria Isserlis at Cambridge called a first course in numerical analysis of differential equations.
So he doesn't say ordinary or partial because he's doing both.
And finally by Randy Levick at the University of Washington in the USA.
Again, a book that touches upon both finite difference methods for ordinary and partial differential equations.
So some fields don't have a lot of good books. Other fields are very lucky and numerical, so is certainly one of the lucky ones.
Okay. So today we're going to talk a bit about what it means for numerical schemes to converge.
This is certainly not a theory course, but we will mention some of the conclusions of the theory.
So we're going to begin by talking about the crucial notion of order of accuracy.
It's all about how the accuracy of a numerical scheme improves when you shrink the time sack.
So let me remind you that our standard picture for solving an OBE numerically is that we have a time axis and we this ties five
in the first instance taking equally spaced point so t sub north and then t sub one equals k and t to equal to k and so on.
Where K is the time step? Some number bigger than zero.
The equation we're trying to solve is you prime equals f of t u.
So that's our ordinary differential equation. F could be a linear or a nonlinear function.
It could depend on time, explicitly or not. It certainly will depend on you if you want the problem to be interesting.
If it didn't depend on you, this would just be an integral, not a nobody.
And for an initial value problem, we will also have an initial condition, namely you.
At the time zero is equal to some initial value.
So these two between them represent an initial value problem and two discrete times
that we replace the derivative by some algebraic approximation to a derivative.
So let me say loosely what the definition of order of accuracy is.
So we say that a numerical scheme and to be specific, we're always really talking about running a cut-off or a multi step scheme.
So we have a numerical formula for an initial value problem.
And loosely speaking, we say it has order of accuracy.
P Order of accuracy.
P If. The errors you make when you use the scheme are of size o of K to the p.
But not to the plus one. As Kate goes to zero.
And of course, this is not a precisely stated condition,
but I should at least emphasise that you'll only hope to see this if you have a problem sufficiently smooth.
So let's say for sufficiently smooth problems.
So if you have a solution that looks like this with discontinuities in the derivative, then of course you won't expect to get fixed order conversions.
But for a smooth problem, if your formula is good enough, you would expect that.
So there's our loose definition of order of accuracy.
Of course, all of this can be made very precise. Whenever you compute, you can do experiments to observe this kind of thing.
And I want to begin with one of those. So the first computation will show uses this equation.
So if you prime equals the sign of 40 times t times you with you zero equal one.
So that's the example I want to show you now. And this is the code and 26.
Okay. So let's see. Taking a look at em, 26 first on the handout, what you see is the first bit of text in which we solved the problem, as it were.
Exactly. And the way we do that is by calling MATLAB code four or five, which is a pretty accurate solver.
And we specify a tolerance. There's a relative tolerance and an absolute tolerance.
We set them both to the minus eight in the homework assignment.
In order to be confident in your solution, you better fool around with tolerances a bit.
So this is an example of how you can set tolerances in MATLAB.
So we compute the exact solution, and then we go into this bit of code where I forget the can software and just do it myself with run a cut-off.
So these lines here in the middle of the code are the famous fourth order of running a cut of formula.
You see A equals, then B equals, then C equals then D.
Those are the four stages of the runner kind of formula. Then the four stages are combined in the next line u equals U plus,
so on we accumulate the results and at the end we show how they compare with the, as it were, exact solution.
So I'll do that in 26. So I started up and there's our exact solution.
And then every time I return, I'll get the result for a finer mesh size.
So the first time I type return, you can see what happens with a step size of 0.5.
We have a couple of steps and they have nothing to do with the truth.
Then we shrink the size to point to size, and still it has nothing to do with the correct solution.
Then we shrink to one eighth and now it's beginning to be in the right ballpark, if you like.
Then I think at the next step it's striking how much it improves.
So we go from a timestamp of one eighth to 1/16, and then suddenly you can see that we've caught the true solution.
Your first impression is that it's not so great,
but actually it's better than it looks because the dots are indeed very close to the red line and the plot just drive straight lines between the dots.
So when they cut with three or four points per wavelength is doing okay.
Then as we shrink the time, step further, it becomes much better than okay.
So there we are with 1/32. And now you can't see visually much difference between the red curve and the black dots keeps getting better.
1/64 looks like that and 128 looks like that.
So this is how things go when everything's working well and your functions are smooth.
When I press return now will see an error plot. So there you see the error at time.
One for these different grids. Ten. There's probably a mistake there.
That should be the minus of the log. So one half, one quarter, one eight and so on as you shrink the time step.
It takes a while to get in the zone, but once it's in the zone, you have a very clear K to the fourth convergence.
By the way, one of the things that bothers me about the rhetoric of numerical analysis is the word error.
Numerical analysis has this kind of an ugly reputation, right?
Nobody thinks of it as a beautiful field except me.
And one reason for that is that when people are talking about this stuff, they always use the word error.
You know, the error decreases like K to the fourth. It's such a negative word.
I wish people could talk about convergence instead of error. The convergence of fast.
And that's how fast it is. But we still talk about error.
I guess that's it for that exact.
So let's spend 5 minutes anyway, doing for once the kind of tailor series analysis you do to find out why a formula has a certain order of accuracy.
Roughly speaking, if I give you a formula and ask you to figure out whether it's quadratic cubic chaotic,
you have to grind out a bunch of Taylor theories, which isn't much fun, and I certainly wouldn't ask you to do that for the fourth order.
But you've had a formula on paper. I'm impressed that run it and Qatar did manage to do it.
Let's do a simpler example. So let me first tell you the general way one do this, one does this.
So how do we determine analytically?
The order of accuracy of a given formula. So the very loosest idea is that you plug in Taylor theory,
then cancel as many things as you can and see what you're left with to be a little more precise.
The notion that turns out to be fruitful is what's called the local truncation error.
And this means the error you get at one step.
If everything else had been exact. So that is to say, it's the difference between the computed value at a new timestamp.
And the exact solution at that time said the computed exact.
If you is a smooth solution to an Audi.
And. V and plus one is computed from exact previous data.
So. What do I mean by that? Suppose by magic.
The value we had for VN was exactly equal to the exact solution, and the value we had for van minus one was exactly equal to the exact solution.
And so. So if you've got everything correct up to a certain time and then you take one step using your formula,
the local truncation is the error you make at that step. Now in order to compute this.
As I say, the idea is to plug in Taylor theory. So a little more fully.
What you do is you replace. Things like Z and minus one and V and minus two, etc.
By Taylor series in your Formula Taylor series.
We're certainly not talking in this analysis about convergence of the series.
It's all a formal analysis which would indeed converge if your functions were smooth enough.
You plug in those Taylor theories and you cancel as many terms as you can.
And that gives you the local truncation error.
The local truncation error. And then.
If the local truncation error is o of K to the p plus one.
Then the order of accuracy. Is he?
So in order to get four rung a cut,
in order to show it has order of accuracy for you need to show that the local truncation errors looked like K to the fifth.
And the reason for that is when you do an integration, you take O of K to the minus one steps.
So let me explain that the global error, which is what determines order of accuracy.
So that's O of K to the P for some P, and that is, loosely speaking, equal to the local error.
Times. The number of steps, the number of time steps.
So if the local area is O of K to the P minus plat plus one, you're going to take o of K to the minus one timestamps.
So the global error you would expect to be a size K to the P.
So let's do this analysis for one example and we'll take the simplest example that isn't completely trivial.
I guess the Euler method is too trivial,
so we just go up one level from the Euler method and do the second Euler Adam's best fourth method as our example.
So remember, we had an infinite sequence of atoms dash forth methods.
The second order one. Looks like this.
It's the and plus one equals v n plus k over two times three.
Fine. Minus F and minus one.
And I remind you that when I say fun, I mean f applied to the end at time in.
So that's the second order out of the best fourth method. Let's do this business of putting in Taylor theories to see how much cancelled.
So in order to keep things simple, let me abbreviate.
I'll write T for t to the end and I'll write you for u of t of n and do my Taylor series around ten.
So you add ten plus one.
By Taylor theories would be equal to you at time t plus k times u prime plus k squared
over two times you double prime plus k cubed over six times you triple prime.
And so. Paper series of you.
And similarly, the only f value we need at a timestamp other than n is n minus one.
So F and minus one.
The Taylor theories will be well, you prime equals F, so the zeroth order term is u prime.
Then the next order turn because it's time and minus k would be a minus k you double prime
then a plus k squared over to you triple prime and a minus cubed over six you find prime,
prime, prime. And so. So if I've got an exact solution, that's how the Taylor series will look.
And now I plug those in to that formula to find out how close this is.
To what the formula. So I compute.
Let's see. V and plus one. 42 that is equal to VNE, which by assumption is exactly right.
It's exactly you. And then we have K over two times this stuff.
So that's K over two times.
Now F n is exactly you prime.
So we have three new prime.
And then n minus one is this thing minus four and minus one means minus you prime plus q double prime minus k squared over two you triple prime.
And that's far enough. So now the question is, how close is that to that?
Well, let's see. If we compare you ten plus one and what the formula gives us, the use come out.
Correct. Now what about the next term, the Q prime term?
Well, we should get K times u prime. And in fact, we do get k times u prime k over two times to u.
So. That was cancelled property.
What about the next term? The case squared over to you.
Double prime. That's what we want to get. What do we get? Case squared over to you.
Double. So that one is correct to. So in fact, the next one is the first one where they don't cancel.
The difference between this and this is equal to that minus that.
And because one quarter is not the same as minus the sixth, they don't cancel.
So what we find is that the end plus one is equal to you at time end plus one minus five twelfths.
5/12 is a quarter plus a six times k cubed u triple prime and seven.
So there's our analysis of that is best for us to we find that the local truncation error is O of K to the three.
So the order of accuracy is two.
When I was learning this stuff as a graduate student, this is a thousand years ago.
One of the other students in the course was Bill Grob and the teacher was Gene Gallop.
And Gene said that anybody can use a symbolic tool like Maxima to do this analysis for linear, multi-step methods.
But I've never seen anyone use Maxima to do this kind of analysis for a runner, cut them.
And then he said, if anyone can do this analysis for the fourth order running kind of method in maxima symbolic computing.
They can have an A in the course. So Bill Group did that and got a new course and he later went on to invent NPI and all sorts of things.
He's a world famous computer scientist. He kept attending the course but didn't turn on any more homework, I think.
Okay. So there's our very superficial look at order of accuracy.
Now, let's take an equally superficial look at the business of convergence and stability, which is, of course, what we would like to happen.
We want the method to converge as the time steps shrink to zero.
So the history here is interesting, I emphasise that.
These methods go back many, many years sort of to Euler, but certainly to Adams in the middle of the 19th century.
So the idea of high order approximations to numerical ode to to odes is 150 years old.
But really, there wasn't any theory about whether these methods should converge or not.
Until the 1950s, after computers were invented.
That's when people started exploring all sorts of things and they realised they really had to understand convergence and stability.
On a computer. Suddenly you could talk about a 20th order method.
And then the question would be, would it really behave as expected or might something go wrong?
And the key person who initiated this theory was the Swedish mathematician Norman Dahlquist.
So that's in the 1950s, and he was a leading figure then for 50 years.
And I guess that ten or 15 years ago. So what people discovered once computers were doing explorations of all sorts is that some formulas don't work,
even though the order of accuracy is good. So here's an example.
Of a perfectly sensible formula on the face of it, v n plus one equals minus four.
V m plus five.
V and minus one. Plus the timestamp.
Times four F and minus two F minus one.
So that's an example of a formula which fails completely if you try to use it, even though the order of accuracy is excellent.
The order of accuracy is not just two, it's three.
So this looks better than second order.
Adams Bashford. It basically uses the same information.
It goes back one time. And yet it has a higher order of accuracy.
So it would be perfectly natural to try to use this formula instead of the fourth.
If you do, it fails completely. And so it doesn't have a name.
It's Brand X, right? There's no name for a bad formula. If you try it, the errors explode algebraically.
You get exponentially. You get no convergence at all. And I think we won't try that today, but maybe later.
So in a loose sense, whatever that means, it's exponentially unstable.
And you certainly don't get the right answers. And of course, you can have analogously unstable formulas of the wrong categorising.
Very easy to make unstable formulas. So here are the key definitions that Dahlquist famous theory is based on.
The three key words are consistent. Stable.
And convergent. Consistent is what you get if you get through the Taylor series gets the order of accuracy.
So loosely speaking, I'm not giving you a very precise definition.
A formula is consistent. If the order of accuracy is at least one.
Euler's method, for example, is consistent. It's stable.
Well, here's the key new thing that people didn't focus on before computers.
Instability consists of errors accumulating not just additively, but exponentially.
You run this thing, you make a small error at a certain time step, but the subsequent influence of that error grows exponentially.
That's the issue with stability, exponential growth.
But it turns out you can define it in a much more precise method.
The way a formula is stable. If.
In the case of the trivial function F equals zero.
That's a trivial oddity indeed. All solutions are bounded.
So with this formula here, if we're equal to zero, this whole thing would go away.
All that would remain would be this part of the formula, which is a linear, constant coefficient recurrence relation.
It's a three term recurrence relation. New value equals minus four times previous plus five times previous.
That recurrence relation has where it has a linear, two linearly independent solutions.
And it turns out that with these coefficients one of them blows up to infinity.
So it's not the case that that recurrence relation has only bounded solutions and that it turns out enough of a definition of stability.
Convergent means that the computed. Results converge to the exact results.
And each time. So I need v of t converges t u of t as k goes to zero.
Now, of course, on a real computer you have rounding errors as well as everything else.
And this theory isn't talking about rounding errors explicitly.
So when I say that approach is that I'm speaking as a mathematician doing true mathematics.
So these three key definitions I have given you the essence of them,
though they can be made very precise, turn out to be related in the most beautiful way imaginable.
And this is called the Dahlquist equivalent theorem. The Equivalence Theorem says that an O.D. formula is convergent.
If and only if. And that's really a rigorous if and only if it is both consistent.
And stable. A beautiful theorem.
To put it in word. What's that really telling us?
Well, Don, convergent means you're either inconsistent with his or you're not tracking the right equation.
That's not too surprising or unstable.
So really,
the the new content in the theorem essentially is saying that the only thing that can go wrong with the formula is that the local errors blow up.
And instability is sort of the only surprising thing that can go wrong.
Consistency is easy. It's just Tayler theories. This is the only other thing you have to look at.
Beautiful theorem, which some would say is almost the fundamental theorem of numerical analysis.
Dahlquist went on to do lots of other beautiful things the so-called Dahlquist, stability,
barriers to to more theorems about what order of accuracy it's possible to have.
And his stability barrier would say that a formula of this kind,
which is based only on two previous values and doesn't use F and plus one, could only possibly have one or two there.
You couldn't possibly have in order three four. More generally, if you have a K step method, call this a two step method that that is explicit.
It doesn't use the new time value in the FS. It can only have order of accuracy.
Okay, so it's a beautiful bit of mathematics involving polynomials and recurrence.
So Dahlquist was also around when I was a graduate student.
And he's a fascinating example in my experience of somebody who is intellectually so fruitful.
He had these great ideas, beautiful results, and yet was a terrible speaker.
And I listened to him give talks. I never understood a word.
The other extreme would have been Jim Wilkinson, also a great mathematician, very fruitful, who was a great speaker.
If you listen to him, you understood everything. Okay.
So that is our 20 minute summary of the theory of numerical solution of ODA ese.
And now let's talk briefly about the practice of software.
So I'm going to just say a word about adaptive code. Adaptive the code.
I mentioned already last time that the history here is that odes and integrals were really the first two early great successes of intelligent numeric,
adaptive numeric.
People realised in the sixties that you could very fruitfully use error estimates to guide the way your code solves the problem and thereby
achieve a kind of way of operation where the user specifies a tolerance and you deliver a result which is probably within that tolerance.
Let me say a word about how that's done.
So the idea is that on input, the user specifies a tolerance.
And then the code. The program varies things to achieve this.
So the program chooses the step size.
And also perhaps the formula.
To achieve this.
And I don't mean once and for all, but as time goes by, it's constantly monitoring things in order to get, we hope, the right accuracy.
And how does it do that? Well, the basic idea is to use some kind of a local error and the basic idea of a local error estimate.
Is the computer resolved by two different formulas and then take the difference.
So the vanilla flavoured approach is you compute a new value, then plus one.
By two different methods. And in the simplest concept, you could say two different methods of different orders of accuracy.
So that one of them can be expected, at least when the time step is small enough to be more accurate than the other.
And then the difference of the two. Approximates the error.
So for example in Matt lives only four or five code.
A value is computed by fourth order writing colour and by fifth order of rugged colour.
And then the two are compared. And if it is small enough to be matching the prescribed tolerance, you keep going.
Or you might even enlarge the timestamp if it's much smaller than the prescribed tolerance.
On the other hand, if you're not achieving the tolerance, then you'd redo it with a smaller timestamp.
That's the basic idea. This kind of thing to us nowadays seems kind of obvious.
What's the big deal? But in the 1960s, this was really exciting and.
In this example, as in I think many examples in computer science, the numerical people tend to do things first.
So artificial intelligence, of course, it's an old idea of intelligent computers.
But in terms of actually using intelligence, these adaptive codes are very early examples of that.
And why are numerical people usually in the vanguard?
Well, because numerical problems tend to be much more cleanly prescribed than more general reasoning problems.
So naturally enough, numerical people tend to do things which then later, as decades pass, expand in all sorts of directions.
Now, of course, we take it for granted that every time you interact with your keyboard, your computer is figuring things about you.
And computers are ubiquitously intelligent nowadays.
But in the 1960s that was not true. They were just computing with numbers and this seemed quite amazing.
Another example of how numerical people are in the vanguard, the whole business of sharing software.
You know, we now take it for granted. You go to the app store, you download whatever.
You know, this is part of your life from minute to minute nowadays.
But that essentially began with numerical people again back in the sixties and seventies,
I guess, where because numerical problems tend to be very well defined,
these were the first people for whom it really made sense for somebody to write a code and then
somebody else to take it so people would send decks of cards and then later magnetic tapes and so on.
Long before there was a World Wide Web and even before there was an Internet, people were doing that sort of thing for numerical codes.
Let's say a word about some of the particular offerings.
So in MATLAB. The Code Oddie to three compares to running a cut of formulas, which of course are of second order and third order.
Let me remind you that these are not well-defined concept.
There's more than one second order to run a cut of formula in more than one third order.
So I'm using these expressions loosely. In contrast, AB two would be the unique and best fourth formula of order to O.D. four or five.
That's the same thing with a fourth order formula and a fifth order formula.
And then ODI 113. Is based on linear multistep formulas and they vary in order.
So multistep formulas. Of orders.
One 213. So the right way to parse this, that's two and three, four and five, one and 13.
All of these holes in their way,
compute along in time and are constantly monitoring things and sometimes they'll take big time steps and then if it gets complicated,
they'll take small time steps and then other large them and then shrink them again.
In the case of only four or five and to three, it's only the time steps.
They're very in the case of only one, one, three, they'll also adjust the order depending on local conditions.
If you want to read about the details of this, I think it's described in all of the textbooks I mentioned.
There's also Molar Cleave Mueller's online textbook.
So in addition to the ones I mentioned, Molar, the author of MATLAB, and he has a freely available textbook numerical computing with MATLAB.
Which is a very much an undergraduate text.
It's very nice, but not an advanced text.
And one of the chapters in there talks about the mechanics of adaptive time stacking.
So of course, I want to show you this myself on the computer.
So what I did was write a code that called a MATLAB solver and then plot the time steps that it uses.
So this is M 27. And the particular Audi that this happens to play with is you prime equals you times the hyperbolic tangent.
Of E to the t sign five t.
But 56. The reason for picking this is the hyperbolic tangent combined with the eve of
the T makes this a problem that gets less and less smooth as time goes on.
So it's a good equation for illustrating the interplay of smooth regions and non smooth regions.
So let's run that. So I won't describe the code in detail.
But if you look at M 27 adaptive arc, you see that there's a thing called Sol equals four or five.
So that's where it's computing the result using a prescribed tolerance.
So you see, I set the rail tunnel and the obstacle to a number that I give and then it extracts the
appropriate information from that solution to figure out where the sample points were.
Sarah and 27. And it asks me, what time step do I want?
So I'll begin. Sorry. Not what time to that. What tolerance do I want?
I'll begin with point one. A very loose tolerance.
And. It computes that curve and you see how few points there are per wavelength.
This is essentially correct. It really is getting accuracy.
And the reason it can have so few points is the wrong kind of formula is pretty accurate in the fourth order formula.
In that case, you don't see anything very interesting about clustering of the points because there aren't enough of them for it to be interesting.
I'm not going to switch the ten to the minus two, and I think the points don't change at all.
Are you ready? So when I press return, see whether the points change.
Now, so what that is telling us is that it over held requirements even for a ten to the minus one.
Now I'll say ten to the minus three, and this time the points will change together.
So you see, the first bit looks the same and towards the end we're having a few more sample point.
It's not yet interesting. Ten to the minus four time to the minus five.
Ten to the minus six. So now it is interesting. You can see in the smooth regions it's not putting very many points,
but in the less smooth regions it's adaptively figuring out that it needs more points.
So this is the sharpest corner in the solution and it's putting a lot of points and that will continue,
of course, as we decrease further one in minus seven.
Eight. Nine. So you can see that even to get nine digits of accuracy,
the wrong kind of method doesn't need many points in the smooth areas, but it certainly does need a lot of points near there.
This is happening all the time. Let's see how far we can go.
I'm not actually sure. If I go ten, it's happy.
11. Is it happy? Yeah. Happy? Yeah.
At some point, we'll get a message. Yeah. So the MATLAB O.D. solvers basically don't let you go below ten to the -40.
Okay. So that's an illustration of the very standard technology in action.
Let's for fun, show you how I would do it in Tetfund, which is always a more convenient tool for a lot of things, though not always the quickest tool.
So instead. Fine, let's see the way you would solve this problem if you define a chip and the interval was from 0 to 3.
So there's a step up on the interval from 0 to 3, and then you have to define the operator.
So for this particular O.D., it was the derivative of U minus U times, the hyperbolic tangent, and each of the three times the sign of five of t5t.
That should be called a zero. That's our operator. I hope I've got the right number of parentheses there.
And then we need a boundary condition. And the left boundary condition was that the value is one.
So then in seven you say l backslash zero.
And that gives you the solution. The first time always takes longer.
This is quite a few seconds. Let's do it again.
I'm curious, how long did that really take?
Yeah. So, you know, one second is no big deal.
Of course, for a one day problem like this, this is nowhere near a fast solution, but it's a convenient solution.
And then to plot it, we could just say plot you.
So there it is. And that will be accurate to something like ten digits.
In fact, let's see, I guess if I run the code and tell us the accuracy.
So let's do that. And 27 seven tells us that this curve is in fact represented by a polynomial of degree 834 and the error is oh at the top there.
In the in the title, you can see that it got about ten digit accuracy.
So the way a telephone is set up for ease, the default accuracy is about ten.
I have 2 minutes. So let me just for fun show you this kind of thing and chat gooey, which is the graphical user interface.
So if you want to play around quickly with oldies and have fun, you can go to chat gooey.
So in particular, under the Demos tab, you'll see that one of the categories is initial value problems.
So. Let's say let's do a few at random.
So there we have a initial value problem with a discontinuous coefficient.
So of course we won't get a sixth order accuracy because of that coefficient.
We're out here for fun. Takes forever.
So there you have this solution up top. So there is the solution to the problem with the discontinuous coefficient.
Let's do a couple more. If I initial value problems, let's look at a resistance problem.
So there you have a problem with a forcing function that happens to be resonant with the differential equation.
That's a secular term, so that will cause some growth in amplitude.
So there you have this growth in amplitude when you pump a swing at the resonant frequency.
Let's do one more just to emphasise that of course, systems of equations are fine.
So for example, the Lorenz equations, which we will talk about a bit, are a coupled system of three equations.
There are the three equations u prime, v prime, w prime, and then some initial data and it's telling it to solve it on the interval from 0 to 15.
If I do that, it chugs away for a moment and then.
We have this chaotic curve.
They're showing the three components of the Lorenz equations and three curves here, showing how the these were represented by polynomials.
They're polynomials of length, about 500 bacteria.
Okay. So let me remind you, the assignment is due on Tuesday.