.
Let's go and see how the Shooting Method works.
.
So. let's suppose if we have a differential equation like
this: d2y/dx2=f(x, y, dy/dx)
d2y/dx2=f(x, y, dy/dx)
d2y/dx2=f(x, y, dy/dx), let's go ahead and do the general case.
So here you are given the condition at y(a) is ya
and at y(b) it is yb, so what you are finding out here is
that you are given the two boundary conditions, what is happening, what is happening to y at
x equal to a and what is happening to y at x equal to b. Now what Shooting Method does is that
it basically uses the initial value, it uses the initial value
of problem methods.
So you do have a boundary value problem, but it's going
to use initial value problem methods to solve the problem. So what that
means is that if you had a second order differential equation which was of this particular form and you were solving
the initial value method, then you would need the condition at y(a)
which is given as ya and then you would need the cindition of y'(a) equal
to, let's suppose, let's call it Ya.
Then I will see that, let's suppose somebody was saying that hey, I'm going to use
initial value problem method such as Euler's Method, Runge Kutta Second Order Method, Runge Kutta Fourth Order
Method and I want to solve this boundary value problem with these boundary
condtitions, but I want to use initial value problem methods to be able to do that. Now you can't simply
say okay hey, we can go ahead and use the initial value problem methods like Euler's Method and solve the problem
because initial value problems for a second order differential equation such as this one will require
you to have the intial value of y at x equal to a and also the
initial slope at x equal to a. That's the only way you can solve the problem. So what
Shooting Method is all about is that what you are going to do is you are going to say hey I know this initial,
I know this condition at x equal to a because that is given to me, however; what I am doing is I am
replacing this condition by this and I cannot just replace it because
I like it, what I am doing is I am just replacing this condition,
by this condition right here because that's what initial value problem methods are going to require me
to do. So what I'm going to do is I'm going to use this as my initial value so what
that means is that I'll have to guess, I'll have to guess this one.
I'll have to guess this one and what I am going to is I'm going to go from a to b
so let's suppose if I am at x equal to a and I want to, and the
conditions are given at x equal to b, I am going to use my initial condition which is y(a)
is ya and y'(a) is Ya, let's suppose,
and I am going to use that to find the value at some point which is h away, so whether
you are using Euler's Method, Runge Kutta Methods you are going to find the value of y
at this particular point and similarly, you are going to find the value of y at this particular point, y at this particular
point by following these numerical methods and eventually you are going to end up right here and what's going to happen is
that you are going to get the value of y(b) by this using some numerical method
with the initial value problem. But that y(b) is not going to be the same as this number right here.
Why? because there is no way of knowing that hey whether this guess
which you are used was appropriate or not. So, what you are going to do
is you are going to find some value y(b) so that's why it is called Shooting Method because you are shooting for,
hoping that the answer that y(b) will turn out to be very close or
exactly to be this number right here. But that's not going to happen in
almost every case that, once you have chosen this initial guess, no matter how good you are at
guessing and understanding the physics of the problem, once you have chosen this guess right
here, this y(b) is not going to equal to this y(b). So what happens is that
once you have chosen y(b), once you have obtained y(b) by using the initial
value problem method, such as Euler's Method and Runge Kutta Second Order Method, you are going to
choose another, you are going to choose another value for
y'(a) and let's call it Za,
so you are going to chose another value, another initial guess and you are going to get a different
y(b). So let's suppose here you will getting, let's suppose, p, now
based on this value here, we are getting p, now on this value here you are going to
follow the same procedure, starting from here with this as the initial value of y,
this as the initial value of y'(a) and take the steps and go
all the way up to here and you are going to get y(b), let's suppose equal to q. Now you have some
idea of knowing that hey, if I get by using, by using
this value, Ya, I'm getting the value of p at
b, and using this value I get the value of q. Now you can do some kind of
interpolation method to see that hey, what should I have chosen, what should I have
chosen as my initial slope here based on trying to get the value of
y(b) to be this yb right here. So that's how the Shooting Method
works and that's why it's called the Shooting Method becaue you are simply trying to guess the initial
slope and hoping that the value of y which will turn out, which is
given at the other boundary will turn out to be close to the numbe which is given to you, but you can
follow a scientific method by choosing another guess let's suppose and what happens is that
when you choose antoher guess you are going to get another value of y(b) and based on some interpolation technique
you can say okay hey, I want y(b) not to be p, not ot be q, but I want it to be yb.
What should I choose as my initial values of y'(a)?
All of these things will be very clear once we do an example but you do need to understand
the theoretical basis of the Shooting Method. And that's the end of this segment.
.