**Purpose.** To investigate the technique for constructing a three-dimensional distribution function for the masses of the interior of the Earth and its derivatives, coordinated with the parameters of the planet's gravitational field to fourth order inclusive. By using the mass distribution function constructed, to make an interpretation of the features of the internal structure of an ellipsoidal planet. **Methodology.** Based on the created initial approximation of the function, which includes a reference density model, further refinements are built. Using Stokes constants up to the second order inclusive, we give the following approximation, which we subsequently take as zero. In this case, the use of Stokes constants up to the fourth order inclusive leads to the solution of systems of equations. It is established that the addition of one identity leads to uniqueness of the solution. One system with Stokes constants is an exception. It is necessary to note that the computation process is controllable, since the power moments of the density derivatives are reduced to quantities that take into account the value of the density on the surface of the ellipsoid. **Results. **In contrast to the second-order model describing gross global inhomogeneities, the obtained distribution function gives a detailed picture of the location of the density anomalies (the deviation of the three-dimensional function from the averaged over the sphere is "isodense.") Analysis of maps at different depths 2891 km (core-mantle), 5150 km (internal-external core) allows us to draw preliminary conclusions about the global mass redistribution due to the rotating component of the force of gravity over the entire radius, as well as due to the horizontal components of the density gradient. On the contrary, the minimum of such a deviation is observed in the polar parts of the Earth, which also has its explanation: the magnitude of the rotational force decreases when approaching the pole. The mass distribution function is constructed using the proposed method to describe in more detail the picture of the mass distribution. Of particular interest are sketch maps of the components of the density anomaly function gradient, namely the component which coincides with the axis - for the upper part of the shell which is negative, and for the lower part it is positive. This means that the gradient vector is directed toward the centre of mass. The nature of the values for other two components is different both in sign and in magnitude and depends on the placement point. The cumulative consideration and consideration of all the quantities makes possible a more complete interpretation of the processes inside the Earth. **Originality. ** In contrast to the traditional approach, the changes for the density derivatives of one variable (depth), obtained from the Adams-Williams equation, in this paper made an attempt to obtain derivatives with Cartesian coordinates. Used in the described method, the parameters of the gravitational field up to the fourth order inclusively increases the order of approximation of the mass distribution function of three variables from two to six, and its derivatives up to five. In this case, unlike the traditional method, the defining here is the construction of the derivatives, from which the mass distribution function and the use of geophysical information accumulated in the referential PREM model are reproduced. **Practical significance.** The resulting mass distribution function of the Earth can be used as the next approximation when using Stokes constants of higher orders in the presented algorithm. Its application makes it possible to interpret global anomalies of the gravitational field and to study geodynamic processes deeply inside the Earth.

- Anderson, D. L, Dzevonsky, A. M. (1984). Seismic tomography.
*In the world of science*. 12, 23–34.*(in Russian).*https://doi.org/10.1038/scientificamerican1084-60 - Bullen, K. E. (1978). Earth's Density Moscow: Mir.
*(in Russian).* - Chernyaga, P. G., & Fys, M. M. (2012). A new approach to the use of Stokes constants for the construction of functions and its derivatives of mass distribution of planets. Collection of scientific works of Western geodesic society UTGK "Modern achievements in geodetic science and production". II (24), 40–43.
*(in Ukrainian).* - 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 - Fys, M. M., Foca, R. S., Sogor, A. R., & Volos, V. O. (2008). Method for planets density distribution construction with using ot Stoke’s constants to fourth order. Lviv.
*Geodynamics,*1 (7), 25–34.*(in Ukrainian).* - Fys, M. M., Yurkiv, М., Brydun, А., Lozynskyi, V. (2016). One option of constructing three-dimensional distribution of the mass and its derivatives for a spherical planet.
*Geodynamics*, 2(21), 36–44. https://doi.org/10.23939/jgd2016.02.036 - Liu, L., Chao, B. F., Sun, W., & Kuang, W. (2016). Assessment of the effect of three-dimensional mantle density heterogeneity on Earth rotation in tidal frequencies.
*Geodesy and geodynamics*,*7*(6), 396-405. https://doi.org/10.1016/j.geog.2016.09.002 - Martinee, Z., & Pec, K. (1987). Three-Dimensional Density Distribution Generating the Observed Gravity Field of Planets: Part II. The Moon. In
*Figure and Dynamics of the Earth, Moon and Planets*(p. 153). - Martyshko, P. S, Ladovsky I. V, Byzov, D. D, & Tsidaev, A. G. (2017). Method for constructing block models of three-dimensional density distribution.
*Theory and practice of geological interpretation of geophysical fields.*Materials of the 44th session of the International Seminar named after D.G. Uspensky: Moscow, January 23 - 27, 2017 Moscow Institute of Physics and Technology of the Russian Academy of Sciences.*(in Russian).* - Mashimov, M. M. (1991). Theoretical Geodesy: Guidebook. edited by V. P. Savinykh and V. R. Yashchenko. M.: Nedra.
*(in Russian)**.* - Meshcheryakov, G. A. (1975). The use of the Stokes constants of the Earth to refine its mechanical model.
*Geodesy**,**cartography**and**aerial**photography**.*21, 23–30.*(**in**Russian**).* - Meshcheryakov, G. A., & Fys, M. M. (1981). Determination of the Earth's interior density by series in biorthogonal systems of polynomials. Theory and methods of interpretation of gravitational and magnetic anomalies.
*(in Russian)**.* - Meshcheryakov, G. A., & Fys, M. M. (1986). Three-dimensional and reference density models of the Earth. Kyiv.
*Geophysical Journal*.*8*. (4), 68–75.*(in Russian)**.* - Meshcheryakov, G. A. (1991). The problems of potential theory and the generalized Earth. Moscow: Nauka. (Chief Editor of the Physico-Mathematical Lit.)
*(in Russian)**.* - Meshcheryakov, G. A., Zazulyak, P. M., Kulko, O. V., Fys, M. M., & Shtabaluk, P. I. (1994).
*A variant of the mechanical model of the lower mantle*. .Proceedings of the III Orel Conference "Studying the Earth as a planet using astronomy, geophysics and geodesy". Кyiv: Naukova dumka.*(in Russian)**.* - Moritz, G. (1973). Computation ellipsoidal mass distributions. Department of Geodetic Science, The Ohio State University.
- Moritz, G. (1994).
*The figure of the Earth: Theoretical geodesy and the internal structure of the Earth*. Kyiv.*(in Russian)**.* - Shcherbakov, A. M. (1978). The volumetric distribution of the density of the Moon. Astronomical Visnyk, XII (2), 88–95.
*(in Russian)**.* - Su, W. J., Woodward, R. L., & Dziewonski, A. M. (1994). Degree 12 model of shear velocity heterogeneity in the mantle.
*Journal of Geophysical Research: Solid Earth*,*99*(B4), 6945–6980. https://doi.org/10.1029/93JB03408 - Tserklevich, A. L., Zajats, O. S., Fys, M. M (2012). Earth group planets gravitational models of 3-d density distributions.
*Geodynamics,*1 (12), 42–53. (*in Ukrainian*). - Woodward, M. J., Nichols, D., Zdraveva, O., Whitfield, P., & Johns, T. (2008). A decade of tomography.
*Geophysics*,*73*(5), VE5-VE11. https://doi.org/10.1190/1.2969907 - Zharkov, V. N., & Trubitsin, V. P. (1980). Physics of the planetary subsoil. Moscow: Nauka, (Chief Editor of the Physico-Mathematical Lit.).
*(in Russian)*