The implicit midpoint method described by Chambliss and Franklin [Am. J. Phys. 88, 1075 (2020)] is known not to exactly conserve energy for a spatially varying magnetic field, nor does it conserve angular momentum in a constant magnetic field. It is, therefore, not competitive with the widely used Boris solver in plasma physics, which conserves both.

The implicit midpoint algorithm

$r′=r+vΔt+12a(r,v)Δt2,v′−vΔt=12[a(r′,v′)+a(r,v)],$
(1)

where $r′=r(t+Δt), v′=v(t+Δt)$, and $r=r(t), v=v(t)$, corresponding to Chambliss and Franklin's1 Eqs. (5) and (6), takes the form of

$r′=r+vΔt+12ωv×B̂Δt2,$
(2)
$v′−v=Δt2[ω′v′×B̂′+ωv×B̂]$
(3)

for a charged particle q in a general magnetic field $B(r)=B(r)B̂(r)$, with cyclotron frequency $ω(r)=qB(r)/m$. This algorithm is known not to conserve energy. As noted by Boris,2 dotting both sides of Eq. (3) with $(v′+v)$ gives

$v′2−v2=Δt2(v′+v)·[ω′v′×B̂′+ωv×B̂].$
(4)

In a spatially varying magnetic field, there is no reason why the triple product on the RHS of Eq. (4) should vanish, and therefore, the kinetic energy is generally not conserved. However, for a constant magnetic field where $ω′=ω$ and $B̂′=B̂$, it would vanish,

$v′2−v2=Δt2ω(v′+v)·[(v′+v)×B̂]=0,$
(5)

which is why Chambliss and Franklin's Fig. 1 showed zero energy error.

This energy conserving feature can be generalized to the case of a nonconstant magnetic field, since as long as the same magnetic field is used to evaluate the acceleration at r′ and r, the RHS of Eq. (4) will still vanish as Eq. (5). This suggests that one should use the common magnetic field at the midpoint, resulting in the Boris solver2

$r̃=r+Δt2v,v′−v=Δt2ω(r̃)(v′+v)×B̂(r̃),$
(6)
$r′=r̃+Δt2v′=r+Δt2(v+v′)$
(7)

widely used in plasma physics.3

Also, it should be further noted that, in a constant magnetic field, both velocity vectors (3) and (6) are rotated the same way. However, the Boris position (7) will remain on the gyrocircle orbit of radius $rg=v/ω$ regardless of the value of $Δt$. As a consequence, it also exactly conserves angular momentum, $r′×v′=r×v$, at all $Δt$. This is because for motion perpendicular to $B̂$, since

$ddt(r2)=2r·v and d(r×v)dt=ω(r·v)B̂,$
(8)

the constancy of r2 implies the conservation of angular momentum. The implicit midpoint position (2), on the other hand, will yield positions on a larger circle tangent to the gyrocircle at the initial position. As a consequence, its angular momentum $r(t)×v(t)$ will oscillate sinusoidally above the initial value as a function of time. This is clearly shown in Chambliss and Franklin's Fig. 2. In contrast, Boris's algorithm would have produced zero error to machine precision.

1.
A.
Chambliss
and
J.
Franklin
, “
A magnetic velocity Verlet method
,”
Am. J. Phys.
88
,
1075
(
2020
).
2.
J.
Boris
, in
Proceedings of the Fourth Conference on Numerical Simulation of Plasmas
(
Naval Research Laboratory
,
Washington, DC
,
1970
), p.
3
.
3.
C.
Birdsall
and
A.
Langdon
,
Plasma Physics via Computer Simulation
(
McGraw-Hill, Inc.
,
New York
,
1985
), p.
356
.