CashKarp

Contents

CashKarp#

class brainpy.integrators.ode.CashKarp(f, var_type=None, dt=None, name=None, adaptive=None, tol=None, show_code=False, state_delays=None, neutral_delays=None)[source]#

The Cash–Karp method for ODEs.

The Cash–Karp method was proposed by Professor Jeff R. Cash from Imperial College London and Alan H. Karp from IBM Scientific Center. it uses six function evaluations to calculate fourth- and fifth-order accurate solutions. The difference between these solutions is then taken to be the error of the (fourth order) solution. This error estimate is very convenient for adaptive stepsize integration algorithms.

It has the characteristics of:

  • method stage = 6

  • method order = 4

  • Butcher Tables:

\[\begin{split}\begin{array}{l|lllll} 0 & & & & & & \\ 1 / 5 & 1 / 5 & & & & & \\ 3 / 10 & 3 / 40 & 9 / 40 & & & \\ 3 / 5 & 3 / 10 & -9 / 10 & 6 / 5 & & \\ 1 & -11 / 54 & 5 / 2 & -70 / 27 & 35 / 27 & & \\ 7 / 8 & 1631 / 55296 & 175 / 512 & 575 / 13824 & 44275 / 110592 & 253 / 4096 & \\ \hline & 37 / 378 & 0 & 250 / 621 & 125 / 594 & 0 & 512 / 1771 \\ & 2825 / 27648 & 0 & 18575 / 48384 & 13525 / 55296 & 277 / 14336 & 1 / 4 \end{array}\end{split}\]

References