CHAPTER 08.05: HIGHER ORDER AND COUPLED DIFF Eq HEUN METHOD: Part 2 of 2
So let's go ahead and in this part find out what the value of y1 is because we have i=0. Your initial value of x is 0, your initial value of y is 7, and your initial value of z, which is the same as the derivative of y, is 13. So, armed with these values of x, y, and z we can now calculate our value of y1 which we need to calculate first. So we need y1, z1 first to calculate y2 next time, so, in the next step. So, what is y1? y1 is nothing but y0 + [(1/2)(ky_1) + (1/2)(ky_2)]*h Let me not do that, let me first just, rather than writing that, let me just calculate my k1 values. So I need ky_1. This is what I was talking to you about a few minutes ago, is that we need to calculate ky_1 first then kz_1, then ky_2 and kz_2 to be able to calculate the corresponding slopes. So ky_1 is nothing but the value of the function f1 calculated at x0, y0, and z0 because i is equal to 0. And f1 is nothing but what, f1 is nothing but z. Let's calculate this, x0 is 0, y0 is 7, and z0 is 13. And f1 is nothing but z. Since f1 is nothing but z, that is just the value of this which is 13, so that's what we get for ky_1. Now I am going to calculate kz_1 which is nothing but the second function, f2, at the same arguments which we had for ky_1. So what that means, x0 is 0, y0 is 7, z0 is 13. And what is f2? f2 is nothing but 11e^-x, which is zero in this case, minus 3 times z, which is 13, minus 5 times y, which is 7, divided by 2. And this value here [(11e^(-0) - 3(13) - 5(7))/2] turns out to be -31.5. So, we have calculated ky_1 and kz_1 for corresponding to i=0. Let's now calculate the k2 values and see what we get from there. So we get, so ky_2 will be now this function f1 but now calculated x0+h, y0+(ky_1)*h and z0+(kz_1)*h so what is x0, x0 is 0, h is 0.25 because that is the step size. y0 we just calculated to be 7, ky_1 we just calculated to be 13 and h is 0.25. So that's the argument of y which you are going to have. Now let's see what the argument of z is. The argument of z is what, is 13 plus kz_1 which is -31.5 which we just calculated, times 0.25. And let's go and see what the arguments are at which we have to calculate the function f1 so it turns out to be x1 is 0.25, this argument here turns out to be 10.25 and this argument here turns out to be 5.125. So you've got to understand what these arguments are. This is the corresponding value of x which you have at the point ahead, this is our approximate value of y at the point ahead, at 0.25, and this is the corresponding value of z, the first derivative of y with respect to x, at 0.25 because you need all these three arguments, although these are approximate values, to be able to calculate, get some feel of what f1 is. So f1 is nothing but z, so that turns out to be just 5.125 because it is just the value of z. Now, let's calculate kz_2, kz_2 is nothing but f2 which is the second function f and it is at the same arguments as this one so we don't need to recalculate this so we have 0.25, 10.25, 5.125, that's where we need to f2. Now, f2 is nothing but 11e^-x minus 3 times the value of z, which is 5.125, minus 5 times the value of y, which is 10.25 and divided by, divided by 2. And that gives me, this value here [(11e^(-0.25) - 3(5.125) - 5(10.25))/2] turns out to be equal to, kz_2 turns out to be -29.029. So we have all the values which we need now. We have ky_1, kz_1, ky_2, and kz_2 to calculate our value of y at y1. So let's go ahead and do that, what we are going to get is, we have y1 by putting x equal to, y equal to 0. I get y1=y0 + [(1/2)ky_1 +(1/2)ky_2]*h so y0 we know if the initial value of y which is 7, ky_1 we calculated just know to be 13, and ky_2 we just calculated 5.125, and h is 0.25. And this value here turns out to be 9.2656. So this is the approximate value of y1 at 0.25. So let's calculate z1 now because we do need the value of z1 to be able to calculate the corresponding value of y at x2. So we cannot just skip and go to y2 because we need the value of z1 there. So z1 is z0 + [(1/2)kz_1 + (1/2)kz_2]*h So let's go and substitute the values which we just found out, so we get z0 which is equal to the initial value of z which is 13, plus one half kz_1 we just calculated to be -31.5, plus one half kz_2 is -29.029, times h with is 0.25. So that gives me the value of z1 to be 5.4339. So that's what gives me the value of y1 and z1 and the immediate next step, next segment I'm going to show you the next step. And that's the end of this segment. |