Use Euler's method with step size 0.2 to estimate y(0.6) where y(x) is the solution of the initial v

migongoniwt

migongoniwt

Answered question

2022-06-20

Use Euler's method with step size 0.2 to estimate y(0.6) where y(x) is the solution of the initial value problem y' = cos(x+y), y(0) = 0
So on a high level, we're using Euler's method to approximate a function that we don't know but only know the derivative equation for and the initial. We're going to use Euler's to get approximate values of the unknown function using approximations.
So is this right:
original x = 0, y = 0
y 1 = 0 + 0.2 ( c o s ( 0 ) ) = 0.2
so new x = 0.2 and new y = 0.2
y 2 = 0.2 + 0.2 ( c o s ( 0.2 + 0.2 ) ) 0.384
y 3 = 0.384 + 0.2 ( c o s ( 0.4 + 0.384 ) ) = 0.384 + 0.141 0.525
Is that right? The numbers are just going to be hard to work with right?

Answer & Explanation

boomzwamhc

boomzwamhc

Beginner2022-06-21Added 17 answers

Yes you are correct. You are using an explicit Euler method with h = 0.2 and each step is calculated via
y n = y n 1 + h y ( x n 1 , y n 1 )
which you did correct. The numbers will be harder to work with but you can either use a computer/calculator to store the "full" number or if specified by the question round the current numbers to a certain factor.

The solutions to you problem in each step, using python, are:
y t = 0.2 = 0.2 y t = 0.4 = 0.38421219880057705 y t = 0.6 = 0.5258011762649013
As you can see the last number is 0.526 rounded to three decimals which differs by 0.001 form your answer. This might be beacuse you just cut off the last decimals or you rounded in each step and this rounding error propagated forward, explaining this difference.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?