In the previous problem, we did a Euler's method approximation of this function at y
of one and the answer that we got was two point one eight two three eight one which
we rounded it to two point one eight.
They’ve also asked us to check our answer by actually solving the equation and computing
y of one, which will give us an exact answer.
So it will be interesting to see, probably interesting to me and not to any of you but
interesting to see how the exact answer, how much it will differ from the Euler’s method
approximation.
So let's go ahead and check it another way.
We’re going to actually solve the equation this time so what we're going to do is first
of all convert y prime here to dy over dx, just the same thing.
And we get x over y.
And just as in differential equations problems, what we need to do is first separate the variables.
So first we multiply both sides by dx and get dy equals x over y times dx then we'll
multiply both sides by y which will move the y over to the left side and we'll be left
with y dy equals x dx.
So now that we've separated variables, we have y on the left and x's on the right.
Step two is integrating the equation so we integrate like this and now integrating we
will use the power rule.
We'll add one to the exponent and we'll get y squared and divide the coefficient which
is one by the new exponent which is two so we get one-half y squared equals one-half
x squared and then we're going to add c to the right side of the equation.
So we've integrated and now what we want to do if we can is try to solve for y.
So we multiply both sides of the equation by two.
That’ll cancel out the one-half on both sides and we'll have y squared equals x squared
plus two c and remember that c is a differrent kind of thing.
It's an aggregator of the constants in the function so we're going to end up solving
for c.
Once we've solved for y, we're going to plug in the initial condition here and solve for
c.
So c is going to kind of accumulate constants together so let’s go ahead and leave it
for now.
It's somewhat confusing but we're going to take the square root of both sides of the
equation to get this y on its own.
So we got y equals the square root of x squared plus two c.
And now what we'll do is go ahead and plug in the initial condition, y of zero equals
two.
So we'll plug in zero for x and two for y, so we get two equals the square root of zero
squared plus two c.
And now what we can do is of course this zero is going to cancel so we'll be left with two
equals the square root of two c.
We can go ahead and square both sides to get rid of the square root since we're solving
for c and we'll get four equals two c.
We divide both sides by two and we get two equals c.
So now that we've solved for c and gotten two, we can plug it in to into our equation
which we found here.
We want to plug it in wherever it was that you have solved for y so not into this equation
because we're still here at y squared but into the one where we solved for y.
So we plug in c, we plug in two for c and we get y equals the square root of x squared
plus, and we want to plug in two here for c, we get two times two which is four.
So that is our equation for y.
We went ahead and solved the differential equation.
But now we need to, just with Euler's method, in the previous video, we approximated y of
one, now we want to, since we've solved the equation, plug in one for x and get the actual
answer.
So we'll go ahead and do that here and we'll get y equals the square root of one squared
plus four.
So of course that means we have y equals the square root of five.
So when we take the square root of five on our calculator, the answer that we get is
two point two three six zero six seven nine eight.
So you can see, and then if we do a Euler's method, two point one eight two three eight
one.
So you can see here, Euler’s method was an approximation, two point one eight, this
here, y of one is the actual value at two point two three six.
So you can see, they're off by about point zero five.
So the Euler’s method approximation get's us fairly close but is still off considerably,
noticeably from the actual value, two point two four, so rounded.
So hope that gave you guys some clarification about the difference between, you know, actually
solving the equation and getting the exact value for as just using the Euler’s method
approximation.
See you guys next time.
Bye!