- [Teacher] We're going to use Euler's method
with step size 0.5, which means delta x equals 0.5,
to compute the approximate y-values, y sub one
through y sub four, of the solution
of the initial value problem,
given the differential equation where y of zero equals four.
Euler's Method is a method used to approximate
a solution to an initial value problem.
The method starts at a point in a slope field,
usually given by the initial condition,
and takes small steps of x equal to delta x.
The slope is updated at every new x-value,
and the size of delta x determines the accuracy.
So a differential equation is in the form
dy dx equals f of x comma y and y of x sub zero
equals y sub zero with step size equal to delta x.
So now we'll go back to our problem,
and follow these three steps for each approximation.
And again, notice how we were given the step size
as equal to 0.5, so delta x equals 0.5.
Let's set this up on the next slide.
So the first step is to find x sub n comma y sub n,
which would be the point of x sub zero comma y sub zero,
given by the initial condition.
So because y of zero equals four,
we know x sub zero comma y sub zero equals zero comma four.
Next, we want to find the slope at that point,
which should be given by f of x sub zero comma y sub zero,
in our case, f of zero comma four.
So the slope at this point is equal to f of zero comma four,
where f of x comma y equals two plus five x plus two y,
so the slope is equal to two plus five times zero
plus two times four, which equals ten.
Now we have all the information we need
in order to find the next point,
which will be x sub one comma y sub one.
Notice for x sub one comma y sub one,
we would have an equal zero.
So for x sub one comma y sub one,
we'll first find x sub one where x sub one
is equal to, x sub n would be x sub zero,
plus delta x, which would be zero,
plus 0.5, which equals 0.5.
So the new x coordinate is equal to 0.5,
and because delta x is always 0.5,
to find each x coordinate, we always just add 0.5.
Now let's find y sub one.
y sub one, the new y coordinate, is equal to y sub zero
plus f of x sub zero comma y sub zero,
which we already found here, times delta x.
So we'd have y sub zero is four, the previous y coordinate,
plus the slope at the point zero comma four, which is 10
times delta x, which is 0.5, which gives us
four plus five, which equals nine.
So x sub one comma y sub one is 0.5 comma nine.
Now we're going to go ahead and find the x coordinate
as well as the y coordinate for each approximation,
even though our question only asks for the y coordinates.
Before we go on, though,
let's look at what we did graphically.
The given differential equation
generates the red slope field.
Initial condition y of zero equals four
gives us this first point,
which is this blue point, zero comma four.
Our first approximation was this point here.
In order to find the x coordinate of this point,
we started with the previous x coordinate
and added delta x, which is this horizontal distance,
and then to find the new y coordinate of this point,
we took the previous y coordinate
and added this vertical distance here,
which is equal to the product of the slope at this point,
which is f of x sub zero comma y sub zero and delta x.
So for each successive approximation,
to find the x coordinate, we always take
the previous x coordinate and add delta x,
and to find the new y coordinate,
we always take the previous y coordinate
and add the product of the slope
at the previous point and delta x.
And all this is labelled here.
Notice how our next three approximations
will give us these three points,
so notice now our approximate solution is not the best
because this blue function is the actual solution.
If we wanted to have a better approximation,
we'd have to make delta x smaller.
Now going back to our work.
So remember, our next step here is to find
the slope at this new point, which is equal to
f of 0.5 comma nine, which would be two plus five...
times 0.5 plus two times nine, which equals 22.5.
So x sub two comma y sub two is going to be equal to...
Well we know x sub two is going to be equal to x sub one,
which is 0.5, plus delta x, which is also 0.5,
so x sub two is equal to one.
And now y sub two is equal to y sub one,
the previous y coordinate, plus the slope
at the previous point, which is
f of x sub one comma y sub one,
which we already found here, times delta x.
So y sub two is equal to nine plus 22.5 times 0.5...
which comes out to 20.25.
So x sub two comma y sub two is one comma 20.25.
Now we'll find the slope at this new point,
which would be f of one comma 20.25.
So f of one comma 20.25 is equal to
two plus five times one plus two times 20.25.
This comes out to 47.5.
So now we can find x sub three comma y sub three.
Again, x sub three is equal to x sub two plus delta x,
which would be one plus 0.5, which equals 1.5.
And now y sub three is equal to y sub two plus
f of x sub two comma y sub two times delta x,
so we'd have y sub three is equal to...
y sub two equals 20.25
plus f of x sub two comma y sub two
is f of one comma 20.25, which is 47.5 times delta x.
To save some time, I've already worked this out.
It comes out to 44.
So x sub three comma y sub three is 1.5 comma 44.
And now we need to find the slope at this new point.
So f of one point five comma 44 is equal to
two plus five times 1.5
plus two times 44,
which comes out to 97.5.
And now we can find our last point,
x sub four comma y sub four.
x sub four is equal to x sub three,
which is 1.5, plus delta x, which is 0.5,
which gives us two for x sub four.
y sub four is equal to y sub three plus the slope
at x sub three comma y sub three, which is
f of x sub three comma y sub three, times delta x.
So y sub four is equal to...
Again, y sub three is 44 plus x sub three comma y sub three
is 97.5 times delta x,
so y sub four is equal to 92.75.
So we found our four points of our approximation.
Going back to the graph just for a moment.
These are the four points that we just found.
Remember our question does only ask us
to enter the y-values, so y sub one is nine,
y sub two is 20.25,
y sub three is 44,
and y sub four is 92.75.
I hope you found this helpful.