  Dependable numerical results from long-time simulations require stable
numerical integration schemes. For Hamiltonian systems, this is achieved with
symplectic integrators, which conserve the symplectic condition and exactly
solve for the dynamics for an approximate Hamiltonian. The conventional
generating function formalism used for Hamiltonian systems is problematic for
magnetic systems, as the Hamiltonian is not easily separable. This paper
presents a derivation of symplectic integrators from a discretized action.
Using this method, it is shown that the integrator due to Boris is a symplectic
integrator in the non-relativistic limit, and a relativistic integrator is
derived.
