Hi everyone.
Welcome back to integralcalc.com.
We’re going to be doing another Euler’s method problem today.
This one asks us to consider the following initial value problem, y prime equals x over
y.
They give y of zero equals two is the initial condition and delta x; they asked us to use
delta x is equal to zero point two five to find y of one.
So let's go ahead and get started.
As with any Euler's method problem, the first thing that we want to do is start creating
our table of values so we always start with t of zero and y of zero and we get both of
those values from our initial condition.
Zero is always representing here and then two is what we use for y of zero.
So we can go ahead and write those values in.
Now that we've done that, we always pull these from the initial condition, we use delta x,
whatever they've given us to build out our column of t values.
And the way that we do that, if they asked us to use delta x or change in x as point
two five, so what we're going to be doing is adding point two five to the previous value
of t each time and we're going to do that until we get to, because this is y of t, so
until t equals one.
So let's go ahead and start adding point two five, so zero plus point two five is point
two five, point two five plus point two five is point five zero, t of three is obviously
going to be point seventy five and t of four is going to be equal to one.
And now we know that we can stop because we've reached this value here, which is what we're
trying to estimate when t is equal to one.
So this is going to be our full t column.
And now, we know that we are going to find y of four.
So we can go ahead and write these values in here and now we're going to go through
step by step with Euler's method to approximate y of four.
So each of these is going to be determined from the following formula, the Euler’s
method formula is quite complicated in most calculus books but it really doesn’t need
to be.
The only thing really that you need to know is y of one.
I'll go ahead and write it out here.
y of one equals y of zero plus f of t zero y zero times delta x, sorry, delta t.
Okay, so this is the formula for y of one here, how we're going to find y of one.
And all this says is y of zero so here's our y of zero value and this part here, whatever
you get when you plug in when you plug in t zero and y zero, to the original function
and then multiply everything times delta t which we have.
So let's go ahead and apply that here to y one.
We have y of zero so two, which we pulled from here, plus plugging in t zero and y zero
to the original function.
So we have x over y and this is actually, this is going to be zero over two because
we’re plugging in t values wherever we have x and y values wherever we have y so we'll
get zero over two and then we multiply that by delta t which we have as point two five.
So that's our equation for y of one.
Now we just need to simplify that.
Of course, this is going to be zero, so zero times point two five is going to be zero.
That's going to go away and we'll just end up with two and then y of two.
And as we go each time here, all we need to do is add one to each of these little subscripts.
So let’s go ahead and get rid of that there.
So if we add one, this one will become two, this zero will become one and each of these
will become one.
So if you just add one, suddenly you will have an equation for finding y of two.
So y of two you can see here, we can use y of one, which we solved for in the previous
step so again two plus, now we're plugging in t one and y one to the original function
so we plug in point two five for x and two for y, so we have point two five over two
and we’re multiplying that again by delta t which is point two five.
And now you have to buzz start your calculator.
When you do this math here, what you're going to get is two point zero three one two five.
Please remember that with Euler’s method, it's extremely, extremely important that you
keep every single one of the decimal places that you're given in your calculator.
If you start rounding decimal places early, that error is going to be compounded every
time because you're going to be using this answer in y of three, y of three's answer
in y of four.
Every time, your answer will get farther and farther away from being accurate so keep every
single decimal place you have even if it's nineteen decimal places.
Write them all down even though it's tedious and then round them at the very end for y
of four.
So now that we have this we can really start rolling, again adding one to each.
Basically the pattern we're starting to see is you use the previous answer here first
two point zero three one two five plus and then the two previous values again so point
five zero over two point zero three one two five and we're multiplying by point two five
and when you do the math there, you get to point zero nine two seven eight eight.
And then again using the previous answer two point zero nine two seven eight eight plus
again the previous answer point seven five over two point zero nine two seven eight eight
and multiplying that whole thing by delta x, point two five and when we do that we get
two point one eight two three eight one.
So now that we're done, you can round this value because it's your final answer to two
decimal places and just get two point one eight but remember to keep all the decimal
places until you get to the last answer.
So that's it, and even if you have you know, through t ten and y ten, you just keep repeating
that proves using the values from the previous row to calculate the next value of y until
you get to your final answer where t is equal to whatever is given to you in the question
up here.