Consider the following differential equation:
y^2 = 0, y(0) = yo
Create a MATLAB program that will solve this differential equation using the Euler method. Assume that the initial time is t0 = 0.
The following should be inputs to your MATLAB program:
- Final Time
- Initial condition
- Time Step
The program should display three columns of data: the approximate solution, the actual solution, and t+1.
Test your program with the following parameters: Final time = 3.0 and yo = 1. Produce a plot with the Euler method using At = 0.3 and 0.03, along with the exact solution.