Efficient solution of the anisotropic spherically aligned axisymmetric Jeans equations of stellar hydrodynamics for galactic dynamics

 I present a flexible solution for the axisymmetric Jeans equations of stellar hydrodynamics under the assumption of an anisotropic (three-integral) velocity ellipsoid aligned with the spherical polar coordinate system. I describe and test a robust and efficient algorithm for its numerical computation. I outline the evaluation of the intrinsic velocity moments and the projection of all first and second velocity moments, including both the line-of-sight velocities and the proper motions. This spherically aligned Jeans anisotropic modelling (JAMsph) method can describe in detail the photometry and kinematics of real galaxies. It allows for a spatially varying anisotropy, or stellar mass-to-light ratio gradients, as well as for the inclusion of general dark matter distributions and supermassive black holes. The JAMsph method complements my previously derived cylindrically aligned JAMcyl and spherical Jeans solutions, which I also summarize in this paper. Comparisons between results obtained with either JAMsph or JAMcyl can be used to assess the robustness of inferred dynamical quantities. As an illustration, I modelled the ATLAS3D sample of 260 early-type galaxies with high-quality integral-field spectroscopy, using both methods. I found that they provide statistically indistinguishable total density logarithmic slopes. This may explain the previously reported success of the JAM method in recovering density profiles of real or simulated galaxies. A reference software implementation of JAMsph is included in the publicly available jam software package.