# Solving ODEs using Three Forms of Forth Order Runge Kutta

by admin in Differential Equations , Math, Statistics, and Optimization , MATLAB Family on April 27, 2019This code solves a single ordinary differential equation (ODE) using three forms of fourth order Runge Kutta (RK4). A comparison between the solutions on one chart will be produce, with a second chart presenting the errors of these forms.

### Code Outputs:

- Chart comparison of the exact solution (if exist) with the numerical Solutions.
- Error chart of the three RK4 forms.
- Maximum Error Value of each RK4 form.

Max. Error-First-Form = 2.8058e-05

Max. Error-Second-Form = 2.8075e-06

Max. Error-Third-Form = 2.8058e-05

### Input Requirements:

- ODE you want to solve.
- Initial Condition.
- Exact solution (optional)

### About the Method:

**Runge–Kutta methods** are a family of implicit and explicit iterative methods, which include the well-known routine called the Euler Method, used in temporal discretization for the approximate solutions of ordinary differential equations. These methods were developed around 1900 by the German mathematicians Carl Runge and Wilhelm Kutta.

### List of Runge–Kutta methods:

Share Now!