3.6.4. Time derivatives of third or higher order

As we have seen so far, we can easily calculate first and second order time derivatives by partial_t() and - if wrapped in time_scheme() - we can select a bunch of time stepping schemes for the first order derivatives. However, if you try to calculate a third or higher time derivatives, e.g. by partial_t(...,3) or partial_t(partial_t(partial_t(...))), pyoomph will not be able to handle this and raises an error. This can only be circumvented by reducing it to a system with time derivatives of first or second order as we have done it in the case of the anharmonic oscillator in the previous section, where the second order ODE was split into two first order ODEs. This procedure can be generalized to an arbitrary degree. E.g. the jerky dynamics of a system \(\dddot{x}=J(x,\dot{x},\ddot{x})\) can be conveniently written as \(\dot{z}=J(x,y,z)\) with \(\dot{y}=z\) and \(\dot{x}=y\).