00:01
We consider the initial value problem y derivative equal y and y at zero equal 1, which have a solution y of x equal exponential of x, because the exponential of x is a function whose derivative is the same function and at zero is equal to 1.
00:23
So in bar a, we want to estimate y at 0 .4 by using oilus method with step size h equals 0.
00:32
Then step size h equals 0 .2 and finally step size h equals 0 .1.
00:42
In par b we plugged the exact solution which is this one here, the interval 0 .4 together with the oilers approximations using the step sizes indicated in par a.
00:58
With that sketch, we decide whether the approximations in par a are underestimates or overestimates estimates.
01:07
And finally in part c we find the errors made in part a by using oiles method to estimate the true value exponential 0 .4.
01:16
And discuss about what happens to the error each time the step size is half.
01:25
So let's see oilus methods in general first.
01:34
So we have euler's method defined by an iterative, set an iterative method to calculate the value of the function at some discrete values of the independent variable.
01:49
And the iteration is defined as y n plus 1 equal y n plus h times f at t n y n.
02:00
And this f here refers to the function we have equated to the derivative of the unknown function y.
02:11
In this case, that corresponds to y.
02:14
That is the function f does not depend on t explicitly but only on y.
02:21
So our f of ty equal y in our particular case, and knowing that, this iteration here becomes yn plus 1 equal yn plus yn plus step size h times yn for n very down or equal to zero.
02:49
We can see that this iterative process of method can be.
02:53
Started by knowing at first value y zero which is the initial value given here y at 0 equal 1 so depending on the value of age we have more or less points where we calculate the function y so let's say first for h equal 0 .4 it means we have only one step if we throw the interval here 0 0 .4 which is the interval we must consider i know that because the first value of y is known at x equals 0 and the last value we want to estimate is y at 0 .4 so the values of x goes from 0 to 0 .4 that's the domain where we consider the initial body problem and if we take h equals 0 .4 so we have only one step here that is we calculate y at 0 .4 using the initial value and that's all so let's let's put the formula of the iterative process how that simplifies in this case so y n plus 1 will be y n plus 0 .4 y n and we can see we can simplify more this 1 plus 0 .4 times y n and that is 1 .4 times y n for n greater than equal to 0 so we have y0 equal and i should have put it here y 0 is y at 0 is 1 and so what 0 is 1 and then if we put n equal 0 in this formula here we get y1 is y0 plus uh...
05:19
Zero point sorry i'm going to use the last simplification here one point four times y0 and because y0 is one we get one point four y1 is one point four and that's all because this is an approximation to y at and because we have age 0 .4 we know this is an approximation to y at 0 .4 we know this is an approximation to y at 0 .4 which is the one we like to to estimate.
06:00
Okay, so that's it.
06:02
We have only two steps in this case.
06:15
Good, so we have this is that.
06:19
And now the second part will be for h equals 0 .2.
06:26
And now for h equals 0 .2, we have two steps because we have from 0 to 0 .4.
06:36
In the middle, we have 0 .2.
06:38
So we have this step.
06:40
Of size h 0 .2 and the other one to get finally to 0 .4.
06:47
So the iteration here is y n plus 1 equal y n plus 0 .2 yn and that is 1.
07:02
And that is 1 .2 y n or n - or equal to 0.
07:07
And so y0 is 1 again y1 is y0 again it's the same is 2 .1 y0 that is 1 .2 i meant times y0 that is 1 .2 because y0 is 1 .0 is 1 .2 so y1 is 1 .2 and now with this value we calculate y2 now y2 is 1 .2 now y2 is 1 .2.
07:52
2 times y1 and that is 1 .2 .2 times 1 .2 that is 1 .2 square to 1 .44.
08:16
So y2 is 1 .44 and this is the approximation again to y at 0 .4.
08:31
The only difference between the approximation we found in the first part with h equals 0 .4 .4 is that we did only one step.
08:42
Here we did two steps.
08:47
Now the third part is h equals 0 .4.
08:50
So we have one half of the previous one, sorry, two times the previous one.
08:59
And so it's not 0 .1, 0 .1.
09:08
So we have four steps.
09:10
We have double of steps as the first the previous part.
09:19
So this means we have between zero and 0 .4.
09:24
We have one in the middle, 0 .2, and then we divide by two half equal parts, both of this, and we get 0 .1 here and 0 .3 here.
09:36
So we have to make four steps of size 0 .1 to arrive to 0 .4.
09:47
Good.
09:48
And that that means that now we have y n plus 1 equal y n plus 0 .1 y n or what is the same 1 .1 times y n for n greater or equal to 0 and so we start up y0 equal 1.
10:11
Y1 equal 1 .1 .1.
10:15
That is y1 is 1 .1 .1.
10:23
First step and second step would be y2 equal 1 .1 times y1, that is 1 .1 times 1 .1, and that is, it's 1 .1 is 1 .21, 1 .21.
10:59
Okay, taken here, 1 .21.
11:06
And then the third step i'm going to do it down here is, here i forget, put, let me do it.
11:18
Now here is y2 is 1 .21.
11:27
Good, and y3 is 1 .1 times y2, that is 1 .1 times 1 .21.
11:42
Get 1 .331.
11:47
So y3 is 1 .331.
11:55
And finally, y4 is 1 .1 times y3 and that is 1 .1 times 1 .331 here and this is 1 .46 oh sorry let me arrange that...