Question: solve second question with matlab codes In the second part of the assignment write a MATLAB program to approximate the solution of the initial-value problem
solve second question with matlab codes
In the second part of the assignment write a MATLAB program to approximate the solution of the initial-value problem using Euler's method, 2nd order Runge-Kutta with midpoint method and the 4th order Runge-Kutta method. Use the program to answer the following questions: = = 2 1. Compute an approximate solution of y' = x + y with y(0) = 1 and h = 0.1. Use dsolve' command in MATLAB to compute the exact solution and the absolute relative error at y(0.5). 2. Determine an approximate solution of the initial-value problem y' = t? y 2,y(-2) = 0 for n = 10,20,50 The exact solution of the problem is y(t) = t2 2t 8e-t-2. Plot the approximations and the actual solution for 2 sts 3. Comment on the results. =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
