# Testing Second-Order Integrators for Motion of a Charge in a Homogeneous Magnetic Field

Testing Second-Order Integrators for Motion of a Charge in a Homogeneous Magnetic Field

Consider the nonrelativistic motion of a point charge in a plane that cuts a homogeneous magnetic field perpendicularly. Two properties of this system are of interest in this context. First, the exact solution is simple: a circular orbit through which the particle moves with constant angular velocity. Second, the force term depends on the velocity (and only on the velocity, independent of time and position). This Demonstration lets you see the deviations from the exact solution for various time-stepping algorithms ("methods") in various formats ("modes").

The control labels are explained in tooltips that appear when you mouse over them. Abbreviations for methods: ALF = asynchronous leapfrog, DALF = densified asynchronous leapfrog, ADALF = average densified asynchronous leapfrog, RK2 = second-order Runge–Kutta. Leapfrog methods of integration update positions and velocities at alternating points, thus "leapfrogging" over one other.