# ASSIST: An Ephemeris-Quality Test Particle Integrator

Matthew J. Holman Center for Astrophysics | Harvard & Smithsonian, 60 Garden St., Cambridge, MA 02138, USA Matthew J. Holman<EMAIL_ADDRESS>Arya Akmal Montgomery College, Rockville, MD 20850, USA  Center for Astrophysics | Harvard & Smithsonian, 60 Garden St., Cambridge, MA 02138, USA  Davide Farnocchia Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Dr., Pasadena, CA 91109, USA  Hanno Rein Department of Astronomy and Astrophysics, University of Toronto, Toronto, Ontario, M5S 3H4, Canada  Matthew J. Payne Center for Astrophysics | Harvard & Smithsonian, 60 Garden St., MS 51, Cambridge, MA 02138, USA  Robert Weryk Department of Physics and Astronomy, The University of Western Ontario, 1151 Richmond Street, London ON N6A 3K7, Canada  Daniel Tamayo Department of Physics, Harvey Mudd College, 301 Platt Blvd., Claremont, CA 91711, USA  David M. Hernandez Center for Astrophysics | Harvard & Smithsonian, 60 Garden St., MS 51, Cambridge, MA 02138, USA  Yale University, 52 Hillhouse, New Haven, CT 06511, USA

(Revised 28 March 2023)

###### Abstract

We introduce ASSIST, a software package for ephemeris-quality integrations of
test particles. ASSIST is an extension of the REBOUND framework and makes use
of its IAS15 integrator to integrate test particle trajectories in the field
of the Sun, Moon, planets, and 16 massive asteroids, with the positions of the
masses coming from the JPL DE441 ephemeris and its associated asteroid
perturber file. The package incorporates the most significant gravitational
harmonics and general relativistic corrections. ASSIST also accounts for
position- and velocity-dependent non-gravitational effects. The first order
variational equations are included for all terms to support orbit fitting and
covariance mapping. This new framework is meant to provide an open-source
package written in a modern language to enable high-precision orbital analysis
and science by the small body community. ASSIST is open source, freely
distributed under the GNU General Public license, version 3.

††journal: PSJ, 27 January 2023††software: ASSIST, Holman et al (2023) :
https://doi.org/10.5281/zenodo.7778017

##  1 Introduction

It is well known that the $n$-body equations of motion involving gravitational
interactions among more than two bodies (Murray & Dermott, 2000). Practical
applications thus require perturbative or numerical treatment. Numerical
approaches have become increasingly accurate since the advent of fast
electronic computers, beginning in the second half of the twentieth century.
The concomitant development of modern algorithms for this purpose has advanced
significantly over the past few decades.

The introduction of symplectic integrators for the $n$-body problem
contributed to a resurgence of interest and research in long-term solar system
dynamics (Gladman et al., 1991; Wisdom & Holman, 1991). For numerical
integrations of systems over billions of years it is particularly important to
capture key properties, such as conservation of energy and angular momentum,
secular and mean motion resonances, and intrinsic dynamical chaos. However,
with the availability of extremely precise observations, such as radar ranging
(Ostro et al., 2002), stellar occultations (Ferreira et al., 2022), and space-
based astrometry (Tanga et al., 2022), the study of short-term dynamics has
becoming increasing relevant. That is the focus of this paper.

The specific problem we consider is that of a massless _test particle_ moving
in the gravitational field of the Sun, planets, Moon, and a set of massive
asteroids, with the pre-computed, time-dependent positions and velocities of
these massive bodies provided by reliable ephemerides. For this, we develop
ASSIST, a software package for ephemeris-quality integrations of test
particles. ASSIST is an extension of the REBOUND framework (Rein & Liu, 2012)
and makes use of its IAS15 integrator (Rein & Spiegel, 2015). The emphasis is
accuracy, with a model that encompasses all the relevant physical effects.
Possible applications include accurately fitting orbits and detailed tests of
gravity itself.

The standard of reference for solar system small body ephemeris computations
is the Horizons service,111https://ssd.jpl.nasa.gov/horizons/ developed and
maintained by the Solar System Dynamics Group at the Jet Propulsion Laboratory
(JPL). Although the underlying source code is not public, the Horizons system
is publicly accessible via a web interface, as well as through an API. The JPL
small-body orbit software is an ideal basis of comparison since its accuracy
has been thoroughly tested by observations as well as space missions (e.g.,
Farnocchia et al., 2021).

It should be noted that a number of software packages have been developed and
are available specifically for integrating and fitting orbits over
observational time scales. These include OrbFit from the University of Pisa’s
Celestial Mechanics Group (Orbfit Consortium, 2011), Find_Orb from Project
Pluto222https://www.projectpluto.com/find_orb.htm, OpenOrb from the University
of Helsinki (Granvik et al., 2009), and the package developed by Bernstein &
Khushalani (2000), also named orbfit, for fitting the orbits of transneptunian
objects. Each, as well as others, is used effectively by members of the small
body community.

This raises an obvious question: why develop another such package? Our
motivations for developing a new integrator include using state of the art
numerical techniques, using a more current language (C99), providing Python
wrappers so that the tools are accessible to a wider audience, and
transitioning away from file-based processing to enhance computational speed.

In addition to matching the integrated output of Horizons, we also have
technical goals for the integrator that are driven by the precision of current
and future data sets. can deliver sub-milli-arcsecond (mas) astrometry for
bright asteroids (Tanga et al., 2022). Gaussian process regression, applied to
Dark Energy Camera astrometry of the TNO Eris, reached residuals of 5 mas
(Fortino et al., 2021). with the Rubin Observatory’s Legacy Survey of Space
and Time (LSST). Thus, it is essential that the precision of the numerical
integration tools used to model such objects exceeds that of the data. We
adopt as a target that the numerical errors for a main belt asteroid result in
an astrometric uncertainty of no more than 1 milli-arcsecond over a ten year
integration. The JPL small body code meets these goals, but it is not
available to the community other than through web interfaces.

The remainder of this paper is organized as follows. In §2, we describe the
overall integrator. In §3, we present the equations of motion. In §4, we
present tests of the integrator and its components. In §5, we describe the
Python wrapper. Finally, in §6, we discuss the implications of our results and
describe possible future work.

##  2 REBOUND IAS15 Integrator

ASSIST is built in the framework of the REBOUND package (Rein & Liu, 2012).
REBOUND is a collection of numerical integrators, with associated tools,
designed to carry out investigations of solar system dynamics. It provides a
consistent, well-documented environment. The code is written in C99 and is
available on Github 333https://github.com/hannorein/rebound.

Although other integrators included in REBOUND could be used with the
equations of motion described in Sec. 3, we focus on the IAS15 integrator
(Rein & Spiegel, 2015). IAS15 is a predictor-corrector method, based on the
RADAU integrator (Everhart, 1985). However, IAS15 includes compensated
summation (Kahan, 1965). It is highly efficient, and for some problems and
specific phase space variables, IAS15’s error grows as the square root of the
number of steps, which is optimal (Brouwer, 1937). Although this is not fully
appreciated, even by many dynamicists, the RADAU and IAS15 integrators are
general purpose tools that happen to be very well suited to integrating
equations of motion that have very smooth solutions, such as the $n$-body
problem (Everhart, 1985). Therefore, it is straightforward to include
additional terms in the equations of motion.

The REBOUNDx extension to REBOUND provides a convenient, general framework for
the addition of such terms to the equations of motion and is the natural
choice for most such work (Tamayo et al., 2020). However, although the
mechanism of extending REBOUND is similar to that of REBOUNDx, ASSIST is a
highly specialized package that is far less flexible by design and necessity.
Because the positions and velocities of the perturbers come from the DE441
ephemeris (Park et al., 2021), the coordinate frame, time scale, masses, and
other physical constants are fixed and the test particles must abide by those.
We chose to develop ASSIST as a distinct package to enforce self-consistency
of those units, as well as to limit the dependencies of ASSIST to only the
REBOUND package.

##  3 Equations of Motion

We integrate the orbits of small bodies as massless test particles. That is,
they are subject to the gravitational influence of the massive bodies in the
system, and may also be subject to non-gravitational effects, but they do not
themselves affect the trajectories of their perturbers. The time scale used is
barycentric dynamical time
(TDB)444https://www.iau.org/static/resolutions/IAU2006_Resol3.pdf. The
coordinates are barycentric and in the International Celestial Reference Frame
(ICRF) (Charlot et al., 2020).

###  3.1 Perturbers

In contrast to the usual IAS15 $n$-body integrator, which integrates the
orbits of systems of fully interacting massive bodies, along with the orbits
of test particles moving in the field of massive bodies, in our integrator,
the positions of the perturbing objects are known as a function of time. We
include the direct Newtonian acceleration from the Sun, planets, Moon, Pluto,
and 16 massive asteroids.

The positions of the Sun, Moon, planets, and Pluto are given by JPL’s DE441
ephemeris (Park et al., 2021). These are determined by evaluating Chebyshev
polynomials tabulated in binary SPK format (Acton et al., 2018). These provide
the polynomial coefficients in time segments that span the years -13200 to
17191. The extracted positions are barycentric, in the ICRF equatorial frame.
As noted earlier, we adopt the same frame for all internal calculations. This
avoids unnecessary coordinate transformations and simplifies the equations of
motion.

There is a corresponding file for a set of 16 massive asteroids, also in SPK
format (Farnocchia,
2021).555ftp://ssd.jpl.nasa.gov/pub/eph/small_bodies/asteroids_de441/SB441_IOM392R-21-005_perturbers.pdf
The positions of the massive asteroids are also in an equatorial frame but are
heliocentric. We convert these internally to barycentric, using the position
of the Sun from the DE441 ephemeris, for consistency.

We developed library routines to access the SPK-format files. These routines
make use of highly optimized “memory mapping” for higher performance, while
allowing thread-safe concurrent access with transparent disk caching. The
independent variable in the ephemeris routines is the number of days (TDB)
relative to a specified reference date. This avoids the loss of precision in
representing time that would come with a large number of unchanging leading
digits in the full Julian date. It can be important to retain this precision
when small time steps are used, such as during close encounters. We adopt
J2000.0 (JD 2451545.0/2000-01-01.5 TDB) as the reference date.

###  3.2 Relativistic Corrections

We implement three models to account for the effects of general relativity.
These can be selected by the user. The first includes only the central
potential for the Sun that matches the apsidal precession rate from GR (Nobili
& Roxburgh, 1986). The second includes the effects from the Sun only with the
following expression (Damour & Deruelle, 1985; Farnocchia et al., 2015):

$\mathbf{a}_{REL}=\frac{GM_{\odot}}{c^{2}|\mathbf{r}|^{3}}\left[\left(\frac{4GM_{\odot}}{|\mathbf{r}|}-|\mathbf{v}|^{2}\right)\mathbf{r}+4\left(\mathbf{r}\cdot\mathbf{v}\right)\mathbf{v}\right],$
(1)

where $\mathbf{r}$ and $\mathbf{v}$ in this expression are the heliocentric
position and velocity of the test particle, and $\mathbf{a}_{REL}$ is the
heliocentric acceleration due to solar GR with this simplified model. These
two models are faster but less accurate than the Parameterized Post-Newtonian
(PPN, also known as Einstein-Infeld-Hoffman) formulation for the Sun and
planets, assuming the body whose orbit is being integrated is a test particle
(Moyer, 2003). The equations of motion for point particles in the PPN
formulation, reproduced for reference, are as follows

$\displaystyle\ddot{\mathbf{r}}_{i}$ $\displaystyle=$
$\displaystyle\sum_{j\neq
i}\frac{\mu_{j}\left(\mathbf{r}_{j}-\mathbf{r}_{i}\right)}{r_{ij}^{3}}\left\\{1-\frac{2(\beta+\gamma)}{c^{2}}\sum_{l\neq
i}\frac{\mu_{l}}{r_{il}}-\frac{2\beta-1}{c^{2}}\sum_{k\neq
j}\frac{\mu_{k}}{r_{jk}}+\gamma\left(\frac{v_{i}}{c}\right)^{2}+(1+\gamma)\left(\frac{v_{j}}{c}\right)^{2}\right.$
$\displaystyle\left.-\frac{2(1+\gamma)}{c^{2}}\dot{\mathbf{r}}_{i}\cdot\dot{\mathbf{r}}_{j}-\frac{3}{2c^{2}}\left[\frac{(\mathbf{r}_{i}-\mathbf{r}_{j})\cdot\dot{\mathbf{r}}_{j}}{r_{ij}}\right]^{2}+\frac{1}{2c^{2}}\left(\mathbf{r}_{j}-\mathbf{r}_{i}\right)\cdot\ddot{\mathbf{r}}_{j}\right\\}$
$\displaystyle+\frac{1}{c^{2}}\sum_{j\neq
i}\frac{\mu_{j}}{r_{ij}^{3}}\left\\{\left[\mathbf{r}_{i}-\mathbf{r}_{j}\right]\cdot\left[(2+2\gamma)\dot{\mathbf{r}}_{i}-(1+2\gamma)\dot{\mathbf{r}}_{j}\right]\right\\}\left(\dot{\mathbf{r}}_{i}-\dot{\mathbf{r}}_{j}\right)$
$\displaystyle+\frac{3+4\gamma}{2c^{2}}\sum_{j\neq
i}\frac{\mu_{j}\ddot{\mathbf{r}}_{j}}{r_{ij}}+\sum_{m=1}^{16}\frac{\mu_{m}(\mathbf{r}_{m}-\mathbf{r}_{i})}{r_{im}^{3}},$

which is accurate to $O(v^{2}/c^{2})$. The gravitational parameter for body
$j$ is given by $\mu_{j}=GM_{j}$, where $G$ is the gravitational constant and
$M_{j}$ is the gravitational mass of the body. For this expression, the
position vectors $\mathbf{r}_{i}$ of the test particle and massive bodies are
barycentric. The Euclidean distance between bodies $i$ and $j$ is given by
$r_{ij}$. The speed of light is given by $c$. We assume $\beta=\gamma=1$, as
is predicted by general relativity (Will, 1971), but these values can be
easily changed by the user. The velocities are given by
$v_{i}=|\dot{\mathbf{r}}_{i}|$. The final summation over asteroid indices $m$
in equation 3.2 reflects the fact that the GR corrections due to the massive
asteroids are insignificant and can be ignored (the index $j$ does not include
asteroids.) The PPN model is used by the JPL small body integrator. (The
Horizons service also uses the PPN model but restricts the outer loop in
equation 3.2 to the Sun.)

We take one of two approaches for the accelerations $\ddot{\mathbf{r}}_{j}$ on
the right hand side of equation 3.2. One solution is to calculate the
acceleration of the planets; the Newtonian acceleration from the other bodies,
excluding the massive asteroids, is sufficiently accurate, given that the PPN
formulation is $O(v^{2}/c^{2})$. This is the approach recommended in Moyer
(2003). Another solution is to calculate the acceleration from the JPL
ephemeris by taking the next derivative of the Chebyshev polynomials
(described in 3.1). We note that the DE441 ephemeris files are Chebyshev fits
to position with the velocity determined from its derivative; the interpolated
accelerations are not guaranteed to be accurate. However, our integrated
results have matched those of the JPL small-body code.

###  3.3 Gravitational Harmonics

An accurate description of the gravitational field should account for the true
shape of massive bodies (Battin, 1987). We start with the oblateness of the
Sun, which is well-described by the $J_{2}$ zonal harmonic; higher order zonal
harmonics are negligible. The solar $J_{2}$ coefficient is $2.2\times 10^{-7}$
(Park et al., 2021).

Additional higher order gravitational harmonics of the Earth are necessary for
an accurate treatment of near Earth orbits. These are especially important
during close approaches. The Earth’s $J_{2}$, $J_{3}$, $J_{4}$ and $J_{5}$
zonal harmonic coefficients are $1.08\times 10^{-3}$, $-2.53\times 10^{-6}$,
$-1.62\times 10^{-6}$, $-2.28\times 10^{-7}$, respectively. The full precision
of these values are available in the DE441 headers (Park et al., 2021). Our
current implementation truncates the zonal harmonic potential expansion for
the Earth at $J_{4}$, and does not include the $J_{5}$ term.

The mass distribution of the Earth has non-negligible azimuthal asymmetry.
However, we do not account for axial asymmetry effects and include no non-
zonal harmonic terms. These terms may be significant for near-Earth orbits and
can be implemented in future work. Such terms are included by JPL on an ad hoc
basis when needed for specific orbits. For example, Naidu et al. (2021) used
the full $4\times 4$ gravity field of the Earth, including non-zonal
harmonics, to accurately model the trajectory of 2020 CD3, a temporarily
captured “mini-moon” of the Earth.

###  3.4 Non-Gravitational Effects

The orbits of bodies moving under the influence of Newtonian gravity and
relativistic corrections may also be affected by non-gravitational effects
that depend on the intrinsic properties of the body. For asteroids, these
include solar radiation pressure (Vokrouhlický & Milani, 2000) and the
Yarkovsky effect (Vokrouhlický et al., 2015). For comets, non-gravitational
forces can be induced by outgassing from the body.

A detailed, _ab initio_ model of such effects is not practical, as it would
depend on typically unknown details of object shape, composition, and surface
properties. We include these effects with the semi-empirical, parameterized
model of Marsden et al. (1973). These perturbations are reasonably expected to
depend on the position and velocity of the object, in addition to its
intrinsic properties. The parameterized acceleration is given by:

$\ddot{\mathbf{r}}=g(r)\left[A_{1}\frac{\mathbf{r}}{r}+A_{2}\frac{\mathbf{(r\times\dot{r})\times
r}}{|\mathbf{(r\times\dot{r})\times
r}|}+A_{3}\frac{\mathbf{r\times\dot{r}}}{|\mathbf{r\times\dot{r}}|},\right]$
(3)

where $A_{1},A_{2}\ \&\ A_{3}$ are tunable parameters, with units of
acceleration, that incorporate the intrinsic properties of the object. The
three terms account for accelerations in the radial, transverse - in the
direction of motion and normal (to the orbital plane) directions,
respectively. This assumes that the prefactor $g(r)$ of eqn. 3 is general, as
described below.

The prefactor models the dependence of the absorbed solar radiation (for
asteroids) and degree of outgassing (for comets) on distance from the Sun. It
is given by:

$g(r)=\alpha\,(r/r_{0})^{-m}\left[1+(r/r_{0})^{n}\right]^{-k}.$ (4)

The parameters $\alpha$, $r_{0}$, $m$, $n$ and $k$ are specific to each body
being modelled. The function $g(r)$ is unitless. The value of $r_{0}$ is a
normalizing distance. The constants $m$, $n$, and $k$ model the decay of the
effect of non-gravitational acceleration at distance $r$, and $\alpha$ is a
normalization constant (Yeomans et al., 2004). The constant $\alpha$ is set so
that $g(r)=1$ for $r=1$ AU. For asteroids $g(r)$ reduces to
$\left(1~{}\mathrm{AU}/r\right)^{2}$ (Farnocchia et al., 2015). For comets we
set $g(r)$ to the standard expression in Marsden et al. (1973), in which case
$r_{0}$ indicates the distance from the Sun where the solar insolation
primarily contributes to the sublimation of ices.

###  3.5 Variational Equations

In addition to the equations of motion, we implement the first order
variational equations (Rein & Tamayo, 2016). These describe the evolution of
the analytic partial derivatives of each component of a test particle’s
acceleration with respect to each of the components of its initial conditions
$\mathbf{r}$ and $\mathbf{\dot{r}}$, as well as its non-gravitational
parameters $A_{1},A_{2},A_{3}$. The variational equations are essentially the
equations of motion for the phase space difference between neighboring
trajectories, for small initial displacements. These allow one to estimate the
Lyapunov exponents of a given trajectory, as well as support orbit fitting and
covariance mapping (Rein & Tamayo, 2016). The alternative is to compute these
by finite differences by integrating additional test particles with slightly
offset initial conditions, but that process can be slower, more subject to
numerical error and possibly limited by the extent of phase space. We include
terms for the variational equations for all the implemented effects (Newtonian
gravity; Earth $J_{2}$, $J_{3}$ and $J_{4}$; solar $J_{2}$; the Damour &
Deruelle (1985) GR treatment; the Einstein-Infeld-Hoffman GR treatment; and
the Marsden et al. (1973) formulation of non-gravitational forces). The first
order variational equations are integrated along with the equations of motion
of the corresponding test particle. The form of these equations is available
in the code.666https://github.com/matthewholman/assist/blob/main/src/forces.c

##  4 Tests

We carry out a number of tests to demonstrate the correctness of the equations
of motion and the integrator.

###  4.1 Force model terms

To verify the equations of motion, we completed a term-by-term comparison of
the various contributions to the acceleration of a test particle to the
corresponding terms from the JPL small-body code. Rather than integrating, we
simply evaluate the acceleration of the test particle, asteroid (3666) Holman,
at a specific epoch (JD 2458849.5 TDB, 2020 January 1). This is a fine-grain
test that verifies that the physical constants, the values of the positions
and velocities of the perturbing bodies from the ephemeris, and the algebraic
terms in the equations of motion are identical to machine precision. Our code,
as well as JPL’s, is designed to work well in double precision for
computational speed. As the individual terms span orders of magnitude, a term
by term comparison is more stringent than comparing the summed accelerations.
Specifically, this comparison includes the gravitational constants
($\mathrm{GM}$ values); the components of the relative vector between the test
particle and the Sun, planets, Moon, and massive asteroids; the direct
Newtonian accelerations from those bodies; the complete PPN formulation of GR;
the simplified formulation of GR; the $J_{2}$, $J_{3}$, and $J_{4}$
gravitational harmonics from the Earth, the solar $J_{2}$ gravitational
harmonic, and the parameterization of non-gravitational forces presented
earlier. We find that all terms in our code agree with those from the JPL
small-bodies integrator, differing only in the least significant digit.

In order to test the PPN formulation of GR, which involves a large number of
terms, we carried out a more detailed comparison of each contribution in
equation 3.2. This suite of comparisons verifies that our coding of the
various contributions in the equations of motion is consistent with that of
the corresponding small body code from JPL.

###  4.2 Variational equations

We carry out a detailed check of the variational equations with two
approaches. Fig. 1 demonstrates that results from variational equations and
integrating shadow particles differ at second order in time, as expected.

Figure 1: Top panel: Numerically and analytically calculated variational
equations for the x-component of asteroid (3666) Holman. The two curves have
been intentionally offset by $10^{-7}$ AU to make them distinguishable on this
scale. Bottom panel: Difference between the numerically and analytically
calculated results, for all cartesian components. The magnitude of the
difference grows quadratically in time, as expected.

###  4.3 Integrations

In order to verify the integration of the equations of motion, we perform a
series of “out-and-back” tests. These involve integrating a set of initial
conditions for some period of time, reversing the direction of the
integration, and integrating back to the starting time. Because the IAS15
integrator is not intrinsically time reversible and errors accumulate in both
directions, comparing the initial conditions with the final state constitutes
a meaningful comparison, when dissipative terms are excluded. Again, we use
(3666) Holman for these tests. An optimal integrator, meaning that all
floating point errors are unbiased, would exhibit an energy error that grows
as $\mathrm{O(n^{1/2})}$ and errors in the angles that grow as
$\mathrm{O(n^{3/2})}$, where $n$ is the number of steps (Brouwer, 1937; Rein &
Spiegel, 2015). The accumulated error during an out-and-back integration test
is shown in Fig. 2. This error grows roughly as $t^{3/2}$, indicating that any
remaining biases are insignificant on this time scale. The slope may be
changing toward the longer integrations; we leave investigating that to future
work.

Figure 2: The magnitude of the accumulated error in integrating asteroid
(3666) Holman for the indicated outgoing time and back to the initial time.
The error grows approximately as $t^{3/2}$, as is shown by the dashed red
line.

In addition to out-and-back tests, which validate the integrator against
itself, we also compare the integrated results with those from JPL’s small
body integrator. We integrate the orbit of the main belt asteroids (3666)
Holman for $10$, $10^{2}$, $10^{3}$, $10^{4}$, and $10^{5}$ days. At the end
of the integrations, we find that the positions differ by $2.7\times 10^{-4}$,
$9.5\times 10^{-4}$, $9.3\times 10^{-2}$, $3.7$, and $19$ m, respectively.
Even for the longest integration this implies an angular difference of 10
micro-arcseconds. For (84100) Farnocchia, the differences after the same
integration lengths are comparable: $1.5\times 10^{-4}$, $8.5\times 10^{-4}$,
$1.4\times 10^{-2}$, $2.4$, and $32$ m, respectively. These integrations
demonstrate that our models and integrations are essentially identical. In
addition, it demonstrates that the numerical limits of ASSIST are well below
our goal of 1 milli-arcsecond over ten years. However, it is worth noting that
although the results of both routines agree the precision of the models
themselves is ultimately limited by the size of the smallest terms included.

Based on these integrations, we find that ASSIST is presently comparable in
speed to JPL’s small body code on similar hardware. Further speed optimization
of ASSIST is left to future work.

Next we consider the trajectory of (99942) Apophis around the time of its 2029
April 13 close approach to the Earth. This is a particularly stringent test
because Apophis comes within six Earth radii from the geocenter (Farnocchia &
Chesley, 2022), which accentuates the importance of terms such as the Earth’s
gravitational harmonics, as well as the integration timestep. And, perhaps
more importantly, the scattering of the encounter amplifies the differences.

Starting at 2029 January 1 and integrating forward, the differences between
the ASSIST and JPL small body code integrations are less than $1$ cm prior to
the encounter. The results diverge after the encounter. However, even after
integrating $10^{3}$ days, through the encounter and beyond, the difference is
only $\sim 500$ m.

The heliocentric orbit of Apophis and that of the Earth, as well as the
geometry of the close approach, are shown in the panels of Fig. 3. The
deflection of Apophis’s orbit is obvious. The integrator time step can be seen
to drop significantly during close approach as indicated by the separation of
the plotted points; this can be seen explicitly in left panel of Fig. 4, where
the timestep drops to a prescribed minimum value of $10^{-3}$ days. The
divergence of our integrated orbit from the results when the initial
conditions are offset in the $x$-coordinate by $10^{-15}$ AU is shown in right
panel of Fig. 4. This remains small despite the close encounter, indicating
that the integrator is stable.

Fig 5 shows the magnitude of the difference in the positions of Apophis
integrated with ASSIST and with the JPL small bodies code, as a function of
time starting from 2029 January 1. The differences are less than $\sim 1$ cm
before the encounter, near day 102 in the figure. Small differences in the
calculated velocites near the close approach lead to a smoothly growing
separation between the results as the integrations are continued. The
discontinuities in the difference are due to adaptive step size changes.

Figure 3: Left: The heliocentric equatorial trajectories of Earth (red) and
Apophis (blue) from 2029 Jan 1 to 2030 Jan 1, encompassing the close approach
on 2029 April 13. The x and y axes are ICRF coordinates. Right: The
geocentric, equatorial position of Apophis near the time of the 2029 April 13
encounter (Earth’s physical size is shown as a circle). The deflection of the
trajectory is clear.

Figure 4: Left: The IAS15 step size as a function of time from the start of
the integration (2029 Jan 1). The step size drops, reaching the prescribed
minimum, at the time of the encounter. Right: Divergence of two calculated
trajectories as a function of time, differing by a small displacement in
initial conditions. Note that the time axis in the left panel extends further.
Figure 5: The magnitude of the difference in the positions of Apophis
integrated with ASSIST and with the JPL small bodies code, as a function of
time starting from 2029 January 1. The differences are less than $\sim 1$ cm
before the encounter, near day 102 in the figure, growing to $\sim 500$ m by
the end. Small differences in the calculated velocites near the close approach
lead to a smoothly growing separation between the results as the integrations
are continued. The discontinuities in the difference are due to adaptive step
size changes.  Figure 6: (5303) Parsijkij-Ceres close approach. Left: Relative
position. Right: Magnitude of the separation vs time.

As an additional, visually interesting demonstration, we consider the serial
Cereal encounters of (5303) Parijskij, with closest approach 1996 September 10
(Kovačević & Kuzmanoski, 2007). The left panel of Fig. 6 shows the xy position
of 5303 relative to Ceres over a $10$ year interval starting before the
closest approach. The right panel shows the magnitude of the separation over
the same time span. The difference in the relative position differs from that
of the JPL small bodies code of only $\sim 1$ m. (The difference with JPL
Horizons is $\sim 500$ m.)

##  5 Code

ASSIST is written in C99, following the style and structure of REBOUND. In
addition to the underlying code, we have written a Python wrapper to the basic
integrator functions. This makes ASSIST easier to use, particularly for users
who are not familiar with the C99 language and associated compilers. In
addition, the Python wrapper provides a layer of abstraction upon which more
complex applications can be built.

The code and the associated Python wrapper777 can be found at
https://github.com/matthewholman/assist. Installation instructions can be
found at https://readthedocs.org/projects/assist. A limited installation for
users wishing only to use the wrapper is available via the standard PyPI
Python package installer, pip.

##  6 Conclusions

In this paper, we have introduced ASSIST - a new, general-purpose, ephemeris
quality test-particle integrator. The software is written in C99 in the
REBOUND framework, and we also provide a convenient Python wrapper. The
software is freely available for distribution under the GNU General Public
License v3.0. Integrations are performed using the IAS15 integrator, using the
positions of planets and 16 most massive asteroids from the JPL DE441
ephemeris. We find that out-and-back integration tests produce an error that
grows as $n^{3/2}$, indicating optimal Brouwer’s law behavior. We have
verified that our results are in agreement with the JPL small-body ASSIST
achieves our goal of better than 1 milli-arcsecond precision over ten years.
We expect that ASSIST will be valuable to the solar system dynamics community
as the volume of high-precision data to be fitted increases substantially with
LSST and the Vera Rubin Observatory (Jones et al., 2018; Ivezić et al., 2019;
Vera C. Rubin Observatory LSST Solar System Science Collaboration et al.,
2020).

Future work could include extending the equations of motion to be more
suitable for artificial satellite orbits, parallelizing the code to improve
the speed performance, and building a framework for orbit fitting.

We are grateful to the anonymous referees for their helpful suggestions. We
thank Zachary Murray for suggesting using the (5303) Parijskij - Ceres
encounter as a test. MJH gratefully acknowledges support from the NSF
(AST-2206194), the NASA YORPD Program (80NSSC22K0239), and the Smithsonian
Scholarly Studies Program (2022). DF conducted this research at the Jet
Propulsion Laboratory, California Institute of Technology, under a contract
with the National Aeronautics and Space Administration (80NM0018D0004). MJP
gratefully acknowledges NASA award 80NSSC22M0024.

## References

  * Acton et al. (2018) Acton, C., Bachman, N., Semenov, B., & Wright, E. 2018, Planet. Space Sci., 150, 9
  * Battin (1987) Battin, R. H. 1987, An introduction to the mathematics and methods of astrodynamics.
  * Bernstein & Khushalani (2000) Bernstein, G., & Khushalani, B. 2000, AJ, 120, 3323
  * Brouwer (1937) Brouwer, D. 1937, AJ, 46, 149
  * Charlot et al. (2020) Charlot, P., Jacobs, C. S., Gordon, D., et al. 2020, A&A, 644, A159
  * Damour & Deruelle (1985) Damour, T., & Deruelle, N. 1985, Journal des Astronomes Francais, 25, 21
  * Everhart (1985) Everhart, E. 1985, Astrophysics and Space Science Library, Vol. 115, An efficient integrator that uses Gauss-Radau spacings, ed. A. Carusi & G. B. Valsecchi, 185
  * Farnocchia (2021) Farnocchia, D. 2021, Small-Body Perturber Files SB441-N16 and SB441-N343, Tech. Rep. IOM 392R-21-005, Jet Propulsion Laboratory
  * Farnocchia & Chesley (2022) Farnocchia, D., & Chesley, S. R. 2022, in LPI Contributions, Vol. 2681, Apophis T-7 Years: Knowledge Opportunities for the Science of Planetary Defense, 2007
  * Farnocchia et al. (2015) Farnocchia, D., Chesley, S. R., Milani, A., Gronchi, G. F., & Chodas, P. W. 2015, in Asteroids IV, 815–834
  * Farnocchia et al. (2021) Farnocchia, D., Chesley, S. R., Takahashi, Y., et al. 2021, Icarus, 369, 114594
  * Ferreira et al. (2022) Ferreira, J. F., Tanga, P., Spoto, F., Machado, P., & Herald, D. 2022, A&A, 658, A73
  * Fortino et al. (2021) Fortino, W. F., Bernstein, G. M., Bernardinelli, P. H., et al. 2021, AJ, 162, 106
  * Gladman et al. (1991) Gladman, B., Duncan, M., & Candy, J. 1991, Celestial Mechanics and Dynamical Astronomy, 52, 221
  * Granvik et al. (2009) Granvik, M., Virtanen, J., Oszkiewicz, D., & Muinonen, K. 2009, , 44, 1853
  * Ivezić et al. (2019) Ivezić, Ž., Kahn, S. M., Tyson, J. A., et al. 2019, ApJ, 873, 111
  * Jones et al. (2018) Jones, R. L., Slater, C. T., Moeyens, J., et al. 2018, Icarus, 303, 181
  * Kahan (1965) Kahan, W. 1965, Commun. ACM, 8, 40.  https://doi.org/10.1145/363707.363723
  * Kovačević & Kuzmanoski (2007) Kovačević, A., & Kuzmanoski, M. 2007, Earth Moon and Planets, 100, 117
  * Marsden et al. (1973) Marsden, B. G., Sekanina, Z., & Yeomans, D. K. 1973, AJ, 78, 211
  * Moyer (2003) Moyer, T. D. 2003, Formulation for Observed and Computed Values of Deep Space Network Data Types for Navigation (Wiley-Interscience, Hoboken, NJ)
  * Murray & Dermott (2000) Murray, C. D., & Dermott, S. F. 2000, Solar System Dynamics, doi:10.1017/CBO9781139174817
  * Naidu et al. (2021) Naidu, S. P., Micheli, M., Farnocchia, D., et al. 2021, ApJ, 913, L6
  * Nobili & Roxburgh (1986) Nobili, A., & Roxburgh, I. W. 1986, in Relativity in Celestial Mechanics and Astrometry. High Precision Dynamical Theories and Observational Verifications, ed. J. Kovalevsky & V. A. Brumberg, Vol. 114, 105
  * Orbfit Consortium (2011) Orbfit Consortium. 2011, OrbFit: Software to Determine Orbits of Asteroids, , , ascl:1106.015
  * Ostro et al. (2002) Ostro, S. J., Hudson, R. S., Benner, L. A. M., et al. 2002, in Asteroids III, 151–168
  * Park et al. (2021) Park, R. S., Folkner, W. M., Williams, J. G., & Boggs, D. H. 2021, AJ, 161, 105
  * Rein & Liu (2012) Rein, H., & Liu, S. F. 2012, A&A, 537, A128
  * Rein & Spiegel (2015) Rein, H., & Spiegel, D. S. 2015, MNRAS, 446, 1424
  * Rein & Tamayo (2016) Rein, H., & Tamayo, D. 2016, MNRAS, 459, 2275
  * Tamayo et al. (2020) Tamayo, D., Rein, H., Shi, P., & Hernandez, D. M. 2020, MNRAS, 491, 2885
  * Tanga et al. (2022) Tanga, P., Pauwels, T., Mignard, F., et al. 2022, arXiv e-prints, arXiv:2206.05561
  * Vera C. Rubin Observatory LSST Solar System Science Collaboration et al. (2020) Vera C. Rubin Observatory LSST Solar System Science Collaboration, Jones, R. L., Bannister, M. T., et al. 2020, arXiv e-prints, arXiv:2009.07653
  * Vokrouhlický et al. (2015) Vokrouhlický, D., Bottke, W. F., Chesley, S. R., Scheeres, D. J., & Statler, T. S. 2015, in Asteroids IV, 509–531
  * Vokrouhlický & Milani (2000) Vokrouhlický, D., & Milani, A. 2000, A&A, 362, 746
  * Will (1971) Will, C. M. 1971, ApJ, 163, 611
  * Wisdom & Holman (1991) Wisdom, J., & Holman, M. 1991, AJ, 102, 1528
  * Yeomans et al. (2004) Yeomans, D. K., Chodas, P. W., Sitarski, G., Szutowicz, S., & Królikowska, M. 2004, in Comets II, ed. M. C. Festou, H. U. Keller, & H. A. Weaver, 137


#  Non trivial idempotents of the matrix rings over polynomial ring
$Z_{pqr}[x]$

###### Abstract.

In this paper, we study the non trivial idempotents of the $2\times 2$ matrix
ring over the polynomial ring $\mathbb{Z}_{pqr}[x]$ for distinct primes $p,q$
and $r$ greater than $3$. We have classified all the idempotents of this
matrix ring into several classes such that any idempotent must belong to one
of these classes. This work is extension of the work done in $[1]$.

###### Key words and phrases:

Keywords: Idempotent, polynomial ring, matrix ring

Gaurav Mittal Department of Mathematics, Indian Institute of Technology
Roorkee, Roorkee, India
email<EMAIL_ADDRESS>
Mathematics Subject Classification (2010): $16S50$, $13F20$

##  1\. Introduction

In ring theory, an element $a$ of a ring $R$ is idempotent if $a=a^{2}$. Then
by induction, we have $a=a^{2}=\cdots=a^{m}$ for any positive integer $m$.
Therefore, we can say that these elements resist to change on multiplying with
themselves. With these idempotents, we can define several other classes of
elements, for example, unit regular elements $[2]$, clean and strongly clean
elements $[5,6,7]$ and Lie regular elements $[8]$ etc. and therefore,
idempotents are of interest among many researchers.

Now, let us discuss some of the available literature in this direction. In the
case of polynomial ring $R[x]$, when $R$ is an abelian ring (a ring in which
all idempotents are central), idempotents of $R[x]$ and $R$ coincides $[4$,
Lemma $1]$. For the matrix rings over the polynomial rings very few results
are known. Kanwar et al. $[3]$ studied the idempotents in
$M_{2}(\mathbb{Z}_{2p}[x])$ for odd prime $p$ and in
$M_{2}(\mathbb{Z}_{3p}[x])$ for prime $p>3$. Recently, Balmaceda et al. $[1]$
generalized the results of $[3]$ by determining the non trivial idempotents in
the matrix rings $M_{2}(\mathbb{Z}_{pq}[x])$ for any primes $p$ and $q$.

In this paper, motivated by the importance of idempotents, we continue in this
direction and study the idempotents of $2\times 2$ matrices over the
polynomial ring $\mathbb{Z}_{pqr}[x]$ for primes $p,q$ and $r$ greater than
$3$. The special thing about polynomial ring $\mathbb{Z}_{pqr}[x]$ is that it
is a reduced ring (ring in which the zero element is the only nilpotent
element). This paper is structured in the following manner: All the basic
results required in our work are accumulated in Section $2$. Our main result
related to the idempotents is discussed in Section $3$. Section $4$ concludes
the paper.

##  2\. Preliminaries

We start this section by the following characterization of the reduced ring.
The simple proof is given here for completeness.

######  Lemma 2.1.

The ring $\mathbb{Z}_{n}$ is a reduced ring, if $n$ has no square factor in
it.

###### Proof.

Let if possible $g$ be some non zero nilpotent element of $\mathbb{Z}_{n}$.
Clearly $g^{m}$ is divisible by $n$ for some positive integer $m$. If $n$ has
no square factor in it, then each prime divisor of $n$ also divides $g^{m}$
and hence each of them divides $g$. Since every prime divisor of $n$ divides
$g$ which means $n$ is a divisor of $g$ which is absurd as $g<n$. Hence
result. ∎

######  Theorem 2.1.

For the ring $Z_{n}$, when $n$ is square free, the determinant and the trace
of every idempotent in $M_{2}(\mathbb{Z}_{n}[x])$ is in $\mathbb{Z}_{n}$.

###### Proof.

Follows directly from Lemma $2.1$ and $[3,$ Proposition $3.1]$. ∎

######  Theorem 2.2.

If $R$ is a reduced ring, then idempotents of $R[x]$ and $R$ coincide.

###### Proof.

$[3$, Corollary $2.4]$. ∎

Next result is about the number of idempotents in $\mathbb{Z}_{n}$. We skip
its proof as it is not hard to see.

######  Lemma 2.2.

For the ring $\mathbb{Z}_{n}$, where $n$ is a positive integer, total number
of idempotents are $2^{m}$, where $m$ is the number of distinct prime divisors
of $n$.

##  3\. Idempotents of matrix ring $M_{2}(\mathbb{Z}_{pqr}[x])$

In this section, we discuss our main result in the form of idempotents of the
ring of $2\times 2$ matrices over the polynomial ring $\mathbb{Z}_{pqr}[x]$,
where $p,q$ and $r$ are distinct primes greater than $3$. To start with, let
us first discuss the following three lemmas which would be helpful in proving
our main result. The very first lemma is a result on the idempotents of
$\mathbb{Z}_{pqr}[x]$.

######  Lemma 3.1.

Idempotents of the polynomial ring $\mathbb{Z}_{pqr}[x]$, where $p,q,r$ are
distinct primes, are

$0,\ 1,\ (pq)^{r-1},\ (pr)^{q-1},\ (qr)^{p-1},\ p^{(q-1)(r-1)},\
q^{(p-1)(r-1)},\ r^{(p-1)(q-1)}.$

###### Proof.

From Theorem $2.2$ and Lemma $2.2$, it follows that the ring
$\mathbb{Z}_{pqr}$ has $8$ idempotents. Now, let $y$ be any idempotent of
$\mathbb{Z}_{pqr}$. This means $y^{2}\equiv y\ (\mathrm{mod}\ pqr)$. Solving
this congruence is equivalent to solve the following system of congruences

$y^{2}\equiv y\ (\mathrm{mod}\ p),\quad y^{2}\equiv y\ (\mathrm{mod}\ q),\quad
y^{2}\equiv y\ (\mathrm{mod}\ r).$

Each of these congruences has $2$ solutions which are given by $y\equiv 0$ or
$y\equiv 1$. So the congruence $y^{2}\equiv y\ (\mathrm{mod}\ pqr)$ has $8$
solutions discussed in the following cases.

Case-$1$: $y\equiv 0\ (\mathrm{mod}\ p),\ \ y\equiv 0\ (\mathrm{mod}\ q),\ \
y\equiv 0\ (\mathrm{mod}\ r)$. Here, clearly $y\equiv 0\ (\mathrm{mod}\ pqr)$.

Case-$2$: $y\equiv 0\ (\mathrm{mod}\ p),\ \ y\equiv 0\ (\mathrm{mod}\ q),\ \
y\equiv 1\ (\mathrm{mod}\ r)$. This means $y\equiv 0\ (\mathrm{mod}\ pq)$ and
$y\equiv 1\ (\mathrm{mod}\ r)$. Further, $y\equiv 0\ (\mathrm{mod}\ pq)$
implies $y=pqK$ for some $K\in\mathbb{Z}$. Putting this value of $y$ in
$y\equiv 1\ (\mathrm{mod}\ r)$, we get $pqK\equiv 1\ (\mathrm{mod}\ r)$. From
this congurence, on employing Euler’s equation, we get a solution given by
$K=(pq)^{r-2}$. Thus, $y\equiv(pq)^{r-1}\ (\mathrm{mod}\ pqr)$.

Case-$3$: $y\equiv 0\ (\mathrm{mod}\ p),\ \ y\equiv 1\ (\mathrm{mod}\ q),\ \
y\equiv 0\ (\mathrm{mod}\ r)$. On the similar lines of Case $2$, we can easily
see that $y\equiv(pr)^{r-1}\ (\mathrm{mod}\ pqr)$.

Case-$4$: $y\equiv 1\ (\mathrm{mod}\ p),\ \ y\equiv 0\ (\mathrm{mod}\ q),\ \
y\equiv 0\ (\mathrm{mod}\ r)$. Here $y\equiv(qr)^{r-1}\ (\mathrm{mod}\ pqr)$.

Case-$5$: If $y\equiv 0\ (\mathrm{mod}\ p),\ \ y\equiv 1\ (\mathrm{mod}\ q),\
\ y\equiv 1\ (\mathrm{mod}\ r)$. Then, clearly $y\equiv 1\ (\mathrm{mod}\
qr)$. The congruence $y\equiv 0\ (\mathrm{mod}\ p)$ implies that $y=pK$ for
some $K\in\mathbb{Z}$. Substituting the value of $y$ in $y\equiv 1\
(\mathrm{mod}\ qr)$, we get $pK\equiv 1\ (\mathrm{mod}\ qr)$. From this
congurence, on employing Euler’s theorem, we get a solution given by
$K=p^{(q-1)(r-1)-1}$. Thus, $y\equiv p^{(q-1)(r-1)}\ (\mathrm{mod}\ pqr)$.

Case-$6$: If $y\equiv 1\ (\mathrm{mod}\ p),\ \ y\equiv 0\ (\mathrm{mod}\ q),\
\ y\equiv 1\ (\mathrm{mod}\ r)$. As done in Case $5$, we can see that $y\equiv
q^{(p-1)(r-1)}\ (\mathrm{mod}\ pqr)$.

Case-$7$: If $y\equiv 1\ (\mathrm{mod}\ p),\ \ y\equiv 1\ (\mathrm{mod}\ q),\
\ y\equiv 0\ (\mathrm{mod}\ r)$. Here, $y\equiv r^{(p-1)(q-1)}\ (\mathrm{mod}\
pqr)$.

Case-$8$: If $y\equiv 1\ (\mathrm{mod}\ p),\ \ y\equiv 1\ (\mathrm{mod}\ q),\
\ y\equiv 1\ (\mathrm{mod}\ r)$. Clearly, $y\equiv 1\ (\mathrm{mod}\ pqr)$. ∎

######  Example 3.1.

For $\mathbb{Z}_{105}=\mathbb{Z}_{3\times 5\times 7}$, $p=3,q=5,r=7$,
idempotents are $0,\ 1,\ 15^{6}\equiv 15,\ 21^{4}\equiv 21,\ 35^{2}\equiv 70,\
3^{24}\equiv 36,\ 5^{12}=85,\ 7^{8}=91$.

Notation\- Now onwards, if we write $G=\begin{bmatrix}e&f\\\
g&h\end{bmatrix}$, then we always assume $e,f,g,h$ are polynomials in
$\mathbb{Z}_{pqr}[x]$.
In the following lemma, we discuss about the solutions of the quadratic
congruence $x^{2}\equiv x+2p^{(q-1)(r-1)}\ (\mathrm{mod}\ pqr)$.

######  Lemma 3.2.

For the quadratic congruence $x^{2}\equiv x+2p^{(q-1)(r-1)}\ (\mathrm{mod}\
pqr)$, where $p,q,r$ are distinct odd primes, solutions modulo $pqr$ are

$\bigg{\\{}2p^{(q-1)(r-1)},\ p^{(q-1)(r-1)}+1,\ -p^{(q-1)(r-1)},\
1-2p^{(q-1)(r-1)},\ \big{(}(-1-2p^{q-1}\big{)}(pq)^{r-1}+2p^{q-1}),$
$\big{(}(-2-p^{q-1})(pq)^{r-1}+p^{q-1}+1\big{)},\
((-1-2p^{r-1})(pr)^{q-1}+2p^{r-1}),\
\big{(}(-2-p^{r-1})(pr)^{q-1}+p^{r-1}+1\big{)}\bigg{\\}}.$

###### Proof.

Since $\gcd(p,q,r)=1$, the congruence $x^{2}\equiv x+2p^{(q-1)(r-1)}\
(\mathrm{mod}\ pqr)$ has solution if and only if the system of congruences
$x^{2}\equiv x+2p^{(q-1)(r-1)}\equiv x\ (\mathrm{mod}\ p)$, $x^{2}\equiv
x+2p^{(q-1)(r-1)}\ (\mathrm{mod}\ q)$ and $x^{2}\equiv x+2p^{(q-1)(r-1)}\
(\mathrm{mod}\ r)$ has a solution. Let’s name these congruencs as $(a)$, $(b)$
and $(c)$, respectively. Observe that $(b)$ is also equivalent to $x^{2}\equiv
x+2\ (\mathrm{mod}\ q)$ using Euler’s theorem. Similarly, $(c)$ is equivalent
to $x^{2}\equiv x+2\ (\mathrm{mod}\ r)$. So for solving the given congruence,
we have to solve the following equations

$x^{2}\equiv x\ (\mathrm{mod}\ p),\quad x^{2}\equiv x+2\ (\mathrm{mod}\
q)\quad\text{and}\quad x^{2}\equiv x+2\ (\mathrm{mod}\ r).$

Further, note that both the congruences $x^{2}\equiv x+2\ (\mathrm{mod}\ q)$
and $x^{2}\equiv x+2\ (\mathrm{mod}\ r)$ have two solutions, given by $x=2$ or
$x=-1$. Similarly, the congruence $x^{2}\equiv x\ (\mathrm{mod}\ p)$ has two
solutions, given by $x=0$ or $x=1$. We consider all these possibilities and
discuss them in the following eight cases.
Case-1: When $x\equiv 0\ (\mathrm{mod}\ p)$, $x\equiv 2\ (\mathrm{mod}\ q)$
and $x\equiv 2\ (\mathrm{mod}\ r)$. On solving these, we get $x\equiv
2p^{(q-1)(r-1)}\ (\mathrm{mod}\ pqr)$.
Case-2: When $x\equiv 1\ (\mathrm{mod}\ p)$, $x\equiv 2\ (\mathrm{mod}\ q)$
and $x\equiv 2\ (\mathrm{mod}\ r)$. Here we get, $x\equiv 1+p^{(q-1)(r-1)}\
(\mathrm{mod}\ pqr)$.
Case-3: When $x\equiv 0\ (\mathrm{mod}\ p)$, $x\equiv-1\ (\mathrm{mod}\ q)$
and $x\equiv-1\ (\mathrm{mod}\ r)$. On solving these, we get
$x\equiv-p^{(q-1)(r-1)}\ (\mathrm{mod}\ pqr)$.
Case-4: When $x\equiv 1\ (\mathrm{mod}\ p)$, $x\equiv-1\ (\mathrm{mod}\ q)$
and $x\equiv-1\ (\mathrm{mod}\ r)$. Here we get, $x\equiv 1-2p^{(q-1)(r-1)}\
(\mathrm{mod}\ pqr)$.
Case-5: When $x\equiv 0\ (\mathrm{mod}\ p)$, $x\equiv 2\ (\mathrm{mod}\ q)$
and $x\equiv-1\ (\mathrm{mod}\ r)$. Here we get,
$x\equiv(-1-2p^{q-1}\big{)}(pq)^{r-1}+2p^{q-1}\ (\mathrm{mod}\ pqr)$.
Case-6: When $x\equiv 1\ (\mathrm{mod}\ p)$, $x\equiv 2\ (\mathrm{mod}\ q)$
and $x\equiv-1\ (\mathrm{mod}\ r)$. On solving these, we get
$x\equiv(-2-p^{q-1}\big{)}(pq)^{r-1}+p^{q-1}+1\ (\mathrm{mod}\ pqr)$.
Case-7: When $x\equiv 0\ (\mathrm{mod}\ p)$, $x\equiv-1\ (\mathrm{mod}\ q)$
and $x\equiv 2\ (\mathrm{mod}\ r)$. In this case,
$x\equiv(-1-2p^{r-1}\big{)}(pr)^{q-1}+2p^{r-1}\ (\mathrm{mod}\ pqr)$.
Case-8: When $x\equiv 1\ (\mathrm{mod}\ p)$, $x\equiv-1\ (\mathrm{mod}\ q)$
and $x\equiv 2\ (\mathrm{mod}\ r)$. Here
$x\equiv(-2-p^{r-1}\big{)}(pr)^{q-1}+p^{r-1}+1\ (\mathrm{mod}\ pqr)$. ∎

In the following lemma, we discuss about the solutions of the quadratic
congruence $x^{2}\equiv x+2(pq)^{r-1}\ (\mathrm{mod}\ pqr)$.

######  Lemma 3.3.

For the quadratic congruence $x^{2}\equiv x+2(pq)^{r-1}\ (\mathrm{mod}\ pqr)$,
where $p,q,r$ are distinct odd primes, solutions modulo $pqr$ are

$\bigg{\\{}2(pq)^{r-1},\ -(pq)^{r-1},\ (pq)^{r-1}+1,\ 1-2(pq)^{r-1},\
(2-p^{q-1}\big{)}(pq)^{r-1}+p^{q-1},$ $(-1-p^{q-1}\big{)}(pq)^{r-1}+p^{q-1},\
(2-q^{p-1})(pq)^{r-1}+q^{p-1},\ (-1-q^{p-1})(pq)^{r-1}+q^{p-1}\bigg{\\}}.$

###### Proof.

This can be proved on the similar lines of Lemma $3.2$. ∎

Now, we are ready to give our main result of the paper in which we classify
all the idempotents of $M_{2}(\mathbb{Z}_{pqr}[x])$.

######  Theorem 3.1.

Any non trivial idempotent of the matrix ring $M_{2}$ over the polynomial ring
$\mathbb{Z}_{pqr}[x]$ for distinct primes $p,q,r$ greater than $3$, is one of
the following forms:

  1. (1)

If $\det G=0$, then we have the following possibilities:

    1. (a)

$G=\begin{bmatrix}e(x)&f(x)\\\ g(x)&1-e(x)\end{bmatrix}$, where
$e(x)(1-e(x))-g(x)f(x)=0$.

    2. (b)

$G=\begin{bmatrix}Ie(x)&If(x)\\\ Ig(x)&I(1-e(x))\end{bmatrix}$, where
$e(x)(1-e(x))-g(x)f(x)=Jk(x)$ for $k(x)\in\mathbb{Z}_{pqr}[x]$, where
$I\in\\{(pq)^{r-1},(pr)^{q-1},(qr)^{p-1},p^{(q-1)(r-1)},q^{(p-1)(r-1)},r^{(p-1)(q-1)}\\}$
and $J\in\\{r,q,p,qr,pr,pq\\}$. Here, value of $J$ at $i^{th}$ position in its
set of possibilities corresponds to the value of $I$ at $i^{th}$ position in
its respective set for $1\leq i\leq 6$.

  2. (2)

If $\det G=(pq)^{r-1}$, then we have the following four possibilities:

    1. (a)

$G=\begin{bmatrix}(pq)^{r-1}&0\\\ 0&(pq)^{r-1}\end{bmatrix}$.

    2. (b)

$G=\begin{bmatrix}1+re(x)&rf(x)\\\ rg(x)&(pq)^{r-1}-re(x)\end{bmatrix}$, where
$e(x)(1+re(x))+rg(x)f(x)=pqk(x)$ for $k(x)\in\mathbb{Z}_{pqr}[x]$.

    3. (c)

$G=\begin{bmatrix}u+pre(x)&prf(x)\\\ prg(x)&t-(u+pre(x))\end{bmatrix}$, where
$(u+pre(x))t-(u+pre(x))^{2}-(pr)^{2}f(x)g(x)\equiv(pq)^{r-1}\ (\mathrm{mod}\
pqr)$, $u\equiv 0\ (\mathrm{mod}\ p)$ and $u\equiv 1\ (\mathrm{mod}\ r)$. Here
$t=(2-p^{q-1})(pq)^{r-1}+p^{q-1}$.

    4. (d)

By interchanging the role of $p$ and $q$ in part $2(c)$, we get a new class of
idempotents.

Similarly, if $\det G=(qr)^{p-1}$ or $\det G=(pr)^{q-1}$, we have $4$
possibilities in each case.

  3. (3)

If $\det G=p^{(q-1)(r-1)}$, then we have the following $2$ possibilities:

    1. (a)

$G=\begin{bmatrix}p^{(q-1)(r-1)}&0\\\ 0&p^{(q-1)(r-1)}\end{bmatrix}$.

    2. (b)

$G=\begin{bmatrix}1+qre(x)&qrf(x)\\\
qrg(x)&p^{(q-1)(r-1)}-qre(x)\end{bmatrix}$, where
$e(x)(1+qre(x))+qrf(x)g(x)=pk(x)$ for $k(x)\in\mathbb{Z}_{pqr}[x]$.

Similarly, if $\det G=q^{(p-1)(r-1)}$ or $\det G=r^{(p-1)(q-1)}$, we have $2$
possibilities in each case.

###### Proof.

Let $G=\begin{bmatrix}e(x)&f(x)\\\ g(x)&h(x)\end{bmatrix}$ be a non trivial
idempotent of $M_{2}(\mathbb{Z}_{pqr}[x])$. We write $e,f,g,h$ in place of
$e(x),f(x),g(x),h(x)$, respectively. Being an idempotent, $G$ satisfies
$G^{2}=G$ which gives us the set of equations
$A=\\{e^{2}+fg=e,f(e+h)=f,g(e+h)=g,fg+h^{2}=h\\}$. Consider $(i)$
$e^{2}+fg=e$, $(ii)$ $f(e+h)=f$, $(iii)$ $g(e+h)=g$ and $(iv)$ $fg+h^{2}=h$.
From Theorems $2.1$ and $2.2$, we know that $\det G$ is also an idempotent of
$\mathbb{Z}_{pqr}$. Thus, employ Lemma $3.1$ to obtain the possible choices of
$\det G$ given by

$\\{0,\ 1,\ (pq)^{r-1},\ (pr)^{q-1},\ (qr)^{p-1},\ p^{(q-1)(r-1)},\
q^{(p-1)(r-1)},\ r^{(p-1)(q-1)}\\}.$

We consider all of these possibilities in the following cases:

Case-1: $\det G=1$. This means $G$ is invertible and as $G$ is an idempotent,
on multiplying the equation $G^{2}=G$ by $G^{-1}$, we get $G=I$. Therefore,
this case yields only trivial idempotent.

Case 2: $\det G=0$. Let us first show that in this case, $e+h$ is an
idempotent of $\mathbb{Z}_{pqr}$. $\det G=0$. In this case, $eh-fg=0$. For
this consider $(e+h)^{2}=e^{2}+h^{2}+2eh=e^{2}+h^{2}+2fg$. Now add equations
$(i)$ and $(iv)$, and using these to deduce that $(e+h)^{2}=e+h$, which means
that $e+h$ is an idempotent. Therefore, it can take the following values:

$\\{0,\ 1,\ (pq)^{r-1},\ (pr)^{q-1},\ (qr)^{p-1},\ p^{(q-1)(r-1)},\
q^{(p-1)(r-1)},\ r^{(p-1)(q-1)}\\}.$

Now we discuss all these possibilities one by one.

  1. (1)

If $e+h=0$. In this case, $\det G=0$ and $(i)$ implies $e=0$. From $(ii)$ and
$(iii)$, we get $f=g=0$. Similarly $h=0$. Hence, $G$ can only be $0$ matrix
here. As we are in hunt of non trivial idempotents, we reject this case.

  2. (2)

If $e+h=1$. Clearly, $h=1-e$. Employing $\det G=0$ and trace condition, we can
easily verify that the equations $(i),(ii),(iii)$ are trivially satisfied.
Thus, we have $G=\begin{bmatrix}e(x)&f(x)\\\ g(x)&1-e(x)\end{bmatrix}$, where
$e(x)(1-e(x))-g(x)f(x)=0$.

  3. (3)

If $e+h=(pq)^{r-1}$. Clearly $h=(pq)^{r-1}-e$. Employing $\det G=0$ and $(i)$,
i.e. $e^{2}+fg=e$, we get $e=e(pq)^{r-1}$. Also from $(ii)$ and $(iii)$, we
have $f=f(pq)^{r-1}$ and $g=g(pq)^{r-1}$. Hence,
$G=\begin{bmatrix}e(x)(pq)^{r-1}&f(x)(pq)^{r-1}\\\
g(x)(pq)^{r-1}&(pq)^{r-1}(1-e(x))\end{bmatrix}$, where
$e(x)(1-e(x))-g(x)f(x)=rk(x)$ for some $k(x)\in\mathbb{Z}_{pqr}[x]$. Further,
when $e+h=(qr)^{p-1}$ or $e+h=(pr)^{q-1}$, $G$ can be obtained in a similar
way.

  4. (4)

If $e+h=p^{(q-1)(r-1)}$. Then $\det G=0$ and $(i)$ implies
$ep^{(q-1)(r-1)}=e$. Also from $(ii)$ and $(iii)$, we get $fp^{(q-1)(r-1)}=f$
and $gp^{(q-1)(r-1)}=g$. Thus in this case,
$G=\begin{bmatrix}p^{(q-1)(r-1)}e(x)&p^{(q-1)(r-1)}f(x)\\\
p^{(q-1)(r-1)}g(x)&p^{(q-1)(r-1)}(1-e(x))\par\end{bmatrix}$, where
$e(x)(1-e(x))-f(x)g(x)=pqk(x)$ for $k(x)\in\mathbb{Z}_{pqr}[x]$. Further, when
$e+h=q^{(p-1)(r-1)}$ or $e+h=r^{(p-1)(q-1)}$, $G$ can be obtained in a similar
way.

Case 3: $\det G=(pq)^{r-1}$. Here $(i),(iv)$ and $\det G=(pq)^{r-1}$ implies
$(e+h)^{2}=e+h+2(pq)^{r-1}$. On incorporating Lemma $3.3$, we get $8$
possibilities for $e+h$ which are discussed in the following points:

  1. (1)

If $e+h=2(pq)^{r-1}$, then from equations $(ii)$ and $(iii)$, we get
$2(pq)^{r-1}f=f$ and $\ 2(pq)^{r-1}g=g$. Now as $\gcd(2(pq)^{r-1}-1,pqr)=1$,
we have $f=g=0$. So equations $(i)$ and $(iv)$ implies $e^{2}=e$ and
$h^{2}=h$. It can be easily seen that the only possible value of $e$ and $h$
in this case is $2(pq)^{r-1}$. Thus, $G=\begin{bmatrix}(pq)^{r-1}&0\\\
0&(pq)^{r-1}\end{bmatrix}$.

  2. (2)

If $e+h=-(pq)^{r-1}$, then from equations $(ii)$ and $(iii)$, we get
$(1+(pq)^{r-1})f=0$ and $\ g(1+(pq)^{r-1})=0$. Again as
$\gcd(1+(pq)^{r-1},pqr)=1$, we have $f=g=0$. So equations $(i)$ and $(iv)$
implies $e^{2}=e$ and $h^{2}=h$. It can be verified that no two idempotents in
$\mathbb{Z}_{pqr}$ have sum $-(pq)^{r-1}$. Thus, this case is not possible.

  3. (3)

If $e+h=(pq)^{r-1}+1$, then $\det G=(pq)^{r-1}$ and $(i)$ implies
$(pq)^{r-1}e=(pq)^{r-1}$. Also $(ii)$ and $(iii)$ implies $(pq)^{r-1}f=0$ and
$(pq)^{r-1}g=0$. Thus from these equations, we get
$G=\begin{bmatrix}1+re(x)&rf(x)\\\ rg(x)&(pq)^{r-1}-re(x)\end{bmatrix}$, where
$e(x)(1+re(x))+rf(x)g(x)=pqk(x)$ for some $k(x)\in\mathbb{Z}_{pqr}[x]$.

  4. (4)

If $e+h=1-2(pq)^{r-1}$, then $\det G=(pq)^{r-1}$ and $(i)$ implies
$-2(pq)^{r-1}e=(pq)^{r-1}$. From equations $(ii)$ and $(iii)$, we get
$2(pq)^{r-1})f=0$ and $\ 2(pq)^{r-1}g=0$. Multiply by $(2(pq)^{r-1})^{2}$ on
both sides of $e^{2}+fg=e$ , we get
$(2(pq)^{r-1}e)^{2}+(2(pq)^{r-1}f)(2(pq)^{r-1}g)=(2(pq)^{r-1})^{2}e$. Using
above equations, we get

$\big{(}(pq)^{r-1}\big{)}^{2}-2(pq)^{r-1}(-(pq)^{r-1})=3(pq)^{2(r-1)}=0.$

But, this is not possible by Euler’s theorem because of the choice of primes.

  5. (5)

If $e+h=(2-p^{q-1})(pq)^{r-1}+p^{q-1}$, then $\det G=(pq)^{r-1}$ and $(i)$
implies

$e\big{(}(2-p^{q-1})(pq)^{r-1}+p^{q-1}-1\big{)}=(pq)^{r-1}.$

We rewrite above as $e(t-1)=(pq)^{r-1}$, where $t=e+h$. From this equation, we
conclude that $e$ is of the form $u+pre$ for some $u$ such that $u\equiv 0\
(\mathrm{mod}\ p)$ and $u\equiv 1\ (\mathrm{mod}\ r)$. Also $(ii)$ and $(iii)$
implies $f(t-1)=0$ and $g(t-1)=0$. Thus, on solving these equations, we get
$G=\begin{bmatrix}u+pre(x)&prf(x)\\\ prg(x)&t-(u+pre(x))\end{bmatrix}$, where
$(u+pre(x))(t-(u+pre(x)))-(pr)^{2}f(x)g(x)\equiv(pq)^{r-1}.$

  6. (6)

If $e+h=(-1-p^{q-1})(pq)^{r-1}+p^{q-1}$. Let
$(-1-p^{q-1})(pq)^{r-1}+p^{q-1}=t$. Then $\det G=(pq)^{r-1}$ and $(i)$ implies
$e(t-1)=(pq)^{r-1}$. Also $(ii)$ and $(iii)$ implies $f(t-1)=0$ and
$g(t-1)=0$. Now on multiplying by $(t-1)^{2}$ on both sides of $(i)$, we get

$(e(t-1))^{2}+f(t-1)g(t-1)=(t-1)(e(t-1)).$

This further implies that

$((pq)^{r-1})^{2}=(t-1)(pq)^{r-1}.$

But under modulo $r$ above expression does not hold, as left side is congruent
to $1$ and right side is congruent to $-2$. Hence, this case is not possible.

  7. (7)

If $e+h=(2-q^{p-1})(pq)^{r-1}+q^{p-1}$. This case is exactly similar to sub-
case $5$. Just replace $p$ and $q$.

  8. (8)

If $e+h=(-1-q^{p-1})(pq)^{r-1}+q^{p-1}$. Similar to sub-case $6$, we can prove
that this case is not possible.

For $\det G=(qr)^{p-1}$ or $(pr)^{q-1}$, idempotents can be determined with
the similar approach as applied for $\det G=(pq)^{p-1}$.

Case 4: $\det G=p^{(q-1)(r-1)}$. In this case, $(i),(iv)$ and $\det
G=p^{(q-1)(r-1)}$ implies $(e+h)^{2}=e+h+2p^{(q-1)(r-1)}$. On employing Lemma
$3.2$, we get $8$ possibilities for $e+h$ and therefore, we discuss all these
possibilities.

  1. (1)

If $e+h=2p^{(q-1)(r-1)}$, then from equations $(ii)$ and $(iii)$, we get
$2p^{(q-1)(r-1)}f=f$ and $\ 2p^{(q-1)(r-1)}g=g$. Now as
$\gcd(2p^{(q-1)(r-1)}-1,pqr)=1$, we get $f=g=0$. So equations $(i)$ and $(iv)$
implies $e^{2}=e$ and $h^{2}=h$. It can be easily verified that the only
possible value of $e$ and $h$ in this case is $p^{(q-1)(r-1)}$. Thus,
$G=\begin{bmatrix}p^{(q-1)(r-1)}&0\\\ 0&p^{(q-1)(r-1)}\end{bmatrix}$.

  2. (2)

If $e+h=1+p^{(q-1)(r-1)}$, then $\det G=p^{(q-1)(r-1)}$ and $(i)$ implies
$(p^{(q-1)(r-1)})e=p^{(q-1)(r-1)}$. Also $(ii)$ and $(iii)$ implies
$p^{(q-1)(r-1)}f=0$ and $p^{(q-1)(r-1)}g=0$. Thus, from these equations, we
get $G=\begin{bmatrix}1+qre(x)&qrf(x)\\\
qrg(x)&p^{(q-1)(r-1)}-qre(x)\end{bmatrix}$, where
$e(x)(1+qre(x))+qrf(x)g(x)=pk(x)$ for some $k(x)\in\mathbb{Z}_{pqr}[x]$.

  3. (3)

If $e+h=-p^{(q-1)(r-1)}$, then from equations $(ii)$ and $(iii)$, we get
$(p^{(q-1)(r-1)}+1)f=0$ and $\ (p^{(q-1)(r-1)}+1)g=0$. Now as
$\gcd(p^{(q-1)(r-1)}+1,pqr)=1$, we have $f=g=0$. So equations $(i)$ and $(iv)$
implies $e^{2}=e$ and $h^{2}=h$. It can be easily verified that there are no
two idempotents in $\mathbb{Z}_{pqr}$ whose sum is $-p^{(q-1)(r-1)}$.

  4. (4)

If $e+h=1-2p^{(q-1)(r-1)}$, then $\det G=p^{(q-1)(r-1)}$ and $(i)$ implies
$(2p^{(q-1)(r-1)})e=-p^{(q-1)(r-1)}$. Also $(ii)$ and $(iii)$ implies
$2p^{(q-1)(r-1)}f=0$ and $2p^{(q-1)(r-1)}g=0$. Now on multiplying by
$(2p^{(q-1)(r-1)})^{2}$ on both sides of $(i)$, i.e. $e^{2}+fg=e$, we get

$(2p^{(q-1)(r-1)}e)^{2}+(2p^{(q-1)(r-1)}f)(2p^{(q-1)(r-1)}g)=2p^{(q-1)(r-1)}(2p^{(q-1)(r-1)}e).$

On substituting values in above equation, we get

$(-p^{(q-1)(r-1)})^{2}=2p^{(q-1)(r-1)}(-p^{(q-1)(r-1)})\implies
3p^{2(q-1)(r-1)}=0.$

But above is not possible by Euler’s theorem as $p,q,r$ are greater than $3$.

For the remaining values of trace, i.e.

$\big{\\{}((-1-2p^{q-1}\big{)}(pq)^{r-1}+2p^{q-1}),\
\big{(}(-2-p^{q-1})(pq)^{r-1}+p^{q-1}+1\big{)},$ $\
((-1-2p^{r-1})(pr)^{q-1}+2p^{r-1}),\
\big{(}(-2-p^{r-1})(pr)^{q-1}+p^{r-1}+1\big{)}\big{\\}},$

we can prove that these cases are not possible on the similar lines of sub-
case $(4)$ above. So, there are only $2$ classes of idempotents having
determinant $p^{(q-1)(r-1)}$. Further, the cases when $\det G=q^{(p-1)(r-1)}$
or $r^{(p-1)(q-1)}$ can be handled similarly.

Finally, on the other hand, one can see that all the matrices given in the
statement of the theorem are idempotents. Thus, result.

##  4\. Discussion

The study of idempotents is very important from the application point of view.
In this paper, we have obtained all the possible idempotents of the matrix
ring $M_{2}(\mathbb{Z}_{pqr}[x])$. This paper further motivates the study of
non trivial idempotents of the matrix ring $M_{2}(\mathbb{Z}_{n}[x])$, where
$n$ is a square free integer having atleast $4$ prime factors.∎

## References

  * [1] J. M. P. Balmaceda and J. P. Datu,  Idempotents in certain matrix rings over polynomial rings, Int. Electron. J. Algebra, $\bf{27}$ ($2020$), $1-12$.
  * [2] K. R. Goodearl,  Von Neumann Regular Rings, Krieger Pub. Co. ($1991$).
  * [3] P. Kanwar, M. Khatkar and R. K. Sharma,  Idempotents and units of matrix rings over polynomial rings, Int. Electron. J. Algebra, $\bf{22}$ ($2017$) $147-169$.
  * [4] P. Kanwar, A. Leroy, and J. Matczuk,  Idempotents in ring extensions, J. Algebra $\bf{389}$ $(2013)$, $128-136$.
  * [5] P. Kanwar, A. Leroy and J. Matczuk,  Clean elements in polynomial rings,  Noncommutative Rings and their Applications, Contemp. Math., Amer. Math. Soc., $\bf{634}$ $(2015)$, $197-204$.
  * [6] W. K. Nicholson,  Lie Lifting idempotents and exchange rings, Trans. Amer. Math. Soc., $\bf{229}$ $(1977)$, $269-278$.
  * [7] W. K. Nicholson,  Strongly clean rings and Fitting’s lemma, Comm. Algebra, $\bf{27}(8)$ $(1999)$, $3583-3592$.
  * [8] R. K. Sharma, P. Yadav, and P. Kanwar,  Lie regular generators of general linear groups, Comm. Algebra, $\bf{40}$ $(2012)$, $1304-1315$.
  * [9]