A Penning trap uses a combination of electric and magnetic fields to confine ions in a cavity bounded by paraboloids, creating quadrupole fields. The plot shows the path for two ions for initial conditions and with energy .
The equations for the Coulomb forces between the two ions and the Lorentz force from a constant magnetic field in the direction can be decoupled by introducing relative coordinates ,
where and are characteristic frequencies and a scaled charge. Using cylindrical coordinates, the variables can be separated. Introducing a conserved quantity for the -angular dependence, and simplifying yields the equations of motion
This gives an effective potential
with parameters and , the equations can be transformed to a system of four linear differential equations with the variables and .
 G. Baumann, Mathematica for Theoretical Physics: Electrodynamics, Quantum Mechanics, General Relativity, and Fractals, 2nd ed., New York: Springer, 2005.