Question: Use MATLAB Question 1: Apply the Euler method to solve from to . Cut and paste the above snippet of code into the MATLAB editor.
Use MATLAB
Question 1: Apply the Euler method to solve

from
to
.
Cut and paste the above snippet of code into the MATLAB editor. Modify as necessary and save it as a .m file in order to do the following:
Compute the exact solution and use your program to do the following:
Figure out what is the minimum value of N that you need to get an error smaller than 0.01 at the final time. Do this by experimenting with N until you get a small enough error.
Plot the computed and exact solution using this value of N.
Show the method is approximately second order by doubling N and computing the ratio of the errors.
You should hand in a printout of your code, any figures you print, and a report of a few sentences answering all the questions.
Here is the code they gave us for a sample problem... we must use the same code just modify it to solve this ODE.


Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
