So now let's do a real problem. So, the one thing that I find a little
interesting is computing is an interesting thing.
When you start teaching computing, sometimes you teach two simple problems.
It's like yeah, you can do the simple problem.
And as soon as you ramp it up a little bit, it's like oh, I don't know how to
handle the difficulty level that comes with ramping it up even a little bit.
So what I'm trying to give you is an example now, where, you know you have to
ramp up the difficulty level a bit. And just sort of this straightforward
naive approach here isn't gonna quite work for you as well.
So here's wanna do. We're gonna go back actually to what we
had in class a few lectures ago. Which was something like this.
Remember that? And we'll do the following boundary
conditions. I'm gonna add two levels of difficulty
here. Okay?
The first level of difficulty is, since I already know how to solve for the
shootings, I'm gonna do this. Make it non-linear, I know.
It's like a half gainer right there. >> [laugh] Alright.
That's one thing I'm gonna do equal zero. And so, that makes the equation more
complicated. But here's what also makes it more
complicated. What's beta?
Remember last time, part of what we were trying to solve for was what beta was.
And in this boundary value problem now, I'm saying, try to solve this boundary
value problem, where I actually don't know some of the information.
Right? So you better learn how to solve this,
because we were doing it with shooting method.
We better figure out how to do it with this.
So what we're gonna do, is beta will be a parameter in here, that also has to be
solved for, in addition to everything else.
Okay? So first let's turn it into system of
first order equations. Write down our boundaries, and then figure
out how to implement this in MATLAB. Okay, so first order system.
Again you say why. Alright.
You say Y is equal to Y1 and then Y prime is equal to Y2 and you get Y1 prime is
equal to Y2, from this first set of equations by taking the derivative.
The second equation you get, Y double prime, alright, which is Y2 prime is equal
Y double prime. Take this stuff to the other side you get
beta minus 100. Times, Y which is.
Y one. Minus Y1 cubed.
So there's our problem in first order form.
>> And don't underestimate how complicated this can make your life.
>> Okay. Remember all the techniques we had so far.
So, by the way the shooting method doesn't care if you did this.
But when you actually go to the discredization method, the discredization
method. It cares a lot, okay?
The discretization method, remember, we did it last time in class.
You can, it only works if you get A X equal to B out of the thing.
Right? And if you don't, if you have a
non-linearity, then you have a huge non-linear system of equations to solve,
and by the way, that's exactly why BVP4C exists.
It says fine, we'll do that for you. And there's a root, algorithm for doing
that. But let's solve that, that's the
difficulty. I don't know what beta is.
What about the boundaries? Boundaries are pretty easy.
But we're gonna have is the left boundary is just y1 at negative one, or actually at
plus or minus one is equal to, zero. Here's your boundary.
Make it zero, make it simple for now. 'Kay?
So far so good? Alright.
Let's implement and solve this thing. And in some sense this is a, what I like.
What I like about this problem, by the way, is where I, I like to, wanted, wanted
to put here in class is. This is actually a fairly difficult
problem to solve computationally. As you will see.
Cuz I'm gonna make you shol, solve it. But not only your problem using the
shooting method. Cuz it's actually pretty unstable.
But this thing just cleaned the clock. It just, forearm shivers flyin.
Okay. You guys all know what forearm shivers
are, right? No, nobody knows.
Who knows? Dudes, some of you know what a form shiver
is, right? Tell me.
Okay. Leah, do you know what a form shiver is?
Okay. Isn't big time wrestling, when you throw
the guy against the rope and he bounces back, and you come into him, forearm,
boom, dropping him. I know.
This is what we're doing. I don't know if you picked that up.
You guys at home, don't do it at home. But listen, this is, this is my, this is
math version of smackdown. I know it's eight:30 in the morning, this
is when we do it, but. It's you against the problem and it's just
a matter of who's winning. Right?
That's, that's it. That's the way I think about.