Included one of the terms out of the two. So, let's look at the other one.
Okay. Now, the other term is here.
A non-linearity. Now, it's not that often you can solve
non-linear ODEs exactly, sometimes you can, okay?
But this one here, you can solve it exactly.
In fact, The solution to this is just simply here.
Let me write it down for you. There's this solution.
Pretty nice. Give it the initial value.
Multiply by the space factor. Done.
So, what you see here is the two pieces, each individually,
I can actually solve exactly. I don't have to put this ODE45 either,
Right? What is the big cost for us?
Part of the big cost for us is when we take time steps, is we have to develop
these time stepping algorithms, right? We have to say, okay, ODE45 to march me
forward into the future. I already have the exact solution in the
future. So, if you think about it, you could say,
well, This is a perfect place for using the
split step method cuz in the split step method, what I could do is take a delta t
of this and a delta t of that, And I have exact solutions for both.
So, I not even, I'm not even doing time stepping anymore.
I'm just taking, taking my initial condition,
Ha, take a delta t of each one. And I know the exact expressions for them,
and I got myself into the future. So, let's look at how this might look.
Alright. So, here's an algorithm for doing this.
Alright, did I spell that right? [laugh] Okay good, I think I did.
Alright. Sometime when you look at words they just,
see that's why I told you not to spell in public.
Alright. Here's the algorithm.
Start off with the initial condition. U0.
So, this your initial function at, let's say, time zero.
Okay. Now, we can do one of two things. We could either take a step in the
dispersion first or in the nominary second or vice versa.
But, let's go ahead a take a step first in the dispersion,
Okay? Step two, then.
Let's come back and tell, see what this says to us.
This just says, okay, I need to take a delta t forward here and what I'll do is,
here's my formula. This is exact, right?
All I've got to do is take my initial condition before you transform it,
multiply it by this factor. That gives me u hat and I want u which is
just the inverse Fourier transformer bit. So.
Delta t [inaudible]. Yes.
And that'll be delta t, exactly. Okay? So, what we're going to do here is
calculate, let's call it the dispersion effect.
And it's going to give us a solution you want which is, what we're going to do is
we're going to take the FFT of this u0, multiply it.
Times i, k squared, delta t over two. And then, just inverse Fourier transform
It cost me N log N to do this, Okay? So, it's very, very fast.
I'm not, I'm not using an ODE solver, right?
So, when you first look at that equation, you think, oh, like, I've got, I'm
stepping forward into the future. I've got a, you know, Fourier transform and
everything. ODE45 forward into time. No, not in this case.
I'm taking advantage of the fact that, pretty much, I know the exact solution.
Okay? And this highlights something more
important that's there. Anytime you have information about your
solutions and you're not making use of the fact that you know something, you're being
dumb, okay? Alright. You always take advantage, every
single time you can, anything you know, you bring into the problem.
If you know it, make use of it, okay? Always, always, always.
By the way, you don't have to make use of it, you can do the slow way that doesn't
take advantage of anything. But, this is what you really want to do
when you program. Take advantage of the things you know.
I just took a delta t step forward, just using the dispersion.
And now, I want to take, instead of the dispersion,
Now I want to take the non-linearity. So, the non-linearities has a formula
there, and here it is. It just says, if I want to go forward,
If I have some initial condition to get delta t into the future, I just, there's
my formula. Now, that becomes a delta t. And usually
this turns out u1. U1 is the initial condition for this.
Okay? Alright. So, let's call this u2.
U2 now is you just take this u1 and multiply it by exponent i u1 squared,
delta t, Okay?
This is the exact solution to this thing. And I've taken advantage of that.
Three, step four, I guess, then you just say, alright, u0 is equal to u2.
I'm sorry. Delta t or deta t, or delta t with delta
t? been in [inaudible] What's your? Delta t over two.
But that's the, the increment is delta t, right?
Mm-hm. And then, number three increase delta t
again. Yep.
So, is t2(delta equal to two delta t?? Or is it.
No, no. No, just delta t.
I'm taking a delta t step forward. So, it's kind of like you're saying,
basically, I want to evolve the physics from zero to delta t.
Yep. Um-hm, um-hm.
Yeah, that's right, that's right. Yeah.
Oh, one parenthesis missing. So, is everybody okay with that?
There's your little algorithm, boom, boom, boom, boom.
And, oftentimes if you can take advantage of that kind of structure, if you have
your pieces of your dynamics that are sitting there in your PDE that are kind of
being separated and you know how to solve some of those pieces, this is awesome.
Couple of things that are nice about it. One, we talked about numerical stiffness,
right? Here, totally just gets rid of numerical
stiffness. Why? Because you have actually used exact
solutions. Fantastic.
It's great, Right?
So, when you have things like that, in fact, when you think about what we talked
about in terms of the integrating factor method with removing numerical stiffness,
it's kind of something like this but this taking it one step further.
And you're saying, just take steps independently. If delta t is small enough,
you'll be in pretty good shape.