Purpose. To investigate the features of the algorithm implementation for finding the derivatives of the spatial distribution function of the planet's masses with the use of high-order Stokes constants and, on the basis of this, to find its analytical expression. According to the given methodology, to carry out calculations with the help of which to carry on the study of dynamic phenomena occurring inside an ellipsoidal planet. The proposed method involves the determination of the derivatives of the mass distribution function by the sum, the coefficients of which are obtained from the system of equations, which is incorrect. In order to solve it, an error-resistant method for calculating unknowns was used. The implementation of the construction is carried out in an iterative way, while for the initial approximation we take the three-dimensional function of the density of the Earth's masses, built according to Stokes constants up to the second order inclusive, by dynamic compression by the one-dimensional density distribution, and we determine the expansion coefficients of the derivatives of the function in the variables to the third order inclusive. They are followed by the corresponding density function, which is then taken as the initial one. The process is repeated until the specified order of approximation is reached. To obtain a stable result, we use the Cesaro summation method (method of means).. The calculations performed with the help of programs that implement the given algorithm, while the achieved high (ninth) order of obtaining the terms of the sum of calculations. The studies of the convergence of the sum of the series have been carried out, and on this basis, a conclusion has been made about the advisability of using the generalized finding of the sums based on the Cesaro method. The optimal number of contents of the sum terms has been chosen, provides convergence both for the mass distribution function and for its derivatives. Calculations of the deviations of mass distribution from the mean value ("inhomogeneities") for extreme points of the earth's geoid, which basically show the total compensation along the radius of the Earth, have been performed. For such three-dimensional distributions, calculations were performed and schematic maps were constructed according to the taken into account values of deviations of three-dimensional distributions of the mean ("inhomogeneities") at different depths reflecting the general structure of the Earth's internal structure. The presented vector diagrams of the horizontal components of the density gradient at characteristic depths (2891 km - core-mantle, 700 km - middle of the mantle, also the upper mantle - 200, 100 km) allow us to draw preliminary conclusions about the global movement of masses. At the same time, a closed loop is observed on the “core-mantle” edge, which is an analogy of a closed electric circuit. For shallower depths, differentiation of vector motions is already taking place, which gives hope for attracting these vector-grams to the study of dynamic motions inside the Earth. In fact, the vertical component (derivative with respect to the *z* variable) is directed towards the center of mass and confirms the main property of mass distributions - growth when approaching the center of mass. The method of stable solution of incorrect linear systems is applied, by means of which the vector-gram of the gradient of the mass distribution function is constructed. The nature of such schemes provides a tool for possible causes of mass redistribution in the middle of the planet and to identify possible factors of tectonic processes in the middle of the Earth, i.e indirectly confirms the gravitational convection of masses. The proposed technique can be used to create detailed models of density functions and its characteristics (derivatives) of the planet's interior, and the results of numerical experiments - to solve tectonics problems.

1. Dzewonski, A., & Anderson, D. (1981). Preliminary reference Earth model. Physics of the earth and planetary interiors, 25(4), 297-356.

https://doi.org/10.1016/0031-9201(81)90046-7

2. Fys, M. M., Zazulyak, P. M., & Chernyaga, P. G. (2013). Values of Densities and their Variations at the Barycenters of Ellipsoidal Planets. Kinematics and physics of celestial bodies 29(2), 62-68. (in Ukrainian).

https://doi.org/10.3103/S0884591313020025

3. Fys, M. M., Brydun, A. M., Yurkiv, M. I., & Sohor A. R. (2018). On definition of a function by its derivatives, represented by combinations of legendre polynomials of three variables. Young Scientist, 63(11). (in Ukrainian). http://molodyvcheny.in.ua/files/journal/2018/11/91.pdf

4. Fys, M., Yurkiv, M., Brydun, A., & Lozynskyi, V. (2016). One option of constructing three-dimensional distribution of the mass and its derivatives for a spherical planet earth. Geodynamics, 2(21), 36-44.

https://doi.org/10.23939/jgd2016.02.036

5. Fys, M., Brydun, A., & Yurkiv, M. (2018). Method for approximate construction of three-dimensional mass distribution function and gradient of an elipsoidal planet based on external gravitational field parameters. Geodynamics, 2 (25), 27-36.

https://doi.org/10.23939/jgd2018.02.027

6. Fys, M., Brydun, A., Yurkiv, M., Sohor, & Holubinka, U. (2020). The methodology of approximate construction of the three dimensiona mass distribution function and its gradient for the ellipsoidal planet subsidies. Geodynamics, 2 (29), 21-32.

7. Fys, M. M, Brydun, A. M., & Yurkiv, M. I. (2019). On representation of the internal spherical functions and their derivatives in the planetary coordinate system. Mathematical modeling and computing, 6(2),251-257.

https://doi.org/10.23939/mmc2019.02.251

8. Fys, M. M., Brydun A. M. & Yurkiv, M. I. (2021). On approach to determine the internal potential and gravitational energy of ellipsoid. MMC, 8(3), 359-367.

https://doi.org/10.23939/mmc2021.03.359

9. Korn, G. A. & Korn, T. M. (2000)/ Mathematical Handbook for Scientists and Engineers: Definitions, Theorems, and Formulas for Reference and Review. Dover Publications.

10. Meshcheryakov, G. A., & Fys, M. M. (1986). Three-dimensional and reference density models of the Earth. Geophysical Journal. 8(4), 68-75.(in Russian).

11. Meshcheryakov, G. A., & Fys, M. M. (1990). Threedimensional density model of the Earth І. Geophysical Journal. 12(4), 50-57.(in Russian).

12. Meshcheriakov, G. (1991). Problems of potential theory and generalized Earth. M: Science, Сhief editor of physical and mathematical literature. (in Russian).

13. Moritz, H. (1973). Ellipsoidal mass distributions. Report No. 206, Department of Geodetic Science, The Ohio State University, Columbus, Ohio.

14. Pavlis N. K., Holmes S. A., Kenyon S. C. et al. (2008). An Earth Gravitational Model to Degree 2160: EGM2008. EGU General Assembly. Geophysical Research Abstracts. 10, 2. (EGU2008- A-01891)

15. Syavavko M. & Rybytska O. (2000). Mathematical modeling under uncertainty. Ukrainian technologies, 320 p. (in Ukrainian)

16. Tserklevych, A. L., Zayats, O. S., & Fys, M. M. (2012). Earth group planets gravitational models of 3-d density distributions. Geodynamics, 1(12), 42-53. (in Ukrainian).

https://doi.org/10.23939/jgd2012.01.042

17. Yatskiv Ya. S. (1980). Nutation in the system of astronomical constants. Preprint. Academy of Sciences of the Ukrainian SSR, Institute of Theoretical Physics. 59 p. (in Ukrainian).