1 Introduction

Modeling the impact of mass distributions on the gravitational potential and its derivatives is a central issue in geodesy and geophysics. In physical geodesy, the most important application is the determination of mass reductions for gravity field observations, e.g. topographic reductions obtained from digital terrain models. In the classical Stokes problem, topographic (and isostatic) reductions are used to get mass-free boundary values at geoid level (Heiskanen and Moritz 1967). Moreover, these mass reductions can also be integrated into modern methods of gravity field modeling, such as the Remove–Compute–Restore technique (Forsberg 1984, Chap. 4) or Residual Terrain modeling (Forsberg and Tscherning 1997; Hirt et al. 2010). In this context, the main purpose is to smooth the signal content of gravity data in order to improve the numerical stability for interpolation or prediction tasks as well as field transformations. Such a procedure has been proposed for different kinds of quantities like terrestrial, airborne or satellite-based gravity field observations (e.g. Novák et al. 2003; Makhloof and Ilk 2008; Wild and Heck 2008; Janák et al. 2012; Grombein et al. 2013).

Furthermore, there are lots of interdisciplinary applications in the field of solid earth research implicating the problem of mass modeling. For instance, this includes the construction of a synthetic Earth model (Kuhn and Featherstone 2005), investigations of structures and density anomalies in the Earth’s crust (Braitenberg and Ebbing 2009; Álvarez et al. 2012), as well as detection of ice mass loss (Baur and Sneeuw 2011) or hydrological mass variations (Heck and Seitz 2008; Grombein et al. 2012).

All of the described applications can be considered in the context of forward (or inverse) modeling which is based on the evaluation of Newton’s integral for the gravitational potential of a solid body \(\varOmega \subset \mathbb R ^3\) (Heiskanen and Moritz 1967, p. 3):

$$\begin{aligned} V(x_1,x_2,x_3) = G \int \!\!\int \!\!\int _{\varOmega } \frac{\rho (x_1^{\prime },x_2^{\prime },x_3^{\prime })}{\ell } \ {\mathrm{d}}\varOmega , \end{aligned}$$
(1)

where \(G\) denotes Newton’s gravitational constant, \(\rho \) the location-dependent density, and \(\ell \) the Euclidean distance between the (attracted) computation point \(P(x_1,x_2,x_3) \!\in \! \mathbb R ^3\) and the running integration (mass) point \(Q(x_1^{\prime },x_2^{\prime },x_3^{\prime }) \in \varOmega \).

In principle, the volume integral in Eq. (1) can either be evaluated in the space domain by direct integration methods or in the frequency domain by spherical harmonic approaches (cf. Kuhn and Seitz 2005; Wild-Pfeiffer and Heck 2007). In both cases, information on the geometry of the mass distribution as well as the density function \(\rho (x_1^{\prime },x_2^{\prime },x_3^{\prime })\) inside the masses is required. However, in most practical applications the geometry and the density are only available in discrete form, e.g. represented by a grid with a specific resolution. To this end, numerical evaluations of Eq. (1) in the space domain rely on a mass discretization, where the integration domain \(\varOmega \) is decomposed into elementary geometrical bodies \(\varOmega _i \subset \varOmega \) assuming a constant density value \(\rho _i\). By applying the superposition principle, the effect of the whole mass distribution can be approximated by the sum of the impact over all individual mass bodies:

$$\begin{aligned} V(x_1,x_2,x_3) \approx \sum _{i} G\rho _i \int \!\!\int \!\!\int _{\varOmega _i} \frac{1}{\ell } \ {\mathrm{d}}\varOmega , \quad \varOmega = \bigcup _i \varOmega _i. \end{aligned}$$
(2)

According to the requirements of the specific application, the decomposition can be carried out using different types of mass bodies.

In most of the classical approaches prismatic bodies with rectangular form are utilized. Although the respective volume integrals in Eq. (1) can be solved analytically in the case of prisms (Mader 1951; Nagy et al. 2000, 2002), the calculation is very time consuming due to several logarithmic and arctan functions that have to be evaluated. A significant reduction of computation time can be achieved by applying fast Fourier transform techniques (cf. Forsberg 1985; Schwarz et al. 1990; Klose and Ilk 1993). The price to be paid is a decreasing accuracy when the bounding surface is too rough. An alternative is provided by approximate solutions of the prism integrals, such as MacMillan’s formulas based on a Taylor series expansion of the integral kernel (MacMillan 1930), or the use of Gauss–Legendre cubature (e.g. Ku 1977; Von Frese et al. 1981).

Using prisms is especially beneficial for local applications, where height information is generally related to planar Cartesian coordinates referenced to a map projection. For larger application areas the curvature of the Earth has to be taken into account by a vertical shift of the prisms as implemented in the widely used TC software (Forsberg 1984, p. 111), or additional coordinate transformations (e.g. Grombein et al. 2010, p. 30) which increases the computation time even more. Furthermore, the use of prisms with curved surfaces, e.g. topped by a bilinear surface (Smith et al. 2001; Tsoulis et al. 2003), as well as general polyhedral bodies (Petrović 1996; Tsoulis 2012; D’Urso 2013) have been proposed to improve the rough approximation of classical rectangular prisms.

Particularly in regional and global applications, it is advantageous to apply mass bodies that are directly linked to the curvature of the Earth. According to (Anderson 1976, p. 48ff), mass elements bounded by geographical grid lines (\(B,\! L\)) and surfaces of constant ellipsoidal heights \(h\) are called tesseroids. Usually, these ellipsoidal bodies are approximated by corresponding spherical ones, which are bounded by geocentric spherical coordinates \((r,\varphi ,\lambda )\). Even though spherical tesseroids are considered in the following, the Earth’s ellipticity can be taken into account by fixing these bodies on an ellipsoidal reference surface with a latitude-dependent Earth radius (cf. Heck and Seitz 2007).

In contrast to prisms, Newton’s integral in Eq. (1) cannot be solved analytically in the case of tesseroids (e.g. Grüninger 1990, p. 76). Instead of this, approximate solutions have to be applied. Analogous to the idea of MacMillan’s formulas for the prism, Heck and Seitz (2007) derived a third-order approximation which applies a Taylor series expansion of the integral kernels. While Heck and Seitz (2007) originally derived formulas for the tesseroid potential and the first radial derivative, Wild-Pfeiffer (2007, 2008) extended the approach to all components of first- and second-order derivatives. Furthermore, also Gauss–Legendre cubature can be applied as proposed by Asgharzadeh et al. (2007) and Wild-Pfeiffer (2007, 2008). For global computations, another alternative consists of analytically solving the one-dimensional integral with respect to the geocentric distance \(r\) and calculating the remaining two-dimensional surface integral numerically (cf. Martinec 1998; Heck and Seitz 2007).

Detailed comparisons of using different mass discretizations and evaluation techniques in forward modeling are provided by Heck and Seitz (2007), Wild-Pfeiffer (2008), and (Grombein et al. (2010), Chap. 7). In terms of precision and computation time, these investigations have verified the numerical efficiency when using tesseroids instead of conventional prisms. However, practical computations often rely on a combination of different methods by subdividing the total integration domain into a near and a far zone with respect to the distance from the computation point. Since the impact of distant masses on the gravitational potential diminishes with increasing distance, the calculation procedure for remote bodies in the far zone can be substantially simplified. Assuming local mass conservation, suitable approximations are based on mass layers, mass lines, or point mass approximations (e.g. Grüninger 1990; Tsoulis 1999; Wild-Pfeiffer 2008).

As forward and inverse modeling is generally a time consuming task, this paper focuses on the development of optimized formulas for the gravitational field of a homogeneous tesseroid. In contrast to previously published tesseroid formulas that rely on the use of spherical integral kernels, alternative expressions based on the Cartesian integral kernels are derived. Using these new formulas allows an efficient numerical evaluation with a significantly reduced runtime.

The paper is organized as follows: in Sect. 2, theoretical basics are presented that are needed further on in this paper. Section 3 focuses on the mathematical elaboration of the optimized tesseroid formulas based on Cartesian integral kernels, whereas in Sect. 4 the consistency with formulas based on spherical integral kernels is shown. Numerical evaluation rules for an efficient implementation of the new tesseroid formulas are presented in Sect. 5. Furthermore, remarks on the validity and accuracy of the derived formulas, as well as limitations for the very near zone are indicated. The benefit of the optimized tesseroid formulas is shown by two numerical examples presented in Sect. 6. Finally, conclusions as well as an outlook to ongoing and further research work are provided in Sect. 7.

2 Theoretical preliminaries

In Sect. 2.1 the tesseroid potential is introduced, while Sect. 2.2 focuses on the definition of the partial derivatives as used in this paper.

2.1 Gravitational potential of a tesseroid

Tesseroids are bounded by three pairs of surfaces: a pair of concentric spheres (\(r_1\) = const., \(r_2\) = const.), a pair of meridional planes (\(\lambda _1\) = const., \(\lambda _2\) = const.), and a pair of coaxial circular cones defined by the parallels \(\varphi _1\) = const., \(\varphi _2\) = const. (see Fig. 1). On the basis of Newton’s integral in Eq. (1), the gravitational potential \(V^*\) of a tesseroid with a constant mass density \(\rho \) can be specified by introducing the integration domain \(\varOmega ^* := [r_1,r_2]\times [\varphi _1,\varphi _2]\times [\lambda _1,\lambda _2] \subset \mathbb R ^3\) and the spherical volume element \({\mathrm{d}}\varOmega = r^{\prime 2} \cos {\varphi ^{\prime }} {\mathrm{d}}r^{\prime } {\mathrm{d}}\varphi ^{\prime }{\mathrm{d}}\lambda ^{\prime }\):

$$\begin{aligned} V^*(r,\varphi ,\lambda )&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{1}{\ell }\,{\mathrm{d}}\varOmega \nonumber \\&= G\rho \int _{\lambda _1}^{\lambda _2}\int _{\varphi _1}^{\varphi _2}\int _{r_1}^{r_2} \frac{r^{\prime 2} \cos {\varphi ^{\prime }}}{\ell } {\mathrm{d}}r^{\prime } {\mathrm{d}}\varphi ^{\prime }{\mathrm{d}}\lambda ^{\prime }, \end{aligned}$$
(3)

where

$$\begin{aligned} \ell = \ell (P,\!Q) = \sqrt{r^2 + r^{\prime 2} - 2rr^{\prime }\cos {\psi }} \end{aligned}$$
(4)

denotes the Euclidean distance function between the computation point \(P(r,\varphi ,\lambda )\in \mathbb R ^3\) and the running integration point \(Q(r^{\prime },\varphi ^{\prime },\lambda ^{\prime })\in \varOmega ^*\). The spherical distance \(\psi \) between the position vectors of \(P\) and \(Q\) is defined by

$$\begin{aligned} \cos {\psi }(P,\! Q) := \sin {\varphi } \sin {\varphi ^{\prime }} + \cos {\varphi } \cos {\varphi ^{\prime }} \cos ( \lambda ^{\prime } - \lambda ). \end{aligned}$$
(5)

As the integration with respect to \(\lambda ^{\prime }\) and \(\varphi ^{\prime }\) comprises elliptical integrals (cf. Bronstein et al. 2008, p. 430ff), Eq. (3) cannot be solved in closed analytical form. In order to calculate the tesseroid potential, methods of numerical analysis based on the evaluation of the integral kernel

$$\begin{aligned} K(P,\! Q) := \frac{r^{\prime 2} \cos {\varphi ^{\prime }}}{\sqrt{r^2 + r^{\prime 2} - 2rr^{\prime }\cos {\psi }}} \end{aligned}$$
(6)

are applied, which will be discussed in Sect. 5.

Fig. 1
figure 1

Geometry of a spherical tesseroid (Heck and Seitz 2007); the spherical coordinates are referred to the geocentric Earth-fixed equatorial reference system defined by the base vectors \(\varvec{e_1}\), \(\varvec{e_2}\), \(\varvec{e_3}\)

As useful for most practical applications, the computation point \(P\) is restricted to be situated outside the tesseroid domain, i.e. \(P \notin \varOmega ^*\). It will be shown later on in Sect. 5.3 that this restriction should be attenuated in some cases by \(P \notin \varOmega ^* \backslash \partial \varOmega ^*\), where \(\partial \varOmega ^*\) denotes the boundary surface of the tesseroid.

2.2 Definition of partial derivatives

Beside the gravitational potential of a tesseroid the first- and second-order derivatives are considered in this paper. These derivatives are usually defined in a local topocentric Cartesian coordinate system \((\varvec{f_1}, \varvec{f_2}, \varvec{f_3})\) with respect to the computation point \(P\). The \(\varvec{f_1}\)-axis of the left-handed system as used in the following points north, the \(\varvec{f_2}\)-axis points east, and the \(\varvec{f_3}\)-axis points upwards in the geocentric radial direction. The position vector of an arbitrary point in this local Cartesian coordinate system is denoted as

$$\begin{aligned} \varvec{x} = x_1 \cdot \varvec{f}_1 + x_2 \cdot \varvec{f}_2 + x_3 \cdot \varvec{f}_3 = x_i \cdot \varvec{f}_i, \end{aligned}$$
(7)

where \(\varvec{f}_i\) are the unit vectors in the direction of the coordinate axes as described above. In Eq. (7) and further on the Einstein summation convention is used.

The first-order partial derivatives of the gravitational potential \(V\) of any massive body compose the vector field

$$\begin{aligned} \varvec{a} = \mathrm{grad }{V} = {\nabla } V = a_i \cdot \varvec{f}_i, \end{aligned}$$
(8)

where

$$\begin{aligned} a_i := \frac{\partial V(x_1,x_2,x_3)}{\partial x_i} \end{aligned}$$
(9)

are the physical components of the gravitational acceleration with respect to the basis \(\varvec{f}_i\).

The second-order derivatives, known as gravitational gradients, compose a rank two tensor field that is arranged in the so-called Marussi tensor

$$\begin{aligned} \mathbf M = {(\nabla \otimes \nabla )}V = M_{ij} \cdot (\varvec{f}_i \otimes \varvec{f}_j), \end{aligned}$$
(10)

where the operator \(\otimes \) denotes the tensor product and

$$\begin{aligned} M_{ij} := \frac{\partial ^2 V(x_1,x_2,x_3)}{\partial x_i \, \partial x_j} \end{aligned}$$
(11)

are the physical components of this tensor with respect to the basis \(\varvec{f}_i\). Since the gravitational field is irrotational, i.e. \(\nabla \times (\nabla V ) = \varvec{0}\), and the potential \(V\) is a harmonic function outside the masses, the Marussi tensor \(\mathbf M \) is symmetric and trace-free due to the Laplace equation, i.e.

$$\begin{aligned} \mathrm{\Delta V } = \sum _{k=1}^3 M_{kk} = 0. \end{aligned}$$
(12)

3 Optimized tesseroid formulas based on Cartesian integral kernels

As it can be considered from Fig. 2, the Cartesian coordinate differences between the computation point \(P\) and the running integration point \(Q\) can be expressed by

$$\begin{aligned} \Delta x_1&= r^{\prime }\sin {\psi }\cos {\alpha }, \nonumber \\ \Delta x_2&= r^{\prime }\sin {\psi }\sin {\alpha }, \nonumber \\ \Delta x_3&= r^{\prime }\cos {\psi } -r, \end{aligned}$$
(13)

where \(\alpha \) denotes the azimuth angle at \(P\) in direction to \(Q\). Note that \((\Delta x_1,\Delta x_2,\Delta x_3)\) in Eq. (13) can also be interpreted as the Cartesian coordinates of \(Q\) with respect to the topocentric system at the computation point \(P\).

Fig. 2
figure 2

Visualization of the coordinate differences \(\Delta x_1\), \(\Delta x_2\), and \(\Delta x_3\) between the computation point \(P\) and the running integration point \(Q\). The geocentric Cartesian and related spherical coordinate systems are indicated by the black axes \(\varvec{e}_i\), the topocentric local Cartesian coordinate system is represented by the red axes \(\varvec{f}_i\)

Inserting well-known relations of spherical trigonometry (cf. Heiskanen and Moritz 1967, p. 113)

$$\begin{aligned} \sin {\psi } \cos {\alpha }&= \cos {\varphi } \sin {\varphi ^{\prime }} - \sin {\varphi } \cos {\varphi ^{\prime }} \cos {\delta \lambda }, \nonumber \\ \sin {\psi } \sin {\alpha }&= \cos {\varphi ^{\prime }}\sin {\delta \lambda } \end{aligned}$$
(14)

into Eq. (13) results in

$$\begin{aligned} \Delta x_1&= r^{\prime } (\cos {\varphi } \sin {\varphi ^{\prime }} - \sin {\varphi } \cos {\varphi ^{\prime }} \cos {\delta \lambda }), \nonumber \\ \Delta x_2&= r^{\prime }\cos {\varphi ^{\prime }}\sin {\delta \lambda }, \nonumber \\ \Delta x_3&= r^{\prime }\cos {\psi } -r, \end{aligned}$$
(15)

where \(\delta \lambda := \lambda ^{\prime } - \lambda \).

By making use of the derived functional relations in Eq. (15) the Euclidean distance between \(P\) and \(Q\) can be expressed in the local Cartesian system by

$$\begin{aligned} \ell (P,\! Q) = \sqrt{{\Delta x_1}^2+{\Delta x_2}^2+{\Delta x_3}^2}=\sqrt{\Delta x_i \Delta x_i}. \end{aligned}$$
(16)

Inserting Eq. (16) into Eq. (3) results in

$$\begin{aligned} V^*(r,\varphi ,\lambda ) = G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{1}{\sqrt{{\Delta x_1}^2+{\Delta x_2}^2+{\Delta x_3}^2}}{\mathrm{d}}\varOmega \end{aligned}$$
(17)

for the tesseroid potential that is now based on an integral kernel in Cartesian coordinates.

Since the integral kernel in Eq. (17) is an analytical function if \(P \notin \varOmega ^*\), differentiation and integration can be interchanged according to the Leibniz integral rule (e.g. Kellogg 1929, p. 152). For example, this implies

$$\begin{aligned} \frac{\partial V^*}{\partial x_1} = G\rho \frac{\partial }{\partial x_1} \int \!\!\int \!\!\int _{\varOmega ^*} \frac{1}{\ell }{\mathrm{d}}\varOmega = G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{\partial }{\partial x_1} \frac{1}{\ell }{\mathrm{d}}\varOmega . \end{aligned}$$
(18)

Analogous to expressions for the prism or the point mass approximation (e.g. Heck and Seitz 2007; Wild-Pfeiffer 2008), the partial derivatives of the Cartesian integral kernel result in

$$\begin{aligned} \frac{\partial }{\partial x_i}\left( \frac{1}{\ell }\right)&= \frac{\Delta x_i}{\ell ^3},\end{aligned}$$
(19)
$$\begin{aligned} \frac{\partial ^2}{\partial x_i \partial x_j}\left( \frac{1}{\ell }\right)&= \left( \frac{3\Delta x_i\Delta x_j}{\ell ^5}-\frac{\delta _{ij}}{\ell ^3}\right) , \end{aligned}$$
(20)

where \(i,j\in {\{1,2,3\}}\) and \(\delta _{ij}\) denotes the Kronecker delta, i.e. \(\delta _{ij}=1\) if \(i=j\) and \(\delta _{ij}= 0\) otherwise.

The gravitational potential, the gravitational acceleration, and the Marussi tensor caused by a tesseroid with a homogeneous mass density \(\rho \) can therefore be described using the general formula

$$\begin{aligned} \left\{ \begin{array}{c} V^*(r,\varphi ,\lambda )\\ a^*_i(r,\varphi ,\lambda )\\ M^*_{ij}(r,\varphi ,\lambda ) \\ \end{array}\right\} = G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{1}{\ell ^3} \left\{ \begin{array}{c}\Delta x_i \Delta x_i \\ \Delta x_i \\ \frac{3\Delta x_i\Delta x_j}{\ell ^2}-\delta _{ij} \end{array}\right\} {\mathrm{d}}\varOmega ,\nonumber \\ \end{aligned}$$
(21)

where \(\Delta x_i \Delta x_i = \ell ^2\).

Although the integral kernels in Eq. (21) are expressed in Cartesian coordinates, it is worthwhile to mention that the integration domain is still bounded by spherical coordinates extending over the domain of a tesseroid, where \(\varOmega ^*= [r_1,r_2]\times [\varphi _1,\varphi _2]\times [\lambda _1,\lambda _2]\) and \({\mathrm{d}}\varOmega = r^{\prime 2} \cos {\varphi ^{\prime }} {\mathrm{d}}r^{\prime } {\mathrm{d}}\varphi ^{\prime }{\mathrm{d}}\lambda ^{\prime }\). Thus, also these formulas comprise elliptic integrals that have to be evaluated numerically (see Sect. 5).

4 Comparison to tesseroid formulas based on spherical integral kernels

Considering previously published tesseroid methods based on integral kernels expressed in spherical coordinates, the consistency with the elaborated optimized formulas is demonstrated in this section. Moreover, this comparison outlines some numerical advantages of the new formulas.

Following Wild-Pfeiffer (2007, 2008), the basic idea of tesseroid formulas based on spherical integral kernels is a conversion of spherical to Cartesian derivatives. To this end, the first- and second-order spherical derivatives of the tesseroid potential are determined and converted into the moving triad of the local Cartesian coordinate system by making use of the functional relationships (e.g. Tscherning 1976)

$$\begin{aligned} a^*_{1} =\frac{1}{r}\,\frac{\partial V^*}{\partial \varphi }, \quad a^*_{2} =\frac{1}{r\cos {\varphi }}\,\frac{\partial V^*}{\partial \lambda }, \quad a^*_{3} =\frac{\partial V^*}{\partial r}, \end{aligned}$$
(22)

and

$$\begin{aligned} M^*_{11}&= \frac{1}{r^2}\,\left( \frac{\partial ^2 V^*}{\partial \varphi ^2}+r \ \frac{\partial V^*}{\partial r}\right) ,\nonumber \\ M^*_{22}&= \frac{1}{r^2\cos ^2{\varphi }}\,\left( \frac{\partial ^2 V^*}{\partial \lambda ^2}- \cos {\varphi }\sin {\varphi } \ \frac{\partial V^*}{\partial \varphi }\right. \nonumber \\&\left. \qquad \qquad \qquad +r\cos ^2{\varphi } \ \frac{\partial V^*}{\partial r} \right) , \nonumber \\ M^*_{33}&= \frac{\partial ^2 V^*}{\partial r^2}, \nonumber \\ M^*_{12}&= \frac{1}{r^2\cos {\varphi }}\,\left( \frac{\partial ^2 V^*}{\partial \varphi \, \partial \lambda }+ \tan {\varphi } \ \frac{\partial V^*}{\partial \lambda } \right) = M^*_{21},\nonumber \\ M^*_{13}&= \frac{1}{r}\,\left( \frac{\partial ^2 V^*}{\partial \varphi \, \partial r}- \frac{1}{r} \ \frac{\partial V^*}{\partial \varphi }\right) = M^*_{31}, \nonumber \\ M^*_{23}&= \frac{1}{r\cos {\varphi }}\,\left( \frac{\partial ^2 V^*}{\partial \lambda \, \partial r}- \frac{1}{r} \ \frac{\partial V^*}{\partial \lambda }\right) = M^*_{32}. \end{aligned}$$
(23)

In this case the elements \(a^*_i\) and \(M^*_{ij}\) can be considered as the physical coordinates of the tensors of first- and second-orders (covariant derivatives) represented in the topocentric reference frame with the orthonormal base vectors

$$\begin{aligned} \varvec{f}_i = \frac{1}{|\varvec{g}_i|} \cdot \varvec{g}_i, \end{aligned}$$
(24)

where

$$\begin{aligned} \varvec{g}_1 := \frac{\partial \varvec{x}}{\partial \varphi }, \quad \varvec{g}_2 := \frac{\partial \varvec{x}}{\partial \lambda }, \quad \varvec{g}_3 := \frac{\partial \varvec{x}}{\partial r}, \end{aligned}$$
(25)

are the unnormalized vectors pointing in the direction of the increasing spherical coordinate lines \( (r,\varphi ,\lambda )\).

By applying the Leibniz integral rule to the expression for the tesseroid potential in Eq. (3), the required first- and second-order spherical derivatives result in

$$\begin{aligned} \frac{\partial V^*}{\partial \varphi }&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{rr^{\prime }C_\varphi }{\ell ^3} {\mathrm{d}}\varOmega , \nonumber \\ \frac{\partial V^*}{\partial \lambda }&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{ rr^{\prime }C_\lambda }{\ell ^3} {\mathrm{d}}\varOmega , \nonumber \\ \frac{\partial V^*}{\partial r}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{( r^{\prime }\cos {\psi }-r )}{\ell ^3} {\mathrm{d}}\varOmega , \end{aligned}$$
(26)

and

$$\begin{aligned} \frac{\partial ^2 V^*}{\partial \varphi ^2}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{rr^{\prime }}{\ell ^3} \left( \frac{3rr^{\prime }C_{\varphi }^2}{\ell ^2}-\cos {\psi } \right) {\mathrm{d}}\varOmega ,\nonumber \\ \frac{\partial ^2 V^*}{\partial \lambda ^2}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{rr^{\prime }}{\ell ^3}\! \left( \frac{3rr^{\prime }C_{\lambda }^2}{\ell ^2}\!-\!\cos {\varphi ^{\prime }}\cos {\varphi }\cos {\delta \lambda } \right) \, {\mathrm{d}}\varOmega ,\nonumber \\ \frac{\partial ^2 V^*}{\partial r^2}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{1}{\ell ^3} \left[ \frac{3( r^{\prime }\cos {\psi }-r )^2}{\ell ^2}-1 \right] {\mathrm{d}}\varOmega ,\nonumber \\ \frac{\partial ^2 V^*}{\partial \varphi \partial \lambda }&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{rr^{\prime }\cos {\varphi ^{\prime }}\sin {\delta \lambda }}{\ell ^3} \nonumber \\&\cdot \left( \frac{3rr^{\prime }C_\varphi \cos {\varphi }}{\ell ^2}\!-\!\sin {\varphi }\right) {\mathrm{d}}\varOmega ,\nonumber \\ \frac{\partial ^2 V^*}{\partial \varphi \partial r}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{r^{\prime }C_\varphi }{\ell ^3}\left[ \frac{3r( r^{\prime }\cos {\psi }-r )}{\ell ^2}+1 \right] {\mathrm{d}}\varOmega ,\nonumber \\ \frac{\partial ^2 V^*}{\partial \lambda \partial r}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{r^{\prime }C_\lambda }{\ell ^3}\left[ \frac{3r( r^{\prime }\cos {\psi }-r )}{\ell ^2}+1 \right] {\mathrm{d}}\varOmega , \end{aligned}$$
(27)

where

$$\begin{aligned} C_\varphi&:= \frac{\partial \cos {\psi }}{\partial \varphi } =\cos {\varphi } \sin {\varphi ^{\prime }} - \sin {\varphi } \cos {\varphi ^{\prime }} \cos {\delta \lambda }, \nonumber \\ C_\lambda&:= \frac{\partial \cos {\psi }}{\partial \lambda } =\cos {\varphi } \cos {\varphi ^{\prime }} \sin {\delta \lambda }. \end{aligned}$$
(28)

As the volume integrals in Eqs. (26) and (27) cannot be solved analytically, Wild-Pfeiffer (2007, 2008) suggested a formalism based on a two-step sequence:

  1. 1.

    Numerical evaluation of the spherical derivatives in Eqs. (26) and (27),

  2. 2.

    Conversion of the resulting numerical values into the local frame by applying the functional relations according to Eqs. (22) and (23), respectively.

Due to the explicit evaluation of Eqs. (22) and (23), this procedure suffers from the polar singularity which is induced by the spherical coordinate system. As a consequence, this approach causes indeterminate values for the first- and second-order derivatives in Eqs. (9) and (11) in the case of the computation point \(P\) being located on the polar axis, i.e. \(\varphi =\pm 90^\circ \).

In contrast, the elaborated optimized tesseroid formulas in Eq. (21) provide direct expressions for the potential derivatives in the local Cartesian system that avoid an additional transformation and can therefore be used for any position on the globe. However, the mathematical consistency of both tesseroid approaches can be shown. To this end, the analytical expressions for the spherical derivatives in Eqs. (26) and (27) are inserted into the functional relationships in Eqs. (22) and (23). As the volume integrals extend over the same domain \(\varOmega ^*\) they remain purely additive and can be combined. After elementary operations, elaborated exemplarily for the \(M^*_{23}\) component in Appendix A1, the components of the first- and second-order derivatives of the tesseroid potential can be expressed by

$$\begin{aligned} a^*_{1}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{r^{\prime } C_\varphi }{\ell ^3} {\mathrm{d}}\varOmega , \nonumber \\ a^*_{2}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{r^{\prime }\cos {\varphi ^{\prime }}\sin {\delta \lambda }}{\ell ^3} {\mathrm{d}}\varOmega ,\nonumber \\ a^*_{3}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{r^{\prime }\cos {\psi } -r}{\ell ^3} {\mathrm{d}}\varOmega , \end{aligned}$$
(29)

and

$$\begin{aligned} M^*_{11}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \left( \frac{3r^{\prime 2} C_\varphi ^2}{\ell ^5}-\frac{1}{\ell ^3}\right) {\mathrm{d}}\varOmega ,\nonumber \\ M^*_{22}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \left[ \frac{3(r^{\prime }\cos {\varphi ^{\prime }}\sin {\delta \lambda } )^2}{\ell ^5}-\frac{1}{\ell ^3}\right] {\mathrm{d}}\varOmega ,\nonumber \\ M^*_{33}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \left[ \frac{3( r^{\prime }\cos {\psi }-r )^2}{\ell ^5}-\frac{1}{\ell ^3} \right] {\mathrm{d}}\varOmega ,\nonumber \\ M^*_{12}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{3r^{\prime 2} C_\varphi \cos {\varphi ^{\prime }}\sin {\delta \lambda }}{\ell ^5} {\mathrm{d}}\varOmega , \nonumber \\ M^*_{13}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{3r^{\prime } C_\varphi ( r^{\prime }\cos {\psi }-r )}{\ell ^5} {\mathrm{d}}\varOmega , \nonumber \\ M^*_{23}&= G\rho \int \!\!\int \!\!\int _{\varOmega ^*} \frac{3r^{\prime }\cos {\varphi ^{\prime }}\sin {\delta \lambda } ( r^{\prime }\cos {\psi }-r )}{\ell ^5} {\mathrm{d}}\varOmega . \end{aligned}$$
(30)

By applying the substitutions \(\Delta x_1, \Delta x_2,\) and \(\Delta x_3\) in Eq. (13) it becomes obvious that Eqs. (29) and (30) are consistent with the optimized tesseroid formulas in Eq. (21).

5 Aspects of numerical evaluation

While there are quite few approaches for the numerical evaluation of elliptic volume integrals, as aforementioned in Sect. 1, this paper applies a Taylor series approach as presented in Heck and Seitz (2007). In this approach the integration is achieved by means of expanding the integral kernel in a Taylor series with fourth-order error in the spatial coordinates of the integration point.

In Sect. 5.1 the main idea of this method is briefly recapitulated and then adapted to the optimized tesseroid formulas in Sect. 5.2. Remarks concerning the validity and the accuracy of the evaluation rules as well as limitations are indicated in Sect. 5.3.

5.1 Idea of the Taylor series approach

Following Heck and Seitz (2007), the Taylor expansion of the spherical integral kernel in Eq. (6) at the point \(Q_0(r_0,\varphi _0,\lambda _0)\) can be expressed by

$$\begin{aligned} K(P\!,\!Q) = \sum _{i,j,k} \frac{ K_{ijk}(P\!,\!Q_0)}{(i+j+k)!} (r^{\prime }-r_0)^i (\varphi ^{\prime }-\varphi _0)^j \times (\lambda ^{\prime }-\lambda _0)^k,\nonumber \\ \end{aligned}$$
(31)

where

$$\begin{aligned} K_{ijk}(P\!,\!Q_0) \text{: }= \left. \frac{\partial ^{i+j+k} K(P\!,\!Q)}{\partial {r^{\prime }}^i \partial {\varphi ^{\prime }}^j \partial {\lambda ^{\prime }}^k}\right| _{\small \begin{array}{lll} &{}&{}r^{\prime }\,=\,r_0\\ &{}&{}\varphi ^{\prime }\,=\,\varphi _0\\ &{}&{}\lambda ^{\prime }\,=\,\lambda _0 \end{array}} \end{aligned}$$
(32)

are the partial derivatives of the integral kernel \(K\) evaluated at \(Q_0\). When integrating the Taylor series in Eq. (31), maximum efficiency is achieved by fixing the Taylor point \(Q_0\) at a point of symmetry, e.g. at the tesseroid’s geometrical center

$$\begin{aligned} r_0 = \frac{r_1+r_2}{2}, \quad \varphi _0 =\frac{\varphi _1+\varphi _2}{2}, \quad \lambda _0 =\frac{\lambda _1+\lambda _2}{2}. \end{aligned}$$
(33)

By inserting Eq. (31) into Eq. (3), the integration with respect to each coordinate \((r^{\prime },\varphi ^{\prime },\lambda ^{\prime })\) can be performed by a simple substitution (see Heck and Seitz 2007), e.g. in the case of \(r^{\prime }\) follows

$$\begin{aligned} \int _{r_1}^{r_2} (r^{\prime }-r_0)^i {\mathrm{d}}r^{\prime }&= \int _{-\Delta r /2}^{+\Delta r /2} (r^*)^i {\mathrm{d}}r^* \nonumber \\&= \frac{1-(-1)^{i+1}}{(i+1)2^{i+1}}(\Delta r)^{i+1} \nonumber \\&= {\left\{ \begin{array}{ll} 0 &{} \text{ if } \ i \ \text{ odd } \\ (\Delta r)^{i+1} / [(i+1)2^i] &{} \text{ if } \ i \ \text{ even },\end{array}\right. } \end{aligned}$$
(34)

where

$$\begin{aligned} \Delta r=r_2-r_1, \quad \Delta \varphi =\varphi _2-\varphi _1, \quad \Delta \lambda =\lambda _2-\lambda _1 \end{aligned}$$
(35)

denote the dimensions of the tesseroid. Consequently, terms with any odd-order \(i\), \(j\), or \(k\) in the Taylor series in Eq. (31) cancel out after a subsequent integration and only terms with even-order remain.

Thus, the gravitational potential of a homogeneous tesseroid can be approximated by

$$\begin{aligned} V^*(r,\varphi ,\lambda )&= G\rho \Delta r\Delta \varphi \Delta \lambda \left[ K_{000}+\frac{1}{24}\left( K_{200}{\Delta r}^2\right. \right. \nonumber \\&\left. \left. +\, K_{020}{\Delta \varphi }^2 \Big .\!+\!K_{002}{\Delta \lambda }^2\right) \!+\!O(\Delta ^4/\ell _0^5)\right] ,\nonumber \\ \end{aligned}$$
(36)

where the Landau symbol \(O(\Delta ^4/\ell _0^5)\) indicates that the omitted Taylor residual has a magnitude of fourth-order, scaled with a negative power of \(\ell _0\) which is the Euclidean distance between \(P\) and \(Q_0\). In this case \(\Delta \) should be considered symbolically, e.g. in metrical units it would be \(\Delta r=r_2-r_1\), \(\Delta \varphi \sim r_0(\varphi _2-\varphi _1)\), and \(\Delta \lambda \sim r_0\cos \varphi _0(\lambda _2-\lambda _1)\). Furthermore, it is worthwhile mentioning that \(\ell _0 > 0\) is strictly finite if an exterior computation point \(P\) is considered, as presumed in Sect. 2.1, i.e. \(P\!\notin \!\varOmega ^*\) implies \(\ell _0 > \Delta /2\).

The zero-order term in Eq. (36) corresponds to the potential of a point mass that concentrates the mass

$$\begin{aligned} m_0 = \rho r_0^2 \cos {\varphi _0} \Delta r\Delta \varphi \Delta \lambda \end{aligned}$$
(37)

at the Taylor point \(Q_0\). This is consistent with the zero-order approximation of the total tesseroid mass (e.g. Grüninger 1990, p.79):

$$\begin{aligned} m^*&= \rho \int _{\lambda _1}^{\lambda _2}\int _{\varphi _1}^{\varphi _2}\int _{r_1}^{r_2} r^{\prime 2} \cos {\varphi ^{\prime }} {\mathrm{d}}r^{\prime } {\mathrm{d}}\varphi ^{\prime }{\mathrm{d}}\lambda ^{\prime } \nonumber \\&= \frac{1}{3}\,\rho (r_2^3-r_1^3) (\sin {\varphi _2}-\sin {\varphi _1})(\lambda _2-\lambda _1) \approx m_0. \end{aligned}$$
(38)

For the evaluation of Eq. (36) the zero- and second-order coefficients according to Eq. (32) are explicitly provided in Heck and Seitz (2007). Analogously, Wild-Pfeiffer (2008) presented corresponding zero- and second-order coefficients for the numerical evaluation of the first- and second-order spherical derivatives of the tesseroid potential. They can be utilized in combination with the relationships in Eqs. (22) and (23) in order to calculate the components of the gravitational acceleration and the Marussi tensor.

5.2 Adaption of the Taylor series approach

Analogously to the procedure in Eq. (36), a numerical solution of the optimized tesseroid formulas in Eq. (21) can be supplied by subsequently integrating Taylor series expansions of the Cartesian integral kernels at the tesseroid’s geometrical center point \(Q_0(r_0,\varphi _0,\lambda _0)\). To supply a more general notation that allows an efficient computational implementation, the substitutions

$$\begin{aligned} (\xi ^{\prime }_1,\xi ^{\prime }_2,\xi ^{\prime }_3)&:=(r^{\prime },\varphi ^{\prime },\lambda ^{\prime }) \end{aligned}$$
(39)

for the coordinates of the integration point \(Q\) and

$$\begin{aligned} (\Delta \xi _1,\Delta \xi _2,\Delta \xi _3)&:=(\Delta r,\Delta \varphi ,\Delta \lambda ) \end{aligned}$$
(40)

for the dimensions of the tesseroid are used in the following. Furthermore, based on Eq. (39) the differential operators

$$\begin{aligned} \partial _k := \frac{\partial }{\partial \xi ^{\prime }_k}, \quad \partial ^2_k := \frac{\partial ^2}{\partial {\xi ^{\prime }_k}^2}, \quad k\in {\{1,2,3\}}, \end{aligned}$$
(41)

can be defined.

A suitable numerical solution of Eq. (21) with a fourth-order error in the spatial coordinates of the integration point is then provided by

$$\begin{aligned}&\left\{ \begin{array}{c} V^*(r,\varphi ,\lambda )\\ a^*_i(r,\varphi ,\lambda )\\ M^*_{ij}(r,\varphi ,\lambda ) \end{array}\right\} = \omega \left. \left\{ \begin{array}{c} K(P,\!Q)\\ L_i(P,\!Q)\\ N_{ij}(P,\!Q) \end{array}\right\} \right| _{\begin{matrix}r^{\prime }=r_0\\ \varphi ^{\prime }=\varphi _0\\ \lambda ^{\prime }=\lambda _0 \end{matrix}}\nonumber \\&\qquad \quad +\frac{\omega }{24} \sum _{k=1}^{3} {\Delta \xi _k}^2\left. \left\{ \begin{array}{c}\partial ^2_k K(P,\!Q)\\ \partial ^2_k L_i(P,\!Q)\\ \partial ^2_k N_{ij}(P,\!Q)\end{array}\right\} \right| _{\begin{matrix}r^{\prime }=r_0\\ \varphi ^{\prime }=\varphi _0\\ \lambda ^{\prime }=\lambda _0 \end{matrix}}\nonumber \\&\qquad \qquad \qquad \qquad \qquad + \left\{ \begin{array}{c} O(\Delta ^4/\ell _0^5)\\ O(\Delta ^4/\ell _0^6)\\ O (\Delta ^4/\ell _0^7)\end{array}\right\} , \end{aligned}$$
(42)

where

$$\begin{aligned} \omega := G\rho \prod _{k=1}^{3}\Delta \xi _k. \end{aligned}$$
(43)

In Eq. (42) the Cartesian integral kernels of Eq. (21) are denoted by

$$\begin{aligned} \left\{ \begin{array}{c} K(P,\!Q)\\ L_i(P,\!Q)\\ N_{ij}(P,\!Q) \end{array}\right\} := \frac{1}{\ell ^3}\left\{ \begin{array}{c} \Delta x_i \Delta x_i \\ \Delta x_i \\ \frac{3\Delta x_i\Delta x_j}{\ell ^2}-\delta _{ij}\end{array}\right\} \tau , \end{aligned}$$
(44)

in which

$$\begin{aligned} \tau := r^{\prime 2} \cos {\varphi ^{\prime }} \end{aligned}$$
(45)

factors the spherical volume element \({\mathrm{d}}\varOmega \). The Cartesian coordinate differences \(\Delta x_i\) and the Euclidean distance \(\ell \) can be calculated using the previous Eqs. (13) and (16), respectively.

The required second-order derivatives in Eq. (44) can be represented in the general form

$$\begin{aligned}&\left\{ \begin{array}{c} \partial ^2_k K\\ \partial ^2_k L_i\\ \partial ^2_k N_{ij}\end{array}\right\} = \frac{1}{\ell ^3}\left[ \partial ^2_k (\tau ) \left\{ \begin{array}{c} \alpha \\ \alpha _i \\ \alpha _{ij}\end{array}\right\} + \partial _k(\tau ) \left\{ \begin{array}{c} \beta _k \\ \beta _{ik} \\ \beta _{ijk}\end{array}\right\} + \tau \left\{ \begin{array}{c}\gamma _k \\ \gamma _{ik} \\ \gamma _{ijk}\end{array}\right\} \right] ,\nonumber \\ \end{aligned}$$
(46)

where

$$\begin{aligned} \alpha&{:=} \Delta x_i \Delta x_i, \ \ \alpha _{i} \,{:=}\, \Delta x_i, \ \ \alpha _{ij}\, {:=}\, \frac{3\Delta x_i\Delta x_j}{\ell ^2}-\delta _{ij},\end{aligned}$$
(47)
$$\begin{aligned} \beta _k&{:=} 2\partial _k(\overline{\ell }), \nonumber \\ \beta _{ik}&{:=} 2\left[ \partial _k (\Delta x_i)+\frac{3\Delta x_i \partial _k(\overline{\ell })}{\ell ^2}\right] ,\nonumber \\ \beta _{ijk}&{:=}\frac{6}{\ell ^2}\Biggl [\Delta x_i\partial _k\left( \Delta x_j\right) +\Delta x_j\partial _k\left( \Delta x_i\right) \Biggr .\nonumber \\&\quad \ \ \ \Biggl .+\, \frac{5\Delta x_i\Delta x_j\partial _k(\overline{\ell })}{\ell ^2}-\delta _{ij}\partial _k (\overline{\ell })\Biggr ],\end{aligned}$$
(48)
$$\begin{aligned} \gamma _k&{:=} \partial ^2_k (\overline{\ell })+\frac{3(\partial _k (\overline{\ell }))^2}{\ell ^2},\nonumber \\ \gamma _{ik}&{:=} \partial ^2_k (\Delta x_i)+\frac{3}{\ell ^2}\left\{ 2\partial _k (\Delta x_i)\partial _k (\overline{\ell })\right. \nonumber \\&\quad \qquad \quad \quad \qquad \ \ \ \ \left. +\Delta x_i\left[ \partial ^2_k (\overline{\ell })+\frac{5(\partial _k (\overline{\ell }))^2}{\ell ^2}\right] \right\} ,\nonumber \\ \gamma _{ijk}&{\!\!:=\!\!} \frac{3}{\ell ^2}\left\{ \Delta x_i\partial _k^2(\Delta x_j)\!\!+\!\!\Delta x_j\partial _k^2(\Delta x_i)\!\!+\!\!2\partial _k(\Delta x_i)\partial _k(\Delta x_j)\right. \nonumber \\&\quad \quad +\frac{5}{\ell ^2}\left[ 2\partial _k (\overline{\ell }) \Bigg (\Delta x_i\partial _k (\Delta x_j)+\partial _k(\Delta x_i)\Delta x_j\Bigg )\right. \nonumber \\&\quad \quad \left. +\Delta x_i\Delta x_j\left( \partial ^2_k (\overline{\ell })+\frac{7(\partial _k (\overline{\ell }))^2}{\ell ^2}\right) \right] \nonumber \\&\quad \quad \left. -\delta _{ij}\left[ \partial ^2_k (\overline{\ell })+\frac{5(\partial _k (\overline{\ell }))^2}{\ell ^2}\right] \right\} , \end{aligned}$$
(49)

and

$$\begin{aligned} \overline{\ell } \text{: }=-\frac{1}{2}\ell ^2 = -\frac{1}{2}\Delta x_i \Delta x_i. \end{aligned}$$
(50)

Particularly, for \(\xi ^{\prime }_1=r^{\prime }\) holds:

$$\begin{aligned} \partial _1(\tau )&= 2r^{\prime }\cos \varphi ^{\prime }, \nonumber \\ \partial _1^2 (\tau )&= 2 \cos \varphi ^{\prime }, \nonumber \\ \partial _1 (\overline{\ell })&= r\cos {\psi }-r^{\prime }, \nonumber \\ \partial _1^2 (\overline{\ell })&= -1, \nonumber \\ \partial _1 (\Delta x_1)&= C_\varphi , \nonumber \\ \partial _1 (\Delta x_2)&= \cos {\varphi ^{\prime }}\sin {\delta \lambda },\nonumber \\ \partial _1 (\Delta x_3)&= \cos {\psi },\nonumber \\ \partial _1^2 (\Delta x_1)&= 0, \nonumber \\ \partial _1^2 (\Delta x_2)&= 0,\nonumber \\ \partial _1^2 (\Delta x_3)&= 0. \end{aligned}$$
(51)

Particularly, for \(\xi ^{\prime }_2 = \varphi ^{\prime }\) holds:

$$\begin{aligned} \partial _2(\tau )&= -r^{\prime 2}\sin \varphi ^{\prime }, \nonumber \\ \partial _2^2 (\tau )&= -r^{\prime 2} \cos \varphi ^{\prime }, \nonumber \\ \partial _2 (\overline{\ell })&= r\partial _2 (\Delta x_3),\nonumber \\ \partial _2^2 (\overline{\ell })&= r\partial _2^2 (\Delta x_3), \nonumber \\ \partial _2 (\Delta x_1)&= r^{\prime }[\cos {\varphi } \cos {\varphi ^{\prime }} + \sin {\varphi } \sin {\varphi ^{\prime }}\cos {\delta \lambda }], \nonumber \\ \partial _2 (\Delta x_2)&= -r^{\prime }\sin {\varphi ^{\prime }}\sin {\delta \lambda }, \nonumber \\ \partial _2 (\Delta x_3)&= r^{\prime }[\sin {\varphi } \cos {\varphi ^{\prime }} - \cos {\varphi } \sin {\varphi ^{\prime }} \cos {\delta \lambda }],\nonumber \\ \partial _2^2 (\Delta x_1)&= - \Delta x_1, \nonumber \\ \partial _2^2 (\Delta x_2)&= -\Delta x_2,\nonumber \\ \partial _2^2 (\Delta x_3)&= -r^{\prime }\cos {\psi }. \end{aligned}$$
(52)

Particularly, for \(\xi ^{\prime }_3=\lambda ^{\prime }\) holds:

$$\begin{aligned} \partial _3(\tau )&= 0, \nonumber \\ \partial _3^2 (\tau )&= 0, \nonumber \\ \partial _3 (\overline{\ell })&= r\partial _3 (\Delta x_3), \nonumber \\ \partial _3^2 (\overline{\ell })&= r\partial _3^2 (\Delta x_3), \nonumber \\ \partial _3 (\Delta x_1)&= \Delta x_2 \sin {\varphi }, \nonumber \\ \partial _3 (\Delta x_2)&= r^{\prime }\cos {\varphi ^{\prime }}\cos {\delta \lambda },\nonumber \\ \partial _3 (\Delta x_3)&= -\Delta x_2 \cos {\varphi },\nonumber \\ \partial _3^2 (\Delta x_1)&= \partial _3 (\Delta x_2)\sin {\varphi }, \nonumber \\ \partial _3^2 (\Delta x_2)&= -\Delta x_2,\nonumber \\ \partial _3^2 (\Delta x_3)&= -\partial _3 (\Delta x_2)\cos \varphi . \end{aligned}$$
(53)

Note that according to Eq. (42), the analytical expressions of the Cartesian integral kernels in Eq. (44) and its second-order derivatives in Eq. (46) have to be evaluated at the Taylor point \(Q_0\), i.e. the primed coordinates of the running integration point \( (r^{\prime },\varphi ^{\prime },\lambda ^{\prime })\) have to be replaced by the coordinates of the Taylor point \( (r_0,\varphi _0,\lambda _0)\).

5.3 Remarks on the validity and accuracy

From potential theory it is known that the gravitational potential of a voluminous mass and its first-order derivatives are defined and continuous in the whole \(\mathbb R ^3\), even if the computation point \(P\) is located at the boundary surface or inside a field generating mass distribution of continuous density (e.g. Kellogg 1929, p. 151). The singularity of Newton’s integral when the computation point \(P\) coincides with the integration point \(Q\), i.e. \(\ell =0\), is weak and therefore removable. If the density function satisfies a Hölder condition, the second-order derivatives are also defined for interior computation points \(P\), but generally they are not defined for points on the boundary surface as it represents an interface of density discontinuity (cf. Kellogg 1929, p. 156).

In the context of a homogeneous tesseroid this implies that values for \(V^*\), \(a^*_i\), and \(M^*_{ij}\) in Eq. (21) are well-defined for interior computation points \(P\), even though the presented Taylor series approach in Eq. (42) is limited to exterior points due to the required condition \(P\!\notin \!\varOmega ^*\). Considering the limiting behavior of Eq. (21) the restriction can be attenuated to \(P \notin \varOmega ^* \backslash \partial \varOmega ^*\) in the case of the gravitational potential and the elements of the gravitational acceleration. Thus, \(V^*\) and \(a^*_i\) can also be evaluated in the case of a computation point \(P\) placed on the tesseroid surface, which is particularly useful for terrestrial applications.

Instead of an analytical error analysis of Eq. (42) the approximation error of the method is estimated by a realistic numerical experiment in the following section. Generally, as mentioned in Heck and Seitz (2007) and (Grombein et al. (2010), p. 34), the accuracy of the presented approach is strongly sensitive to the geometrical shape of the tesseroid, particularly for small distances between the computation point \(P\) and the Taylor point \(Q_0\). Beside the tesseroid dimensions \(\Delta r\), \(\Delta \varphi \), and \(\Delta \lambda \) that can imply for example a flat or columnar shape, the position of \(P\) relative to the tesseroid also impacts the computation. Due to the meridional convergence of the spherical coordinate system, the geometrical shape of a tesseroid changes with respect to the latitude of its position. For instance, the ground surface of a tesseroid located near the equator is almost quadratic whereas its surface degenerates to a triangular shape in the polar region.

As noted in Heck and Seitz (2007), special care should be taken when applying the Taylor series approach for tesseroids in the near zone around the computation point \(P\) which is particularly the case for terrestrial applications. Since Heck and Seitz (2007) found unacceptably large errors, they recommended to replace tesseroids by equivalent prisms in the direct vicinity of the computation point. Another possibility that will be shown in the following section is the horizontal respectively vertical subdivision of the tesseroids in the near zone. Although numerical investigations on these two possibilities provide satisfactory results, the origin of the occurring numerical problems of tesseroids in the very near zone is the subject of ongoing investigations.

6 Numerical investigations

In order to validate the derived evaluation rules and to show the computational efficiency, two realistic numerical experiments are presented in this section. The elaborated optimized tesseroid formulas based on Cartesian integral kernels (cp. Sect. 3) are therefore compared to the previously published tesseroid approach based on spherical integral kernels (cp. Sect. 4), and conventional rectangular prism formulas (Nagy et al. 2000, 2002). In the following, these approaches are denoted as tesseroid (Cartesian), tesseroid (spherical), and prism, respectively. The software implementation is performed in the programming language C++. The source code may be made available upon request.

Section 6.1 focuses on the required computation time, while in Sect. 6.2 the approximation error induced by the different methods is analyzed.

6.1 Comparison of the computation time

In a first experiment, the required computation time of forward modeling based on the different approaches is compared. As a realistic application, topographic reductions are estimated by utilizing the digital terrain model DTM2006.0 (Pavlis et al. 2007) that provides a \(5^{\prime } \times 5^{\prime }\) global grid of heights \(h_i^{\text{ DTM }}\). The topographic information of this model can be represented by 9,931,200 individual tesseroid bodies \(\varOmega ^*_i\) with the constant horizontal dimensions \(\Delta _{\text{ hor }} = \Delta \varphi = \Delta \lambda = 5^{\prime }\) and the variable vertical dimensions \({\Delta r}_i = h_i^{\text{ DTM }}\).

According to Eq. (2) the total topographic effect is approximated by the sum over the impact of all individual tesseroids, i.e.

$$\begin{aligned} \left\{ \begin{array}{c} V\\ a_i \\ M_{ij} \end{array}\right\} \approx \left\{ \begin{array}{c} \sum V^*\\ \sum a_i^* \\ \sum M_{ij}^* \end{array}\right\} . \end{aligned}$$
(54)

Note that in the case of the prism formulas the tesseroid dimensions are converted to equivalent rectangular prisms under the assumption of the same mass density (cf. Heck and Seitz 2007; Grombein et al. 2010, p. 29ff). Furthermore, as mentioned in Sect. 1, an additional coordinate transformation has to be performed in the case of prisms to take the curvature of the Earth into account (cf. Grombein et al. 2010, p. 30).

In Table 1 the required relative computation time for calculating the components \(V\), \(a_i\), and \(M_{ij}\) is given with respect to the applied method. A significant speed-up of computation time using the optimized (Cartesian) tesseroid formulas instead of the spherical ones can be recognized, which increases with the order of the derivatives. Generally, this can be considered as a consequence of a reduced number of occurring arithmetic operations which are specified in Table 2. In the case of the elements of the Marussi tensor, the reduction is mainly caused by the fact that only six volume integrals have to be evaluated instead of nine as in former representations.

Table 1 Comparison of computation times \(t\) (%) using tesseroid methods with spherical and optimized Cartesian integral kernels as well as prisms to compute the gravitational potential \(V\), the components of the gravitational acceleration \(a_i\), and the Marussi tensor \(M_{ij}\) of topographic masses. All values are specified in percentage relative to the computation time of the spherical tesseroid method
Table 2 Comparison of the optimized (Cartesian) tesseroid formulas with respect to previously published spherical methods in terms of the number of occurring arithmetic operations \(n\). Note that these are approximate values as they are strongly dependent on the actual computational implementation

In total, when computing \(V\), \(a_i\), and \(M_{ij}\) together, only \(55\,\%\) of the runtime of the spherical tesseroid methods is needed for the optimized (Cartesian) approach. In comparison to the conventional prism approach the advantage of using tesseroids for global applications is impressively shown.

6.2 Comparison of the approximation error

In a second experiment, the approximation error induced by the different methods is analyzed and compared. In order to obtain reference values an analytical solution is needed. Therefore, a spherical shell approximation is considered as a simple synthetic Earth model, where topographic masses with a constant thickness \(h^{\prime }\) and a homogeneous mass density \(\rho \) are fixed on a sphere with a mean Earth radius \(R\). Thus, the inner radius of the spherical shell is set to \(R_1=R\), the outer radius to \(R_2=R+h^{\prime }\).

6.2.1 Analytical solution of a spherical shell

The gravitational potential in the external domain of a spherical shell \(\varOmega ^\mathrm{s}\) with constant density \(\rho \) can be determined analytically from the potential difference between two solid spheres with radii \(R_1\) and \(R_2\) (e.g. Vaníček et al. 2001):

$$\begin{aligned} V^\mathrm{s}(r) := \frac{G \left( m_2 - m_1\right) }{r}, \end{aligned}$$
(55)

where

$$\begin{aligned}&\!\!m_1 = \rho \frac{4}{3}\pi R^3_1, \end{aligned}$$
(56)
$$\begin{aligned}&\!\!m_2 = \rho \frac{4}{3}\pi R^3_2, \end{aligned}$$
(57)
$$\begin{aligned}&\!\!r= \sqrt{x_1^2 + x_2^2 + x_3^2}. \end{aligned}$$
(58)

By determining the partial derivatives of \(V^\mathrm{s}\) in Eq. (55) the elements of the gravitational acceleration and the Marussi tensor result in

$$\begin{aligned}&\!\!a^\mathrm{s}_{i}(r) = G\left( m_2 - m_1\right) \frac{x_i}{r^3}, \end{aligned}$$
(59)
$$\begin{aligned}&\!\!M^\mathrm{s}_{ij}(r) = G\left( m_2 - m_1\right) \left( \frac{3 x_i x_j}{r^5}-\frac{\delta _{ij}}{r^3}\right) . \end{aligned}$$
(60)

Due to the isotropy of the spherical shell, a computation point \(P\) on the polar axis can be considered without loss of generality, i.e. \(x_1=0,\ x_2=0,\ x_3=r \ge R_2\). This implies \(a^\mathrm{s}_1=a^\mathrm{s}_2=M^\mathrm{s}_{12}=M^\mathrm{s}_{13}=M^\mathrm{s}_{23}=0\) and

$$\begin{aligned} a^\mathrm{s}_{3}(r)&= \frac{V^\mathrm{s}(r)}{r}, \end{aligned}$$
(61)
$$\begin{aligned} M^\mathrm{s}_{11}(r)&= M^\mathrm{s}_{22}(r) = -\frac{V^\mathrm{s}(r)}{r^2}, \end{aligned}$$
(62)
$$\begin{aligned} M^\mathrm{s}_{33}(r)&= \frac{2V^\mathrm{s}(r)}{r^2}. \end{aligned}$$
(63)

6.2.2 Setting of the experiment

In order to quantify realistic approximation errors, the absolute differences between the exact values (\(V^\mathrm{s}\), \(a_i^\mathrm{s}\), \(M_{ij}^\mathrm{s}\)) of the analytical solution and the actual values when applying forward modeling based on a mass discretization with tesseroids are analyzed:

$$\begin{aligned} \left\{ \begin{array}{c} \delta V\\ \delta a_i \\ \delta M_{ij} \end{array}\right\} := \left| \left\{ \begin{array}{c} V^\mathrm{s}\\ a_i^\mathrm{s} \\ M_{ij}^\mathrm{s} \end{array}\right\} - \left\{ \begin{array}{c} \sum V^*\\ \sum a_i^* \\ \sum M_{ij}^* \end{array}\right\} \right| . \end{aligned}$$
(64)

In the experiment a spherical shell with a constant thickness of \(h^{\prime }=1\) km is chosen which approximately corresponds to a mean topographic height. Furthermore, the spherical shell is defined by the parameters as specified in Table 3. In the case of the gravitational potential and acceleration, mostly related to terrestrial applications, the computation point is placed on the surface of the spherical shell. For the second-order derivatives of the Marussi tensor, the satellite altitude of the gravity gradiometry field mission Gravity field and steady-state Ocean Circulation Explorer (GOCE) is utilized. In Table 4 the settings of both applications and the resulting reference values for the spherical shell are indicated, where \(\mathrm{1 \, mGal = 10^{-5} m\, s^{-2}}\) and \(\mathrm{1 \, mE = 10^{-12} \,s^{-2}}\).

Table 3 Parameters defining the spherical shell
Table 4 Setting of the terrestrial and satellite application and resulting reference values according to Eq. (55) and Eqs. (61)–(63)

To get the actual values for the developed method the spherical shell \(\varOmega ^\mathrm{s}\) is decomposed into individual tesseroid bodies \(\varOmega ^*_i\) bounded by spherical grid lines. The horizontal dimensions of the tesseroids are again set to \(\Delta _{\text{ hor }} = \Delta \varphi = \Delta \lambda = 5^{\prime }\). According to the thickness of the spherical shell, the vertical dimension is fixed to \(\Delta r = h^{\prime } = 1\) km.

In order to improve the accuracy of the tesseroid approaches in the case of terrestrial applications, a subdivision of the mass elements located in the near zone around the computation point \(P\) is performed as proposed in Sect. 5.3. To this end, for tesseroids, whose geometrical center \(Q_0\) is located inside a spherical distance \(\psi _\mathrm{c}\) with respect to the computation point, a \(100 \times 100\) horizontal subdivision is performed. Based on the \(5^{\prime } \times 5^{\prime }\) resolution of the original tesseroid bodies this implies an increase of the grid resolution to \(3^{\prime \prime } \times 3^{\prime \prime } \approx 100\) m\( \times 100\) m which is consistent with current high-resolution global DTMs like SRTM3 (Farr et al. 2007). Different extensions of the near zone are analyzed, where the spherical distance \(\psi _\mathrm{c}\) is set to integer multiples of the horizontal tesseroid dimension, i.e.

$$\begin{aligned} \psi _\mathrm{c} = \kappa \cdot \Delta _{\text{ hor }}, \quad \kappa \in \mathbb N _0. \end{aligned}$$
(65)

For the cases \(\kappa = \left\{ 1, \ldots , 5 \right\} \), Fig. 3 illustrates the numbers of mass elements in the near zone that are subdivided. Due to the meridional convergence these numbers are dependent on the latitude \(\varphi \) of the computation point \(P\) showing a strong increase towards the pole. Note again that instead of a subdivision it is also possible to utilize equivalent prisms which has been shown in the numerical investigations in Heck and Seitz (2007) and will, therefore, not be presented in this paper. In the case of satellite applications, no subdivision is performed as there is a large distance between the computation points and the spherical shell.

Fig. 3
figure 3

Visualization of the number of mass elements in the near zone as a function of the latitude \(\varphi \) of the computation point. According to Eq. (65) the near zone is bounded by a spherical distance \(\psi _\mathrm{c} = \kappa \cdot \Delta _{\text{ hor }}\) with respect to the position of the computation point. All values in this figure refer to a horizontal dimension of \(\Delta _{\text{ hor }}=5^{\prime }\)

As mentioned in Sect. 5.3 the geographical position of the tesseroid impacts the accuracy due to a changing geometry according to the meridional convergence. Concerning the strong influence of the near zone (cf. Heck and Seitz 2007), it can be assumed that the total approximation error may also depend on the latitude \(\varphi \) of the computation point \(P\). The approximation error in Eq. (64) is therefore evaluated for different positions on the globe. Due to the spherical symmetry, this can be restricted to a computation point \(P\) running along an arbitrary but fixed meridian on the northern hemisphere. All other cases provide analogous results.

6.2.3 Results for a terrestrial application

In Fig. 4 the estimated approximation error is presented for the gravitational potential \(\delta V\) on the left panel and the radial component of the gravitational acceleration \(\delta a_3\) on the right panel. As indicated in Table 4 the computation point \(P\) is located on top of the spherical shell.

Fig. 4
figure 4

Visualization of the estimated approximation error \(\delta V\) (left panel) and \(\delta a_3\) (right panel) as a function of the latitude \(\varphi \) of the computation point that is located on top of the respective spherical shell, i.e. \(h = h^{\prime } = 1\) km. The blue curve is obtained by applying conventional prism formulas. The green curve represents the use of the spherical tesseroid approach and is completely overlaid by the red dashed curve that indicates the utilization of the optimized (Cartesian) tesseroid formulas. These three cases are calculated without a special consideration of the near zone, i.e. \(\kappa = 0\). The remaining curves represent the use of the optimized (Cartesian) tesseroid formulas by performing an additional \(100 \times 100\) horizontal subdivision of mass elements located in the near zone. According to Eq. (65) the cases of \(\kappa = \{1, \ldots , 5 \}\) are displayed

Both tesseroid approaches (green and overlaid red dashed curve) show the same, nearly constant behavior with respect to the latitude \(\varphi \). The approximation error \(\delta V\) is in a range of about \(10^0\)\(10^{-1}\,\mathrm{m^2\, s^{-2}}\), while the order of magnitude for \(\delta a_3\) is about \(10^2 \, \mathrm{mGal}\). This error behavior clearly demonstrates the above indicated numerical problems of the tesseroid approach when the computation point \(P\) is located in the direct vicinity of the particular mass bodies. Compared with the conventional prism approach (blue curve) the approximation error for tesseroids is inferior by about three orders of magnitude in the case of \(\delta V\) and two orders of magnitude in the case of \(\delta a_3\). Furthermore, it can be seen that the approximation errors for the prism approach show significant dependencies on the latitude \(\varphi \), particularly in the case of the potential. In the polar region, where there is the largest difference in the geometrical shape between a tesseroid and a rectangular prism, the tesseroid approaches supply slightly better, but still bad results.

When performing the intended subdivision in the near zone, it can clearly be seen in Fig. 4 that the approximation error for the optimized (Cartesian) tesseroid approach in both cases \(\delta V\) and \(\delta a_3\) can be largely reduced. For increasing values of \(\kappa \) respectively \(\psi _\mathrm{c}\), the approximation error is rapidly decreasing. Occurring discontinuities in the approximation errors can be associated with a changing number of mass elements in the near zone (cp. Fig. 3). In the case of \(\kappa = 3\), the approximation error \(\delta V\) is below \(10^{-3}\, \mathrm{m^2\, s^{-2}}\), which is consistent with a sub-millimeter error in derived geoid heights. Similarly, \(\delta a_3\) is below 1\(\mu \)Gal, which corresponds to the accuracy of actual gravimeters. Note that a comparable behavior is provided if the subdivision is applied to the tesseroid method based on spherical integral kernels. The corresponding cases are therefore not illustrated in Fig. 4.

To summarize, the achieved accuracy will be sufficient for most practical terrestrial applications if a subdivision is performed in the near zone extended by a spherical distance of \(\psi _\mathrm{c} \ge 3 \cdot \Delta _{\text{ hor }}\) with respect to the computation point. However, it should be mentioned that the computation time is increased due to the densification in the very near zone, but it is still considerably smaller in comparison to conventional prism formulas (see Table 5).

Table 5 Comparison of computation time \(t\) (%) using optimized (Cartesian) tesseroid methods and conventional prism formulas to compute \(V\), \(a_i\), and \(M_{ij}\). The values for the optimized tesseroid method are indicated in relation to the extension of a near zone, in which a \(100 \times 100\) horizontal subdivision is performed. The near zone is bounded by a spherical distance of \(\psi _\mathrm{c}=\kappa \cdot \Delta _{\text{ hor }}\) around the computation point. All values are specified in percentage relative to the computation time of the spherical tesseroid method with \(\kappa =0\)

6.2.4 Results for a satellite application

According to Table 4 the approximation errors in the case of the Marussi tensor are estimated in the context of the satellite gravity gradiometry mission GOCE, i.e. the computation point \(P\) is fixed at a height of \(h=260\) km above the sphere of radius \(R=R_1\). In Fig. 5 the approximation errors according to Eq. (64) for \(\delta M_{11}\) (upper left panel), \(\delta M_{22}\) (upper right panel), and \(\delta M_{33}\) (lower left panel) are visualized.

Fig. 5
figure 5

Visualization of the estimated approximation error \(\delta M_{11}\) (upper left panel), \(\delta M_{22}\) (upper right panel), and \(\delta M_{33}\) (lower left panel) as a function of the latitude \(\varphi \). The lower right panel illustrates the Laplace condition \(\delta \Delta V\) according to Eq. (66). The computation point \(P\) is located at a satellite height of \(h = 260\) km. The blue curve is obtained using conventional prism formulas, the red dashed curve by applying the optimized (Cartesian) tesseroid formulas. The green curve represents the use of the spherical tesseroid approach and is overlaid by the red dashed curve in most cases

For all three components nearly the same behavior is visible showing a considerable dependency on the latitude \(\varphi \) of the computation point. Generally, the approximation error rises with increasing latitude, while a rapid increase can be seen in the polar region at \(\varphi > 85^\circ \). Due to the logarithmic scale a change of sign from a positive to a negative approximation error induces a behavior as visible in \(\delta M_{11}\) and \(\delta M_{33}\) at \(\varphi \approx 25^\circ \) in the case of the prism approach.

The approximation error of the conventional prism approach is in a range of about \(10^0\)\(10^{-5}\,\mathrm{mE}\), while the tesseroid approaches comprise significant smaller errors of about \(10^{-5}\)\(10^{-13}\,\mathrm{mE}\). Due to the large distance of the computation points to the tesseroid bodies, it is not necessary to take special care for the near zone, i.e. \(\kappa = 0\) can be fixed without any problems. Again the green curve for the spherical tesseroid approach is mostly overlaid by the red curve of the optimized (Cartesian) tesseroid approach showing that both variants provide the same approximation errors. Some small oscillations can be detected near the equator indicating the limitation of the numerical stability. Furthermore, it is worth mentioning that in the case of \(\delta M_{22}\) a large difference between the two tesseroid approaches can be detected at the pole point. This effect clearly illustrates the polar singularity problem of the spherical tesseroid approach.

As an additional quality characteristic the discrepancy in the Laplace equation

$$\begin{aligned} \delta \!\mathrm{\Delta }\! V := \sum \left( \sum _{k=1}^3 M_{kk}^*\right) \end{aligned}$$
(66)

is displayed on the lower right panel of Fig. 5 supporting the findings indicated above.

7 Conclusion and outlook

When using forward (or inverse) modeling based on Newton’s integral, tesseroid bodies are the natural mass discretization when dealing with data parameterized in geodetic or geocentric spherical coordinates. In contrast to the conventional prism approach the curvature of the Earth is directly taken into account by tesseroids which is particularly beneficial for regional and global applications. The respective volume integrals describing the gravitational potential of a homogeneous tesseroid and its derivatives comprise elliptical integrals that cannot be solved analytically. Although approximate solutions have to be applied, various numerical investigations confirmed the advantages of tesseroids concerning precision and numerical efficiency in comparison with conventional prisms (cf. Heck and Seitz 2007; Wild-Pfeiffer 2008; Grombein et al. 2010, Chap. 7).

Previously published tesseroid formulas are based on integral kernels with respect to geocentric spherical coordinates (e.g. Heck and Seitz 2007; Wild-Pfeiffer 2007, 2008). As the elements of the first- and second-order derivatives of the gravitational potential are usually defined in a moving Cartesian frame, additional transformations have to be applied that show polar singularities (cf. Tscherning 1976). In contrast to these approaches optimized tesseroid formulas based on Cartesian integral kernels have been elaborated in this paper. These formulas avoid the explicit transformation and therefore allow to represent the required components of the gravitational acceleration and the Marussi tensor directly in the local Cartesian frame for any position on the globe.

The consistency of both tesseroid approaches has been shown analytically and verified numerically. The main benefit of using the optimized tesseroid formulas is a significant speed-up of the calculation process. In comparison to previously published tesseroid implementations only 80 % of the computation time for the gravitational potential, 72 % for the gravitational acceleration, and 44 % for the Marussi tensor are required, which has been shown by a realistic numerical experiment.

Furthermore, approximation errors have been investigated by a comparison to reference values of an analytical solution. The volume integrals linked to tesseroids have been evaluated numerically by a Taylor series approach with fourth-order error that has been adapted from Heck and Seitz (2007). Generally, the estimated approximation errors show a significant dependency on the latitude of the computation point which is particularly visible in the case of the second-order derivatives.

The occurrence of numerical problems when utilizing tesseroids in the very near zone around the computation point, as mentioned by Heck and Seitz (2007), could be confirmed. In terrestrial applications two alternatives can be applied: replacement of tesseroids by equivalent prisms, which was proposed in Heck and Seitz (2007), or a horizontal subdivision of mass elements, which was presented in the numerical investigations of this paper. The near zone around the computation point should be extended by a spherical distance of at least three times the horizontal tesseroid dimension. Due to larger distances this is not critical in the case of applications in satellite altitude. Current ongoing numerical studies intensively investigate the accuracy of tesseroid formulas especially in the very near zone.