Question: 1. Write a function to solve a second order differential equation using the Euler Method. (4 Points) 2. Use the function to solve the differential

1. Write a function to solve a second order differential equation using the Euler Method. (4 Points) 2. Use the function to solve the differential equation: y"(t) + y(t) = 0 where y(0) = 1 and y/(0) = 0. (2 Points) 3. Plot (i) y(t) v/s t, (ii) y'(t) v/s t, and (iii) y'(t) v/s y(t) on three separate subplots. Label figures properly. (3 Points) 4. Is this the solution that you expected? Why or why not? Explain. (1 Point) 5. (EXTRA CREDIT) Use Matlab/Python built-in function to solve the differential equation. Plot the solution on the same graph. Discuss your observations. Plot the error between the two solutions as a function of time. (5 Points) Could you use Matlab please. Thank you! 1. Write a function to solve a second order differential equation using the Euler Method. (4 Points) 2. Use the function to solve the differential equation: y"(t) + y(t) = 0 where y(0) = 1 and y/(0) = 0. (2 Points) 3. Plot (i) y(t) v/s t, (ii) y'(t) v/s t, and (iii) y'(t) v/s y(t) on three separate subplots. Label figures properly. (3 Points) 4. Is this the solution that you expected? Why or why not? Explain. (1 Point) 5. (EXTRA CREDIT) Use Matlab/Python built-in function to solve the differential equation. Plot the solution on the same graph. Discuss your observations. Plot the error between the two solutions as a function of time. (5 Points) Could you use Matlab please. Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
