.
Let's go and recap what we've done so far, so we were interested in
solving this boundary value problem
and what we had was that the
boundary conditions which are given are y(0)=0
and y(9)=0, but since we are solving this problem by using Shooting
Method we cannot use the boundary conditions to solve the problem.
We have to use initial conditions and since we need two initial conditions because this second order differential
equation, we have one initial condition at x=0, but we don't
have the other initial condition one the slope of y. So what we did was we said hey,
let's go and assume y'(0)=4 and we're
going to use Euler's Method. So these, I'm just recapping what we have
done so far. So we said let's go and use y'(0)=4 and figure
out how close it comes to y(9)=0 and we used Euler's Method
and we used h=3 which implies that you are taking 3 steps
to go to 9, from 0 to 3 so you are basically starting at 0 going to 3, going to
6, and going to 9 by using Euler's Method. And based on that what
we obtained was that the value of y3,
which we got, y3, we got it equal to 1548
and that is the approximate value of y(9) which we got
by using Euler's Method with step size of 3. And as you can see that this is not anywhere close
to y(9) being equal to 0, this 1548, so what we have to do is
we have to use some kind of a hit and trial method here to now choose a different value
for the starting slope at x=0. So we chose y'(0)=4
which was totally arbitrary the way I chose my initial guess
for the slope. So what I am going to do is I am going to choose another guess for the slope
and see that what kind of values I get for the y. So I am going to choose
y'(0) equal to, so I am going to write down here, choose
y'(0)=-24. And you
got to go, what you have to do is you have to go through the steps of, go through the
steps of Euler's Method just like we did for
y'(0)=4, so I am not going to show you the three steps which
I'm going to take, I am just going to give you the results for those. So you, again go through the steps of Euler's
Method by starting with y'(0)=-24 and y(0)=0
because it is already given to us with those two conditions and this is what you are going to get.
And if you follow exactly the same procedure as we had for the previous assumption
of what y'(0) is, so it's i, this is xi, this is yi,
and this zi. For 0, xi is 0,
yi is 0, and zi is -24 because that is what I am assuming it
to be. Then when I choose i=1, then xi will be 3,
the yi which I will get it -72, and this will be -24.
And then we I go for i=2, xi will be 6,
I get -144 here and I get -24 here.
This is just coincidence that you are getting these values here to be the same.
Then 3, I am getting 9 and -216.
So what you are finding out is that y3 which you are getting now is
-216 and this is the approximate value of y at 9.
So you are getting a negative value now, previously you got a positive value. You are getting
a negative value now. So what I can do is I can continue doing this process of
choosing a different value for y'(0), so let me go back here,
so in order to be able to get y3 as close as
possible to 0, which is y(9), I can choose a different value
for y'(0) and continue this process until I find that it's close to 0, the
value of y(9). But, what I can do is I can also so some kind of an interpolation
technique to be able to come up with a better initial guess for y'(0). So how do I go about doing
that?
.