Question: In MATLAB, write an ordinary differential equation ( ODE ) solver that implements the RK 4 and RK 5 methods for approximating an ODE like

In MATLAB, write an ordinary differential equation (ODE) solver that implements the RK4 and RK5 methods for approximating an ODE like the methodology performed by the MATLAB function ODE45. This will be produced as a group, but the final solution/explanation must be submitted by each student. While the code will be a group effort, the explanation must be done individually. The solver must have the following parts to it:
* The function must receive a differential equation y=f(t,y), domain limits [t0,tn] and initial condition f (0)=x as inputs.
* The function must adjust the step-size on each iteration based on the size of the error between the RK4 and RK5 methods. (You are to determine the error-size/adjustment criterion, implement it and then justify it.)
* The function must produce a table which correlates the iteration count, step-size, RK45 approximation, the true solution, and the error between the two.
*Uses the following ODE, initial conditions, and domain: (,)=()+3
(0)=0
(0)=1
[0,4]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!