The examples that follow will use a second order symmetric splitting known as the Strang splitting [S68], [M68]. The following defines a function to evaluate the coefficients to a given precision.
Load a package with some useful example problems.
Symplectic splitting
Symplectic leapfrog
SymplecticPartitionedRungeKutta is an efficient method for solving separable Hamiltonian systems
with favorable long time dynamics.
Splitting is a more general purpose method but it can be used to construct partitioned symplectic methods (though it is somewhat less efficient than SymplecticPartitionedRungeKutta).
Consider the harmonic oscillator which arises from a linear differential system that is governed by the separable Hamiltonian H(p,q) =
+ 
Split the Hamiltonian vector field into independent components governing momentum and position. This is done by setting the relevant right hand sides of the equations to zero.
This composition of weighted (first order) Euler integration steps correspond to the symplectic (second order) leapfrog method.
The method ExplicitEuler could have only been specified once, since the second and third instances would have been filled in cyclically.
This is the result at the end of the integration step.
This invokes the built in integration method corresponding to the symplectic leapfrog integrator.
The result at the end of the integration step is identical to result of the splitting method.
Composition of symplectic leapfrog
This takes the symplectic leapfrog scheme as the base integration method and constructs a fourth order symplectic integrator using a symmetric composition of Yoshida [Y90].
This is the result at the end of the integration step.
This invokes the built in symplectic integration method using coefficients for the fourth order methods of Ruth, Yoshida.
The result at the end of the integration step is identical to result of the composition method.
Hybrid methods
While a closed form solution often does not exist for the entire vector field, in some cases it is possible to analytically solve a system of differential equations for part of the vector field.
When a solution can be found by DSolve, direct numerical evaluation can be used to locally advance the solution.
This idea is implemented in the method .
Harmonic oscillator test example
This example checks that the solution for the exact flows of split components of the harmonic oscillator equations is the same as applying Euler's method to each of the split components.
Hybrid numeric-symbolic splitting methods (ABC flow)
Consider the Arnold, Beltrami and Childress flow, a widely studied model for volume-preserving three dimensional flows.
When applied directly, a volume preserving integrator would not in general preserve symmetries. A symmetry-preserving integrator, such as the implicit midpoint rule, would not preserve volume.
This defines a splitting of the system by setting some of the right hand side components to zero.
The system for Y1 is solvable exactly by DSolve so that we can use the LocallyExact method.
Y2 is not solvable however, so we need to use a suitable numerical integrator in order to obtain the desired properties in the splitting method.
This defines a method for computing the implicit midpoint rule in terms of the built-in ImplicitRungeKutta method.
This defines a second order, volume preserving, reversing symmetry group integrator [M02].
Lotka-Volterra equations
Various numerical integrators for this system are compared within .
Euler's equations
Various numerical integrators for Euler's equations are compared within .
Non-autonomous vector fields
Consider the Duffing oscillator, a forced planar non-autonomous differential system.
This defines a splitting of the system.
The splitting of the time component amongst the vector fields is ambiguous, so the method issues an error message.
NDSolve::spltdep: "The differential system \!\({0, \(\(\(3\\ \(\(Cos[T]\)\)\)\/10 + \(\(Y\_1[T]\)\) - \(Y\_1[T]\)\^3\)\)}\) in the method \!\(\"Splitting\"\) depends on \!\(T\) which is ambiguous. The differential system should be in autonomous form."
NDSolve::initf: "The initialization of the method \!\(NDSolve`Splitting\) failed."
The equations can be extended by introducing a new `dummy' variable Z[T] such that Z[T]==T and specifying how it should be distributed in the split differential systems.
This defines a geometric splitting method which satisfies
for any finite time interval, where
and
are the Lyapunov exponents [M02].
Here is a plot of the solution.