The Cash Karp method solves ordinary differential equations with initial conditions. The Cash Karp method works with an adaptive step rate and is computationally more efficient than the Euler method and the Runge Kutta method. Details
![]() |
X is an array of strings of variables. |
![]() |
time start is the start point of the ODE. The default is 0. |
![]() |
time end is the end point of the time interval under investigation. The default is 1.0. |
![]() |
h is the step rate at the beginning of the algorithm. The Cash Karp algorithm works with an adaptive step rate. The default is 0.1. |
![]() |
X0 is the vector of the start condition
![]() |
![]() |
accuracy controls the accuracy of the solutions. The default is 0.0, which specifies the maximum deviation of the calculated solution from the actual solution. |
![]() |
time is the string denoting the time variable. The default variable is t. |
![]() |
F(X,t) is a 1D array of strings representing the right sides of the differential equations. |
![]() |
Times is a 1D array representing the time steps. The ODE Cash Karp method yields arbitrarily chosen time steps between time start and time end. |
![]() |
X Values is a 2D array of the solution vector
![]() ![]() |
![]() |
ticks is the time in milliseconds for the whole calculation. |
![]() |
errors are produced by using the wrong inputs X, X0, and F(X,t). |
The Cash Karp method is an embedded Runge Kutta formula and is based on a fifth order strategy (with six steps).
and
with
The and
are fixed real numbers. This choice determines the quality of the method.
The actual step size can be determined with the help of the accuracy value, the old step size h and the difference
![]() | Note It might happen that the value of the last element in Times turns out to be greater than the value entered in time end. This is a property of the Cash Karp method. This method is very accurate, but you have no control of the step rate. In order to guarantee that the end point specified in time end is taken into consideration, the last step may turn out to be too long. |
The following diagram shows the solution of the following system of ordinary differential equations in a 3D representation.
The above equations and boundary conditions are entered on the front panel as: