What advantages have a symplectic or geometric integrator over a simple one, say, RK4? I heard that a symplectic integration algorithm has a property related to the phase space of a system, but i don't understand much further than that.
I'm interested in applying that method to a non-linear and forced oscillator, but I don't know what advantages it has over the Runge-Kutta method.
I would appreciate an explanation.
 A: With symplectic integration schemes you are concerned with preserving the flow $\varphi(t)$ of your hamiltonian which is defined as a symplectic transformation. Classical integration schemes such as RK4 do not necessarily preserve this. The flow of a system is a mapping which progresses the solution over a time $t$. If you you have a Hamiltonian system with an initial condition given by $$ y(0) = (p(0),q(0))^T,$$ then we define the flow as
$$ \varphi(y(0)) = y(t).$$ Mathematical we say
$$ \det \dot{\varphi} =1. $$ There are many advantages over using a symplectic integration scheme for e.g. conserving first integrals and long term stability due to the preservation of the flow.
To illustrate with an example consider orbital motion given by the simple Kepler problem with associated Hamiltonian
$$H(p_i,q_i) = \frac{(p_1^2+p_2^2+p_3^2)}{2} - \frac{1}{\sqrt{q_1^2+q_2^2+q_3^2}},$$
where we have set $GM=1$. Applying the following values $q = (0.8, 0.6, 0),p = (0, 1, 0.5)$ and subjecting the hamiltonian to a first order explicit RK and also a first order symplectic Euler scheme we have the following output:

Another great advangtage is the fact that symplectic integration schemes prserve conserved quantities such as total system energy and angular momentum. See below for a plot:
So in the first two images we can see that the flow remains invariant for the symplectic scheme as we know the solution to the Kepler problem is a ellipse. Secondly we can see that over the whole simulation, using the symplectic scheme the change in energy remains at zero correct to 3 decimal places.
