I am approximating a solution to a first order LODE using Euler's method. I made two tables, one usi

Ricardo Berger

Ricardo Berger

Answered question

2022-04-30

I am approximating a solution to a first order LODE using Euler's method. I made two tables, one using a step size of .01 and another using .05 ( I had to start at x=0 and end at x=1). I am not understanding the directions for the second part of my assignment:

It states that the order of numerical methods (like Euler's) is based upon the bound for the cummulative error; i.e. for the cummulative error at, say x=2, is bounded by C h n , where C is a generally unknown constant and n is the order. For Euler's method, plot the points:
( 0.1 , ϕ ( 1 ) y 10 ) ,
( .05 , ϕ ( 1 ) y 20 ) ,
( .025 , ϕ ( 1 ) y 40 ) ,
( .0125 , ϕ ( 1 ) y 80 ) ,
( .00625 , ϕ ( 1 ) y 160 )
And then fit a line to the above data of the form C h. I don't understand, am I supposed to plot these using a step size of .1 or .05? Or am I supposed to use another step size?
Any clarification is appreciated.
Thanks
Edit:
The LODE I am given is y = x + 2 y , y ( 0 ) = 1 and the exact solution I found was ϕ ( x ) = 1 4 ( 2 x + 5 e 2 x 1 ).

Answer & Explanation

Gianna Travis

Gianna Travis

Beginner2022-05-01Added 11 answers

From the way I see it, if ϕ is the exact solution, the teacher probably wants you to compare the errors at x = 1 for different step sizes.

Take for example the one before the last
( 0.0125 , ϕ ( 1 ) y 80 )
the step size to use here is h such that n = 80 and 0 + n h = 1 h = 1 / 80 = 0.0125 (I didn't see that coming).
The first number in the bracket is the step size to use for each point. For each point evaluate the approximated value of ϕ ( 1 ) y n Then ploy the graph of points ( h n , ϵ n ) where ϵ n = ϕ ( 1 ) y n and h n is the equivalent step size.

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?