00:01
We are going to apply euler's method twice to approximate the solution to the given initial value problem on the interval 0 .1 half.
00:11
First with step 0 .25, that is we do two steps and then with step size 0 .1, so we do 5 steps.
00:26
That's because the final value on the interval 0 1 1 half is 1 half which is 0 .5.
00:33
So with steps size of 0 .5 we get to do two steps to arrive to final value of x which is 1 half.
00:46
But with 0 .1 we get to do 5 steps.
00:50
So we pass through 0 .1, 0 .2, 0 .3, 0 .4 and 0 .5.
00:56
So we want to compare the 3 decimal place values of the 2 approximation at the 5 value of x equal one half with the true value which in this case we know which is the actual solution at one half and the initial value problem we are going to consider here is y derivative equal y that is a function whose derivative is the same function at zero the value of the function is 10 that's the initial value and this is the actual solution in fact, it's very easy to verify that the derivative of this function is the same function, that is, y of x satisfied this differential equation.
01:45
And if we evaluate y at 0, we get 10, which is the initial condition or initial value given here.
01:53
So that's correct, that is, we know we have the differential equation, the initial value, and the actual solutions of the initial value problem.
02:07
So what we are going to do, we are going to apply first euler's method with the step size of h equals 0 .25.
02:21
And that means, as i explained before, we have the interval 0, 1 half, which is 0 .5, and 0 .25 is just the middle point.
02:35
So if we do one step and the second step, we arrive to the final value of x.
02:46
So we have two steps in this case.
02:52
And we got to remember the expression for oiles method that reads yn plus 1, that is the any approximation of the function at the time corresponding to index n plus 1, is, is equal to the previous one plus h times, that is a step size times, the function of the initial part problem at xn y n.
03:26
And now i am going to say what is this function f, where the differential equation, y derivative equal is equal to a function of two variables.
03:39
The first variable is the independent variable x and the second one is the function itself y.
03:47
In this case, this is exactly equal to y, as we can see here.
03:52
In other words, the function f appearing here is just the function we get when we solve for y derivative or that is given in this case, we don't have to solve for y derivative, but it's just given that way directly.
04:08
What derivative equal to a function of x and y.
04:12
That function of x and y, which is equal to the derivative of y, it's just this function we got to use in all this method.
04:22
And of course, as you can see, we have a value of y at index n, a value of x at index n, and then it's necessary to know an initial value of y for the initial value of x, and so that we can start this iterative processes here and this step -size -h is constant that is that's not changed with iterations good so this case x -0 is zero because we start the left -hand point of the interval where we are integrating the differential equation x -1 is just the next value of x which is obtained by x0 plus h in other words here is 0 plus 0 .25 which is 0 .25 so x1 is 0 .25 and x2 is x1 plus h that is 0 .25 which is x1 we calculated here plus h is 0 .25 and that give us 0 .5 which is already the last value of x or the right endpoint of the interval where we are integrating the initial model problem so x2 is 0 .5 that is knowing this step size age we know all values of x we have to consider but now the idea is that we know only y0 that is which is the value of the function at x0 and that is in this case 10 okay so the next value that is y1 which is the value of the function at x1 will be approximated by this iterative formula which is the oilist method good so let's put here initial value and now let's start the calculations in this case we have two steps only so y1 will be if we put n equal 0 in our iterative formula here we get y1 equal y0 plus h times f at x0 y0 and that is y0 is 10 here plus h is 0 .25 and then we have the function as we so here is y that is the second component of the pair where we are applying the function in this case that will be y0 that is 10 so we get 10 plus 2 .5 and that is 12 .5 so y1 is 12 .5 that's this is the approximation to why the true solution let's say at x1 that is y at x1 is 0 .25.
08:20
So now we do another steps for n equal 1 in the oilis formula here.
08:27
We get y2 equal y1 plus h times f at x1, and that is y1 plus h times y1 because we know the function is equal to the same.
08:45
Second argument in this case y1 and that give us i'm going to do it like this one plus h y1 because why one is a common factor so we get one plus 0 .25 times this value here 12 .5 and so y2 is we use a calculator and we find 15 .625 good in that that's the approximation to y at x2, we saw here, x2 is, is y at 0 .5 of y at 1 half.
09:46
And this is one approximation we want to report.
09:49
If you look at the lower part of the question, of the exercise, you are asked to say what is the older approximation when h equals 0 .25 of y at one half.
10:06
And that answer is this number here.
10:12
Okay.
10:13
So this is euler's approximation to or when to follow the statement of the problem and h equal 0 .25, which is a step size we are considering now here of at one half that is you get to put this value in the text box at the bottom of the exercise of the statement of the exercise and you're asked to put in a decimal rounded to three decimal places as needed and we are we have three decimal places only in the calculations here so you got to put this number as it is 15 .6 to 5.
11:24
Now we are done with this.
11:27
Now we go to the second possibility.
11:30
Let me say c1 is 2 here.
11:39
So it's number 2 with step size h equals 0 .1.
11:48
And now we are going to do the same calculations but with this step size so we go directly to that.
11:56
So so y1 is y0 plus h times f at x0 y0 and as we saw before this is y0 plus h times y0 given the definition of f here, which is simply y, second component in this case y zero.
12:19
And we have a y zero common factor so we get 1 plus h times y0 and that gives us 1 plus 0 .1.
12:27
Times 10 which is y0 is the same initial value here and that is 1 .1 times 10 is 11 so y1 is 11 and now y2 is y1 plus so i'm going to remark here that this is putting n equal 0 in the oilers iteration or oiler formula given here and here we put n equal 1.
13:08
So we get this, y2 is y1 plus h times f at x1y1, and that will be y1 plus h times y1, and that is 1 plus h times y1, and that is 1 plus 0 .1 times y1 is 11...