Implement eulers method and 4th order runge-kutta rk method


- Implement Euler's method and 4th order Runge-Kutta (RK) method in Matlab. Keep your programming so that you can change the ODE and step size dt easily.

- Bench mark your code with linear problem of form y' + p(t)y = g(t) on [t0,t1]; y(t0) = y0.Choose your own functions p(t) and g(t) such that they are continuous on an interval [t0,t1] and solve yourInitial Value Problem(IVP) analytically.

- Use your Eulers method and 4th order Runge-Kutta method to approximate the solution to this IVP using the same choice of interval [t0,t1], step size dt for both algorithms. Plot your exact solution and numerical solutions (Euler and RK) on the same axes and include a legend to differentiate the three lines.

- Change step size dt to analyze the order of accuracy. Write a report. Include results of your experiments and theoretical expectation. Attach the code.

Request for Solution File

Ask an Expert for Answer!!
Mathematics: Implement eulers method and 4th order runge-kutta rk method
Reference No:- TGS02353265

Expected delivery within 24 Hours