Neutron star emission originates typically from its magnetosphere due to
radiating electrons. Trajectories of relativistic charged particles under
uniform electromagnetic fields can be calculated analytically. However, under
more complex and realistic fields, numerical solutions are required. Two common
schemes are the Boris method, which solves the full equations of motion, and
the guiding center approximation (GCA), which only evolves the orbital center.
We compare both methods in a series of tests, discuss their characteristics and
quantify their accuracy. We apply the methods to dipolar, quadrupolar, and
quadrudipolar magnetic fields, as applicable for magnetospheres. It is
essential to consider such realistic neutron star magnetic field geometries to
model the emission from magnetars and pulsars. Our work can assist the Neutron
Star Interior Composition ExploreR (NICER) to understand emission from the
surface and magnetosphere of neutron stars and to study their composition.Comment: 5 pages, 4 figures, to be published in IEEE Xplor