.
So since I want to find the value of y at 0.5, i=1.
x1 will be now equal to 0.25
because we are at a step ahead, y1 we just found out to be 10.25
and z1 we just found out to be equal to 5.125.
So if we write down the equation for y2,
y2 = y1 + f1(x1, y1, z1)*h
y2 = y1 + f1(x1, y1, z1)*h.
y1 we just found out to be 10.25 plus the arguments of this function f1
will be x1 is 0.25, y1 is 10.25
and z1 is 5.125.
So 10.25, 5.125 times
h which is 0.25 and this value here [10.25 + f1(0.25, 10.25, 5.125)*0.25],
so the value of f1 we get 10.25,
plus the value of f1 is 5.125.
The reason why that is the value is because f1 is nothing but the value of z which is 5.125.
Times 0.25 and this value here [10.25 + 5.125*0.25] turns out to be 11.153.
And that will be the approximate value of y at
0.5 because that is the value of y at x2 now
because that y2. y2 is the value of y at x2
and we know x2 is nothing but 0.5 because you've already gone from 0 to
0.25 and the next step is 0.5. So thats what we are looking for,
so the final answer is that y(0.5) is approximately equal
to 11.153. So that is what you obtained here.
So how do we know that this is, how accurate this answer is?
So what we did was we conducted some, we found the value of y at 0.5
by using different values of h. Let me give you what the exact value of y
at 0.5 is up to 5 significant digits. This is the
exact value by using, by using your ordinary differential equation calculus knowledge,
sorry ordinary differential equation knowledge by using Laplace transforms or any of the
classical solution techniques to find out what the exact value of this y at
0.5 is. So I am going to leave that has homework, that you go ahead and find out,
verify that the exact value is that for solving the ordinary differential equation which I
wrote in the beginning, the second order differential equation. Now we did develop
a table for different values of h for the value of y at
0.5 and we want to just see that whether it converges or not.
For h=0.5 we just found out that the value of
y at 0.5 is approximately 11.153, but then what
we did was have halved the step size which means that we have to take four steps now,
we got 10.639. So this can be a good homework for you to do
to verify that when I use a step size of 0.125 that I get
10.639. And at 0.0625
I got 10.251. And for
0.01325, again halving the step size I got 10.073
And of course we know that the exact value here is
9.9046 so that should give you some idea that how fast
and whether it converges or not. It seems to converge by using smaller step sizes
but it is taking a lot more time, I shouldn't say alot more time, a lot more steps
to reach the exact value here. And that's the end of this
segment.
.