Determining graphed solution to Euler’s method is incorrect

euler's methodordinary differential equations

A sample differential equations exam shows a y-t graph for dy/dt = f(y) with the initial condition y(0) = 2, wherein the plot was was determined using Euler's method. The sample answer states where the error occurs in the graph, but I'd like to understand why this is an error.

The prompt:
"Bart and Lisa are working on their Differential Equations homework to approximate the solution of an equation of the form dy/dt = f(y), y(0)=2 using Euler's method. Bart writes his own computer program and produces the picture below. Lisa sees the picture and says "Bart, I don't know what the solution looks like, but I know your program has an error." Say how Lisa knew Bart's program has an error. Be specific."

The graph included in the problem.

As you can see, (t,y) = (3,3) and (5,3) are circled on the graph by pencil, and the answer is stated as "Bart, you have 2 values for f(3); one positive and one negative!"

The course textbook does not appear to have a similar problem. Moreover, the chapter that discusses Euler's method has examples with y-t graphs that appear to oscillate, so I don't understand how those could be valid but this situation is invalid.

Also, if f(3) cannot have both positive and negative slope, how is this any different than the negative and positive slope occurring at other f(y) values, such as the slope at f(1) alternating between negative, positive, and then negative?

Best Answer

When your system is autonomous, such as $$y'=f(y)$$ the slope depends only on $y$ values.

Thus you can not have two different slopes at the same $y$.

When you apply Euler Method with a step size which makes the numerical method to be unstable, these kind of oscillations is not unusual.

The numerical solution in these cases is not a good representative of the actual solution.

Related Question