## The methodology of approximate construction of the three-dimensional mass distribution function and its gradient for the ellipsoidal planet subsidies

**Purpose.** To create an algorithm for constructing a three-dimensional masses distribution function of the planet and its derivatives taking into account the Stokes constants of arbitrary orders. Being based on this method, the task is to perform the research on the internal structure of the Earth. **Methodology**. The derivatives of the inhomogeneous mass distribution are presented by linear combinations of biorthogonal polynomials which coefficients are obtained from the system of equations.