# Coupled ODE Solver: How it works

Description| How it works| Planetary MotionThis app solves the ODE system using the 4

^{th}order Runge Kutta method. To allow the user to specify the equations in terms of Y

_{1}, Y

_{2}, etc, the initial variables are copied to the cells Y

_{1}, Y

_{2}, etc in the hidden column Y.

A macro is used to run the calculations. Unlike the first and second order ODE solvers, we cannot use Data Tables here as the functions specified by the user can involve many variables (Data Tables can handle only 2 variables at best).

The fourth order Runge-Kutta equations are:

**Y**

_{i+1}=

**Y**

_{i}+ 1/6 [

**K**

_{1}+ 2

**K**

_{2}+ 2

**K**

_{3}+

**K**

_{4}]

where,

**K**

_{1}= h f [t

_{i},

**Y**

_{i}]

**K**

_{2}= h f [t

_{i}+h/2,

**Y**

_{i}+

**K**

_{1}/2]

**K**

_{3}= h f [t

_{i}+h/2,

**Y**

_{i}+

**K**

_{2}/2]

**K**

_{4}= h f [t

_{i}+h,

**Y**

_{i}+

**K**

_{3}]

The derivatives are evaluated by substituting the t and

**Y**values into the cells containing the initial conditions and for this reason, these cells should not have formulae in them. If required, the tool can also be modified to handle a larger number of equations.