Next Article in Journal
When Does Platform Private-Label Advertising Work? The Role of Quality and Supply Chain Structure
Previous Article in Journal
Qualitative Analysis and Applications of Fractional Stochastic Systems with Non-Instantaneous Impulses
error_outline You can access the new MDPI.com website here. Explore and share your feedback with us.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Direct Transformation of Laplace Equation’s Solution from Spherical to Cartesian Representation

Doctoral School of Applied Informatics and Applied Mathematics, Óbuda University, 1034 Budapest, Hungary
Mathematics 2026, 14(2), 226; https://doi.org/10.3390/math14020226
Submission received: 13 December 2025 / Revised: 29 December 2025 / Accepted: 6 January 2026 / Published: 7 January 2026

Abstract

The description of the Earth’s gravitational field, governed by the fundamental potential equation (the Laplace equation), is conventionally expressed using spherical harmonics, yet the Cartesian formulation, using a Taylor series representation, offers significant algebraic advantages. This paper proposes a novel Direct Cartesian Method for generating spherical basis functions and coefficients directly within the Cartesian coordinate system, utilising the partial derivatives of the inverse distance ( 1 / R ) function. The present study investigates the structural correspondence between the Cartesian form of spherical basis functions and the high-order partial derivatives of 1 / R . The study reveals that spherical basis functions can be categorised into four distinct groups based on the parity of the degree n and order m. It is demonstrated that each spherical basis function is equivalent to a weighted summation of the partial derivatives of the inverse distance ( 1 / R ) with respect to Cartesian coordinates. Specifically, the basis functions are combined with those derivatives that share the same order of Z-differentiation and possess matching parities in their orders of differentiation with respect to X and Y. In order to facilitate the practical calculation of these high-degree derivatives, a recursive numerical algorithm has been developed. The method generates the polynomial coefficients for the numerator of the 1 / R derivatives. A pivotal innovation is the implementation of a step-wise normalization scheme within the recursive relations. The integration of the recursive ratios of global normalization factors (including full Schmidt normalization) into each step of the algorithm effectively neutralises factorial growth, rendering the process immune to numerical overflow. The validity and numerical stability of the proposed method are demonstrated through a detailed step-by-step derivation of a sectorial basis function ( n = 8 , m = 2 ).

1. Introduction

1.1. The Gravitational Potential and the Laplace Equation

Newton’s law of universal gravitation (characterized by the inverse-square law) posits that the gravitational acceleration produced by a mass situated at the origin of a coordinate system, when observed from any given point in space, is inversely proportional to the square of the distance between the point and the origin. Additionally, the acceleration is a vector, and this vector’s direction is oriented towards the origin of the coordinate system where the mass is situated.
Laplace determined that this vector, at any given location in space, is the gradient of a scalar function called potential and can be constructed as the partial derivatives of the potential function.
Moreover, he observed an additional property: in source-free regions, the sum of the second derivatives of this scalar function (with respect to Cartesian coordinates) equals zero. This property is encapsulated in what is known as the Laplace differential equation [1].
2 U X 2 + 2 U Y 2 + 2 U Z 2 = 0 .
This finding was later supplemented by Poisson, who stated that where masses are present, the right side of the equation contains a term with the density of the matter ( ρ ) [2]:
2 U X 2 + 2 U Y 2 + 2 U Z 2 = 4 π G ρ ,
where G is the gravitational constant and ρ is the density of the material.
The potential generated at an external point P ( X , Y , Z ) by a given mass element is inversely proportional to the distance r between the external point and the mass element. For the whole volume of the body, the volume integral should be calculated:
U = G M d m r ,
where G represents the gravitational constant, and the integration is performed over the domain M, which represents the entire spatial volume occupied by the attracting mass. In Equation (1), r denotes the Euclidean distance between the computation point P (defined by position vector R ) and the infinitesimal mass element d m (defined by position vector ρ ), i.e., r = | R ρ | . Mathematically, the term 1 / r corresponds to the fundamental solution (or Green’s function) of the Laplace operator in three-dimensional unbounded space [3]. Since the gravitational potential satisfies the linear Poisson equation, the general solution for an arbitrary mass distribution is constructed by the superposition (convolution) of these elementary point-source solutions. The solution methods in spherical and Cartesian coordinate systems differ in how the 1 r function is expressed and how the integration in Equation (1) is performed.
  • The spherical approach utilizes the generating function of Legendre polynomials (as detailed in Section 1.2).
  • The Cartesian approach applies a 3D Taylor series expansion (as detailed in Section 1.3).

1.2. Laplace’s Equation in Spherical Coordinates

1.2.1. The General Solution in Spherical Coordinates

In the spherical coordinate representation of Laplace’s equation, the coordinates are the radius (R—the distance from the origin), the polar angle (or colatitude, ϑ ), and the longitude (or azimuth λ ) angles. The Laplace equation takes the following form:
1 R 2 R R 2 U R + 1 R 2 sin ϑ sin ϑ U ϑ + 1 R 2 sin 2 ϑ 2 U λ 2 = 0 .
This equation can be solved by the method of separation of variables (Fourier method), which is comprehensively described in [4]. A solution is sought which is the product of an R-dependent function R ( R ) , a ϑ -dependent function P ( ϑ ) and a λ -dependent function Λ ( λ ) .
U ( R , θ , λ ) = R ( R ) · P ( θ ) · Λ ( λ ) .
Substituting and performing the necessary transformations, we obtain the following conditions for each function:
The form of the function R ( R ) must be either R n or R ( n + 1 ) , where n is an integer. In the following, for gravity calculations outside the mass volume of Earth, only the R ( n + 1 ) term remains, as the potential for R = should be zero.
The function Λ ( λ ) must be a harmonic function, cos ( m λ ) or sin ( m λ ) , and since it must be periodic in 2 π , m is also an integer. From these two conditions, it follows that the function P ( ϑ ) must be the solution of the following, the so-called Legendre differential equation [5]:
1 sin ϑ ϑ sin ϑ P ( ϑ ) ϑ + n · ( n + 1 ) m 2 sin 2 ϑ P = 0 .
The solution to this problem requires two integer values, where n is called the degree, and m is called the order.
The solution of the Legendre differential equation is called Legendre polynomial for given n, if m = 0 , and associated Legendre function for m 0 , which can be obtained by the Rodrigues formula [6]:
P n m ( ϑ ) = 1 cos 2 ϑ m 2 2 n · n ! · n + m cos 2 ϑ 1 n ( cos ϑ ) n + m .
The consequence of the derivation in these formulas shows that nonzero elements are obtained only for m n .
However, the physical meaning of the solution is best understood by expanding the reciprocal distance term 1 / r in the potential integral (Equation (1)). Using the law of cosines, the distance r can be expressed as the difference between the vectors R (observation point) and ρ (mass element):
1 r = 1 | R ρ | = 1 R 2 + ρ 2 2 R ρ cos ψ = 1 R 1 + ρ R 2 2 ρ R cos ψ ,
where ψ is the angle between R and ρ . The validity of this expansion for the external gravitational field requires that the observation point is located outside the bounding sphere of the mass ( ρ R < 1 ). Under this condition, the term can be expanded into a convergent series using the generating function of Legendre polynomials P n ( cos ψ ) :
1 r = n = 0 ρ n R n + 1 P n cos ψ .
Substituting this expansion back into Equation (1), and utilizing the addition theorem for spherical harmonics to separate the coordinates, leads to the standard spherical harmonic series form. Consequently, this approach yields the general solution for the gravitational potential U ( R , ϑ , λ ) expressed in spherical coordinates:
U ( R , ϑ , λ ) = n = 0 m = 0 n 1 R n + 1 P n m ( ϑ ) · C n m cos ( m λ ) + S n m sin ( m λ ) .
For later use, we might factor out the spherical basis functions, which are the products of the power or radius, the Legendre function, and the cosine or sine of longitude. The basis function contains the coordinates of the observation point (R, ϑ , λ ). As the R n is in the denominator, the fraction was expanded by multiplying both the numerator and denominator by R n —as we will see—to obtain Cartesian coordinates in the numerator.
The cosine and sine spherical basis functions are denoted with C B n m and S B n m ;
C B n m = R n · P n m ( ϑ ) · cos ( m λ ) R 2 n + 1 ,
S B n m = R n · P n m ( ϑ ) · sin ( m λ ) R 2 n + 1 .
The coefficients C n m and S n m characterize the mass distribution of the body. These coefficients are the integrals for the entire body, multiplied by the respective aforementioned functions of the spherical coordinates of body masses, and are specified as:
C n m = M ρ n · P n m ( ϑ ) · cos ( m λ ) · d m ,
S n m = M ρ n · P n m ( ϑ ) · sin ( m λ ) · d m ,
where ρ is the radius (the distance from coordinate system origin), ϑ is the colatitude and λ is the longitude of the respective mass, d m . The coefficients of Equations (4) and (5) are formally similar to the numerators of the spherical base functions in Equations (2) and (3).
As we do not know the actual distribution of the masses in Earth’s interior, the C n m and S n m coefficients are calculated using measurements of gravity-related quantities on Earth’s surface and in outer space.
Following this factoring out, the potential equation is represented as follows, as the linear combination of the basis functions ( C B n m and S B n m ) where the multipliers are the respective coefficients ( C n m and S n m ):
U ( R , ϑ , λ ) = n = 0 m = 0 n C B n m · C n m + S B n m · S n m .

1.2.2. Schmidt Normalization

Schmidt demonstrated that Legendre polynomials, in addition to being orthogonal, should also be normalized for the calculation of the actual values of the coefficients. Additionally, this normalization decreased the very high numeric values of the Legendre functions for higher n values.
This condition is satisfied if one multiplies the normalizing factor by the square of the Legendre function and then take its integral over the range ϑ = [ 0 , π ] to obtain 1. This integral condition in spherical coordinates is given by:
k n m = 4 π λ = 0 2 π ϑ = 0 π ( P n m ) 2 sin ϑ d ϑ d λ .
That means the completed Schmidt normalization is defined as follows: for m 0 ,
k n m = ( 2 n + 1 ) · 2 ( n m ) ! ( n + m ) ! ,
and for m = 0 ,
k n 0 = ( 2 n + 1 ) · ( n m ) ! ( n + m ) ! .
Similarly, by combining Equations (6) and (7) we get:
k n m = 2 δ 0 , m · ( 2 n + 1 ) · 2 ( n m ) ! ( n + m ) ! .
Using the fully normalized Schmidt coefficients, the normalized spherical base functions are
C B n m ¯ = k n m · C B n m , S B n m ¯ = k n m · S B n m ,
the fully normalized coefficients are
C n m ¯ = 1 k n m · C n m , S n m ¯ = 1 k n m · S n m ,
and with usage of the fully normalized coefficients and spherical base functions, the potential is:
U ( R , ϑ , λ ) = n = 0 m = 0 n C B n m ¯ · C ¯ n m + S B n m ¯ · S ¯ n m .
The significance of Equation (8) is that the Earth’s gravitational potential can be expressed in this form. For practical reasons, in the case of gravity models of Earth (e.g., EGM96), the Schmidt normalized coefficients are published [7].

1.3. The Potential in Cartesian Coordinate Representation

To interpret the gravity potential outside of a finite inhomogeneous body, we can again start from Equation (1). In this case, the 1 / r function can be expressed as the inverse of the distance between body mass point ( x , y , z ) and the observation point ( X , Y , Z ). As the actual spatial distribution of the masses around the origin of the coordinate system is not known, a 3-dimensional Taylor series expansion can be applied to calculate the potential. The 1 / r function in Equation (1) can be expressed:
1 r = 1 R x X 1 R + y Y 1 R + z Z 1 R + 6 1 2 ( x 2 2 X 2 1 R + y 2 2 Y 2 1 R + z 2 2 Z 2 1 R + 2 x y 2 X Y 1 R + 2 x z 2 X Z 1 R + 2 y z 2 Y Z 1 R ) ± ,
where x, y and z are the Cartesian coordinates of the masses, X, Y and Z are the Cartesian coordinates of the observation point. To calculate the potential, the partial derivatives of the 1 / R function can be factored out, and the volume integral contains only the product of masses multiplied by the respective powers of their body coordinates, called multipole sources.
After this arrangement, the potential is the infinite sum of multipole sources of n t h degree multiplied by the appropriate basis functions, which are the n t h partial derivatives of the 1 R function.
If only one unit mass point is considered, whose coordinates are x, y and z, then the n t h degree of the series is:
U ( n ) = G ( 1 ) n i + j + k = n x i y j z k 1 n ! · n X i Y j Z k 1 R .
The potential at the observation point ( X , Y , Z ) can be expressed using the multipole coefficients M ( i , j , k ) as follows:
U ( X , Y , Z ) = G n = 0 ( 1 ) n i + j + k = n M ( i , j , k ) · 1 n ! · n X i Y j Z k 1 R ,
where the source coefficient (the n t h degree multipole moment) is defined as:
M ( i , j , k ) = M x i y j z k d m ,
where i + j + k = n , because multipole coefficients involve homogeneous polynomials of coordinates.

1.4. Objectives and Methodology

The primary objective of this study is to bridge the gap between the spherical and Cartesian representations of the potential field by developing a direct transformation method.
The methodology is founded upon two primary pillars: theoretical derivation and numerical algorithm development.
Firstly, the objective is to demonstrate analytically that normalised spherical basis functions can be constructed as a linear combination of Cartesian partial derivatives. This involves
  • Systematically categorizing the basis functions into four parity-based groups.
  • Establishing the exact summation formula that links the Cartesian derivatives to spherical harmonics.
  • Verifying this relationship through the comparison of constituent monomials.
Secondly, to make this theoretical connection computationally viable, we develop a “Direct Numerical Method” for calculating the required partial derivatives of 1 / R . The specific objectives of this study are as follows:
  • To define the set of valid exponent triplets ( i , j , k ) representing the powers of the Cartesian coordinates ( X , Y , Z ) within the constituent monomials of the partial derivatives, strictly governed by homogeneity and parity constraints.
  • To derive recursive relations for differentiation with respect to X and Y axes, and to establish a closed-form analytical formula for the coefficients of the pure Z-derivatives.
  • To implement a step-wise normalization strategy. Rather than applying normalization factors at the conclusion of the calculation—a process which results in numerical overflow due to factorial growth—the method integrates the recursive ratios of these factors (including Schmidt normalization) directly into the recurrence relations.
Finally, to validate the proposed framework, the methodology includes a detailed numerical walkthrough for a specific case ( n = 8 , m = 2 ), aiming to confirm the precision of the algorithm.

2. Methods

Converting the Spherical Representation of the Laplace Equation into Cartesian Coordinates

To be able to compare the spherical representation with the Cartesian representation, the obvious way is to transform spherical coordinates into Cartesian coordinates [8]. The transformation between the representations is based on the transformation formulas:
x = ρ sin ϑ cos λ , y = ρ sin ϑ sin λ , z = ρ cos ϑ .
In the inverse transformation, here we only need the formula for the radius:
ρ = x 2 + y 2 + z 2 .
Although Equation (9) describes the transformation for the internal mass coordinates ( ρ , ϑ , λ ), an identical geometric transformation applies to the external observation point coordinates ( R , ϑ , λ ) to derive the Cartesian components ( X , Y , Z ) used in the basis functions in the numerators of Equations (2) and (3).
The following operations are required to convert the spherical coefficients ( C n m and S n m ) and similarly the numerators of the basis functions ( C B n m and S B n m ) to the Cartesian coordinate system:
  • In the case where m is greater than 1, convert the trigonometric functions of multiple angles into single angles.
  • Solve ( 1 cos 2 ϑ ) k / 2 = sin k ϑ , then convert every ρ · sin ϑ · cos λ and ρ · cos ϑ · cos λ expressions into x and y coordinates.
  • After calculating all possible x and y coordinates, convert the remaining sin k ϑ into ( 1 cos 2 ϑ ) k / 2 .
  • Convert every ρ cos ϑ into z coordinates.
  • Finally, convert the remaining ρ s to x 2 + y 2 + z 2 .
As an example, the n = 2 degree spherical coefficients and their actual form in spherical and Cartesian representation are shown in Table 1.
The significant benefit of the spherical coordinate representation is the reduction in the number of coefficients. Specifically, a solution of degree n takes the form of 2 n + 1 terms in spherical coordinates, while the analogous solution in Cartesian coordinates involves 0.5 n 2 + 1.5 n + 1 terms. The disparity in the quantity of terms becomes more pronounced as an increment in n occurs (see Table 2).
Using Equation (9), both coefficients and basis function of the spherical representation can be transformed into Cartesian coordinates. Upon analyzing the terms of the “transformed into Cartesian” spherical representation and the Taylor series (“true”) Cartesian representation, significant similarities can be observed among the coefficients and the basis functions in both representations.
Specifically, the basis functions of the Taylor series generated for n = 2 degree are the second partial derivatives, and their relationships to the spherical basis functions C B 2 0 , C B 2 1 , S B 2 1 , and S B 2 2 are shown in Figure 1. It can be seen that these spherical basis functions are proportional to the partial derivatives of the 1 / R function. Additionally, comparing with Table 1, it can be noted that term C 22 can be calculated as the difference in the lower vertices of the triangle in Figure 1.

3. Results

3.1. New, Direct Transformation Method Between the Cartesian and the Spherical Coordinate Systems

Examining the higher-degree terms, notable similarities were identified when expressing the spherical and the Cartesian basis functions. Certain Cartesian basis functions exhibit a remarkable resemblance to the basis functions of the Cartesian-transformed spherical solution, as shown in Figure 1. For example, as noted in n = 2 :
2 Z 2 1 R = 2 C B 2 0 , 2 Y Z 1 R = S B 2 1 , 2 X Z 1 R = C B 2 1 , 2 X Y 1 R = S B 2 2 2 .
These similarities led to the examination of the relationship between the Cartesian form of the spherical basis functions (Table 1) and the partial derivatives of 1 / R into Cartesian coordinates.
During the development of a method to directly correlate these formulations, the basis functions of the spherical representation were systematically categorized into four distinct groups.
C B n m { 0 , 2 , , n } , C B n m { 1 , 3 , , n } , S B n m { 1 , 3 , , n } , S B n m { 2 , 4 , n } .
Consequently, the original two groups of basis functions ( C B n m and S B n m ) were categorized based on the parity of m. The four spherical basis function subcategories can be expressed as follows:
C B n e v e n , C B n o d d , S B n o d d , S B n e v e n .
Within these subcategories, the powers of Cartesian coordinates X, Y, and Z appear in similar combinations. The basis functions expressed in Cartesian terms are derived from the partial derivatives of the function 1 / R . The derivatives of the highest order with respect to the Z coordinate are proportional to the initial elements of each of the four categories of spherical basis functions.
C B n 0 n Z n 1 R , C B n 1 n X Z n 1 1 R , S B n 1 n Y Z n 1 1 R , S B n 2 n X Y Z n 2 1 R .
Analogously to the grouping of spherical basis functions, the basis functions of the Cartesian representation can also be organized into four groups. The initial members of these groups are the highest-order derivatives with respect to the Z coordinate, as shown above. The remaining members of each group are made up of partial derivatives of 1 / R , in which the differentiation order with respect to Z decreases by two in each subsequent term, while the total order of differentiation with respect to X and Y increases by two.
Thus, upon examining the basis functions of the Cartesian method, it is evident that for any degree n, the derivatives can be classified into the following four groups, each involving the same products of powers of the coordinates X, Y, and Z:
n X l Y m l Z n m 1 R , n X l + 1 Y m l Z n m 1 1 R , n X l Y m l + 1 Z n m 1 1 R , n X l + 1 Y m l + 1 Z n m 2 1 R ,
where m takes values from 0 to n in steps of 2 and l takes values from 0 to m in steps of 2.
Each group follows a distinct rule concerning the parity of the degree of partial derivatives with respect to coordinates. The parity of the partial derivative with respect to Z depends on n, while a rule independent of n applies to the parity of the partial derivatives with respect to X and Y for each group. Upon analysis of this observed rule, we can categorize the four groups as follows:
n X even Y even Z n m 1 R , n X odd Y even Z n m 1 1 R , n X even Y odd Z n m 1 1 R , n X odd Y odd Z n m 2 1 R ,
where m { 0 , 2 , , n } .
The groups are distinct and do not overlap, as they lack coordinate products with matching exponents. As a result, as illustrated in the final rows of Table 3 and Table 4, the four groups of Cartesian basis functions align exactly with the equivalent groups of spherical basis functions, each representing the same combinations of the powers of coordinates.

3.1.1. Mathematical Justification of the Parity Grouping

The structural correspondence between the spherical and Cartesian basis functions presented above is mathematically rigorous. The exponents of the constituent monomials X i Y j Z k in both representations are constrained by identical parity rules, which we demonstrate below.

3.1.2. Proof for the Spherical Representation

The spherical basis functions are derived from the product of Legendre polynomials and azimuthal terms. The parity of the exponents i (for X) and j (for Y) is governed by the binomial expansion of the harmonic term ( X + i Y ) m . Two fundamental rules apply to every term:
  • Azimuthal Parity Rule: The parity of the sum of horizontal exponents ( i + j ) is always identical to the parity of the order m.
  • Homogeneity Rule: Since the basis functions are homogeneous polynomials of degree n, the sum of all exponents must satisfy i + j + k = n .
Based on the harmonic type (cosine or sine) and the parity of m, the specific constraints are derived as follows:
  • Group C B n e v e n ¯ (m is even): The cosine type corresponds to the Real part of the expansion, which contains only even powers of Y (thus j is even). Since m is even, i must also be even to satisfy the Azimuthal Parity Rule. Result: i is even, j is even.
  • Group C B n o d d ¯ (m is odd): As a cosine term, j remains even. However, since m is odd, i must be odd. Result: i is odd, j is even.
  • Group S B n o d d ¯ (m is odd): The sine type corresponds to the Imaginary part, which contains only odd powers of Y (thus j is odd). Since m is odd, i must be even. Result: i is even, j is odd.
  • Group S B n e v e n ¯ (m is even): As a sine term, j is odd. Since m is even, i must be odd. Result: i is odd, j is odd.

3.1.3. Proof for the Cartesian Representation

In the Taylor series expansion, the basis functions are partial derivatives of the reciprocal distance 1 / R . Since 1 / R is an even function with respect to all coordinates X , Y , Z , the parity of the resulting derivative is strictly determined by the differentiation. Differentiating with respect to a specific coordinate produces a term where the exponent of that coordinate shares the same parity as the differentiation order.
Applying this rule to the four proposed Cartesian groups yields an exact match with the spherical results above:
  • Differentiation X e v e n Y e v e n yields terms with X e v e n Y e v e n .
  • Differentiation X o d d Y e v e n yields terms with X o d d Y e v e n .
  • Differentiation X e v e n Y o d d yields terms with X e v e n Y o d d .
  • Differentiation X o d d Y o d d yields terms with X o d d Y o d d .
The parity of the Z exponent (k) is automatically satisfied by the homogeneity condition i + j + k = n in both systems. Thus, it is mathematically proven that the four groups of spherical harmonics and the four groups of Cartesian derivatives cover identical subsets of monomial terms.
Spherical basis functions are derived by summing terms within each group that includes the same number of partial derivatives with respect to Z. The equation that establishes a direct relationship between Cartesian derivatives and Schmidt normalized spherical basis functions is:
C B n m ¯ = ( 1 ) m · k n m · m ! · l { 0 , 2 , , m } ( 1 ) n 1 n ! 1 l + 2 2 + 1 n m m l n X l Y m l Z n m 1 R , S B n m ¯ = ( 1 ) m · k n m · m ! · l { 1 , 3 , , m } ( 1 ) n 1 n ! 1 l + 1 2 + 1 n m m l n X l Y m l Z n m 1 R ,
where k n m refers to the Schmidt normalization factor, n m m l represents the variations of a given derivative configuration, since differentiations can be performed in all possible orders. If all variations are taken into account, the number of basis functions in the Cartesian solution is 3 n . If equivalent basis functions are summed, the total number reduces to 0.5 n + 1.5 n + 1 . After conversion to the spherical method—as already indicated in the Table 2—this reduces further to 2 · ( n + 1 ) .
Figure 2 shows the third-order basis functions (partial derivatives) of the Cartesian representation.
  • At the top vertex of the triangle lies the partial derivative: 3 Z 3 1 R .
  • At the bottom left corner: 3 Y 3 1 R .
  • At the bottom right corner: 3 X 3 1 R .
  • Moving away from the vertices of the triangle, the order of the partial derivatives with respect to the respective coordinates decreases.
  • The upper rhombus within the triangle, highlighted by the bold black line in Figure 2, represents the starting elements of the four groups of spherical basis functions.
  • The remaining components are derived by calculating the differences between terms that lie on the same horizontal axis, meaning they have an equal number of partial derivatives with respect to Z and are separated by two nodes of the triangular grid.

3.2. A Direct Numerical Method for Calculating the Partial Derivatives of 1 / R Function

A method has been developed for the direct computation of the n-th degree partial derivatives of 1 / R , which are utilized in the Cartesian representation of the normalized spherical base functions, given by Equation (10).
The n-th degree partial derivative of the 1 / R function consists of A l , m l , n m (a homogeneous polynomial of X, Y, and Z coordinates) divided by R 2 n + 1 :
n X l Y m l Z n m 1 R = A l , m l , n m R 2 n + 1 ,
where A l , m l , n m is an n-th degree numerator polynomial (see, for example, the ‘Results’ column of Table 5).
The numerator polynomial consists of polynomial terms of Cartesian coordinates multiplied by their respective coefficients:
A l , m l , n m = ( i , j , k ) T ( l , m l , n m ) C i , j , k l , m l , n m X i Y j Z k ,
where T ( l , m l , n m ) denotes the set of valid exponent triplets. The algorithm is designed to numerically determine, for each polynomial term, both the exponent triplet ( i , j , k ) of the Cartesian monomials X i Y j Z k and their corresponding coefficients C i , j , k l , m l , n m .
In this notation, the superscripts ( ) l , m l , n m explicitly indicate the order of partial differentiation with respect to each coordinate axis: l corresponds to the number of differentiations with respect to X, m l to the number of differentiations with respect to Y, and n m to the number of differentiations with respect to Z.

3.2.1. Exponent Triplet Generation

The set T ( l , m l , n m ) (from Equation (12)) of all valid exponent triplets ( i , j , k ) is strictly determined by two fundamental mathematical constraints: homogeneity and parity constraints.
1. Constraint: Homogeneity
The function, f ( R ) = 1 R , is a homogeneous function of degree 1 . The partial differential operators X , Y , and Z are, themselves, homogeneous operators of degree 1 .
It follows that the n-th order partial derivative is a homogeneous function of degree ( 1 + n ) . Given that the denominator of the expression, R 2 n + 1 , is a homogeneous function of degree 2 n + 1 , the numerator polynomial A l , m l , n m must necessarily be a homogeneous polynomial of degree n, such that the total degree of the fraction is ( n ) ( 2 n + 1 ) = ( n + 1 ) .
The condition of homogeneity implies that for every term in the polynomial A l , m l , n m , the sum of the exponents must be exactly n. Therefore, for every element ( i , j , k ) T ( l , m l , n m ) of the set of exponents, the following must hold:
i + j + k = n ,
where
n = ( n m ) + ( m l ) + l .
2. Constraint: Parity
The function 1 R = ( X 2 + Y 2 + Z 2 ) 1 / 2 is an even function with respect to all three coordinates ( X , Y , Z ), as f ( X ) = f ( X ) , f ( Y ) = f ( Y ) , and f ( Z ) = f ( Z ) .
The operation of partial differentiation alters the parity of a function:
  • The derivative of an even function is an odd function.
  • The derivative of an odd function is an even function.
Consider the operator l X l . When applied to the 1 R function:
  • If l is even, the parity of the resulting function with respect to X remains even.
  • If l is odd, the parity of the resulting function with respect to X becomes odd.
In general, the parity of the complete function n X l Y m l Z n m 1 R with respect to X must be the same as the parity of l; its parity with respect to Y must be the same as m l ; and its parity with respect to Z must be the same as n m .
As the denominator, R 2 n + 1 = ( X 2 + Y 2 + Z 2 ) ( 2 n + 1 ) / 2 is also an even function with respect to all three variables; this parity constraint is inherited directly by the numerator polynomial, A l , m l , n m .
The parity of a polynomial with respect to X is determined by the parity of its constituent X i exponents. For A l , m l , n m to satisfy the parity of l, every X i term must have an exponent i that has the same parity as l. The same holds true for Y and Z. This second set of constraints can be described by the following:
  • l and i always have the same parity: if l is even, then i is also even; if l is odd, then i is also odd.
  • ( m l ) and j always have the same parity: if ( m l ) is even, then j is also even; if ( m l ) is odd, then j is also odd.
  • ( n m ) and k always have the same parity: if ( n m ) is even, then k is also even; if ( n m ) is odd, then k is also odd.
Number of terms
For a given degree n, order m, and index l, the number of terms satisfying the homogeneity and parity constraints is denoted by | T ( l , m l , n m ) | . Based on the combinatorial constraints on the exponents i and j, three distinct cases arise:
| T ( l , m l , n m ) | = n 2 + 1 n 2 + 2 2 , if m is even and l is even , n 2 n 2 + 1 2 , if m is even and l is odd , n 1 2 + 1 n 1 2 + 2 2 , if m is odd ,
where denotes the floor operation (rounding down).

3.2.2. Derivation of the Numerator Polynomial Coefficients

The coefficients of the A l , m l , n m numerator polynomial are generated using a recursive scheme. Each differentiation step ( n n + 1 ) represents a recursive relation that computes the new coefficients from the previous set.
Definition of the Recursive Realtions
Let C i , j , k l , m l , n m denote the coefficient of the monomial X i Y j Z k within the n-th degree numerator polynomial, A n . The coefficients ( C i , j , k l + 1 , m l , n m or C i , j , k l + 1 , m l + 1 , n m or C i , j , k l + 1 , m l , n m + 1 ) for the ( n + 1 ) -th order polynomial, A n + 1 , are given by the following rules, depending on the variable of differentiation. The proof is presented in Appendix B.
Recursive computation of the coefficients under partial differentiation with respect to X:
C i , j , k l + 1 , m l , n m = ( i + 1 ) · C i + 1 , j 2 , k l , m l , n m + ( i + 1 ) · C i + 1 , j , k 2 l , m l , n m + i 2 ( n + 1 ) · C i 1 , j , k l , m l , n m .
Recursive computation of the coefficients under partial differentiation with respect to Y:
C i , j , k l , m l + 1 , n m = ( j + 1 ) · C i 2 , j + 1 , k l , m l , n m + ( j + 1 ) · C i , j + 1 , k 2 l , m l , n m + j 2 ( n + 1 ) · C i , j 1 , k l , m l , n m .
Recursive computation of the coefficients under partial differentiation with respect to Z:
C i , j , k l , m l , n m + 1 = ( k + 1 ) · C i 2 , j , k + 1 l , m l , n m + ( k + 1 ) · C i , j 2 , k + 1 l , m l , n m + k 2 ( n + 1 ) · C i , j , k 1 l , m l , n m .
The recursion is anchored by the 0-th-order derivative, f = 1 / R , for which the numerator polynomial is A 0 = 1 . This provides the initial condition C 0 , 0 , 0 ( 0 , 0 , 0 ) = 1 , with all other coefficients being zero. Any term in the recurrence relations Equations (14)–(16) that references a coefficient with a negative exponent (e.g., i 2 < 0 ) is defined as zero.

3.2.3. Analytical Solution for the Z-Derivative

Coefficient of the “principal” Z n term of the Z-Derivative We examine the coefficient of the “principal” term, which is the term containing only the highest power of Z, Z ( n m ) + 1 , denoted C 0 , 0 , ( n m ) + 1 0 , 0 , ( n m ) + 1 . Setting i = 0 , j = 0 , and k = ( n m ) + 1 in the Z-Derivative Equation (16):
C 0 , 0 , ( n m ) + 1 0 , 0 , ( n m ) + 1 = ( ( n m ) + 2 ) C 2 , 0 , ( n m ) + 2 0 , 0 , ( n m ) + ( ( n m ) + 2 ) C 0 , 2 , ( n m ) + 2 0 , 0 , ( n m ) + ( n m ) + 1 ) 2 ( ( n m ) + 1 ) C 0 , 0 , n m 0 , 0 , ( n m ) .
The first two terms are zero, as they reference coefficients with negative (invalid) exponents. The third term, the only one to survive, simplifies as follows:
( ( n m ) + 1 ) 2 ( n m ) 2 = ( ( n m ) 1 ) = ( ( n m ) + 1 ) .
This yields a simple recurrence for the principal coefficient, C 0 , 0 , ( n m ) + 1 0 , 0 , ( n m ) + 1 :
C 0 , 0 , ( n m ) + 1 0 , 0 , ( n m ) + 1 = ( ( n m ) + 1 ) · C 0 , 0 , ( n m ) 0 , 0 , ( n m ) .
The given recurrence relation can be transformed into a closed-form expression. Starting from the initial condition C 0 , 0 , 1 0 , 0 , 1 = 1 , the recurrence
C 0 , 0 , ( n m ) 0 , 0 , ( n m ) = ( n m ) · C 0 , 0 , ( n m ) 1 0 , 0 , ( n m ) 1 ,
simplifies to
C 0 , 0 , ( n m ) 0 , 0 , ( n m ) = ( 1 ) ( n m ) 1 · ( n m ) ! · ( 1 ) ,
which leads to
C 0 , 0 , ( n m ) 0 , 0 , ( n m ) = ( 1 ) ( n m ) ( n m ) ! .
This demonstrates that the coefficient for the Z ( n m ) term, represented as C 0 , 0 , ( n m ) 0 , 0 , ( n m ) , is
C 0 , 0 , ( n m ) 0 , 0 , ( n m ) = ( 1 ) ( n m ) ( n m ) ! .
Coefficient of the other terms of the Z-Derivative This analysis can be extended to the other terms of the Z-derivative, which have the form
X 2 r Y 2 ( q r ) Z ( n m ) 2 q ,
where q { 0 , , ( n m ) / 2 } and r { 0 , , r }
A similar, albeit more complex, recurrence relates the coefficient of these terms. Unwinding this q-based recurrence, applying the binomial theorem to the ( X 2 + Y 2 ) q term and substituting C 0 , 0 , ( n m ) 0 , 0 , ( n m ) yields the general product formula
C 2 r , 2 ( q r ) , ( n m ) 2 q 0 , 0 , ( n m ) = C 0 , 0 , ( n m ) 0 , 0 , ( n m ) · s = 1 q 1 ( 2 s ) 2 ( ( n m ) 2 s + 2 ) ( ( n m ) 2 s + 1 ) · q r ,
C 2 r , 2 ( q r ) , ( n m ) 2 q 0 , 0 , ( n m ) = ( 1 ) ( n m ) ( n m ) ! · s = 1 q 1 ( 2 s ) 2 ( ( n m ) 2 s + 2 ) ( ( n m ) 2 s + 1 ) · q r .
For Z-Derivatives: Analytical Simplification
The partial differentiation process is always initiated with respect to the Z coordinate. Consequently, in the base case where m = 0 (implying purely zonal harmonics), the binomial weights n m and m l in Equation (10) all reduce to unity. The remaining normalization terms are the 1 n ! and the Schmidt correction factor k n m , which is ( 2 · ( n m ) + 1 ) in this case. Since for m = 0 , n ! is identical to ( n m ) ! , this term can be directly factored out from the raw coefficient in Equation (17), allowing for the exact analytical cancellation described above.The algorithm performs this analytical cancellation before any numerical computation. The resulting simplified formula, which is now free of the ( n m ) ! growth, is then computed. The final and simplified coefficient for a specific monomial X 2 r Y 2 ( q r ) Z ( n m ) 2 q is:
C 0 , 0 , ( n m ) 2 r , 2 ( q r ) , ( n m ) 2 q ¯ = ( 2 · ( n m ) + 1 ) · ( 1 ) ( n m ) · s = 1 q 1 ( 2 s ) 2 ( ( n m ) 2 s + 2 ) ( ( n m ) 2 s + 1 ) · q r .
For X/Y-Derivatives: Step-Wise Normalization
For the recursive branches, the normalization factors ( 1 n ! , n m , m l , and ( 1 ) m k n m m ! ) from Equation (10) are not applied at the end, but are applied at each step of the recursion. The factorial growth generated by the recurrence relations (Equations (14) and (15)) is immediately cancelled by applying a corresponding normalization factor ( F norm ). This ensures all computed coefficients remain bounded and immune to overflow. The normalization factors are decomposed into their recursive ratios ( F n / F n 1 ) and are integrated directly into each step.
During the n n + 1 step, the coefficient C l + 1 , m l , n m ¯ or C l , m l + 1 , n m ¯ is computed from the preceding coefficients multiplied by a recursive normalization factor ( F norm ).
A critical detail in Schmidt semi-normalization is the discontinuity between m = 0 and m > 0 . The normalization factor includes a 2 multiplier for all orders m > 0 , which is absent for m = 0 . Consequently, the recursive ratio must account for this transition when m = 1 .
The corrected recursive normalization factor is composed of three components. To achieve full normalization, the correction term ( F 3 ) is adjusted to account for the 2 n + 1 scaling factor inherent in the transition from degree n 1 to n:
F norm ( n , m , l ) = 1 n F 1 : n ! term · n m l or l F 2 : Binomial term · m · 2 δ m , 1 ( n + m ) ( n + m 1 ) 2 n + 1 2 n 1 F 3 : k n m Schmidt Norm . ,
where n is the new total degree, m is the new total X/Y order, l is the X order, and δ m , 1 is the Kronecker delta (which equals 1 if m = 1 , introducing the necessary 2 factor, and 0 otherwise).
The factor F norm encapsulates the transition from iteration n 1 to n, derived directly from the coefficients in Equation (10). It is formulated as a product of three distinct components to maintain numerical precision:
  • Factorial scaling ( F 1 1 / n ): Originates from the Taylor series expansion ( 1 / n ! ) found in Equation (10), counteracting the factorial growth of higher-order derivatives.
  • Combinatorial weight ( F 2 ): Accounts for the binomial distribution of partial derivatives along the Cartesian axes.
  • Normalization ( F 3 ): The Schmidt normalization factor ( k n m ) standardizes the magnitude of the harmonics, ensuring consistent physical scaling, and gives the name F norm to the combined coefficient.
Numerical Note: If the factorial and normalization terms were applied globally after computing the raw high-order derivatives of 1 / R , the calculation would fail due to arithmetic underflow (vanishing derivatives) and overflow (huge factorials). By applying these factors incrementally within each recursive step via F norm , the intrinsic decay of the derivatives is continuously balanced by the factorial term ( F 1 ), while the Schmidt component ( F 3 ) enforces the physical normalization, keeping the intermediate coefficients within a stable numerical range (∼1.0).
F norm , X (Differentiation with respect to X)
Substituting into the general form and merging the square roots for simplicity:
F norm , X = m · 2 δ m , 1 l 2 n + 1 ( 2 n 1 ) ( n + m ) ( n + m 1 ) .
F norm , Y (Differentiation with respect to Y)
Similarly for the Y-derivative (where the binomial term results in a factor of 1 / ( m l ) ):
F norm , Y = m · 2 δ m , 1 m l 2 n + 1 ( 2 n 1 ) ( n + m ) ( n + m 1 ) .
By incorporating these recursive factors, the complete, numerically stable form of the recurrence relations is as follows:
The Normalized Recurrence Relations
  • Normalized recursive computation of the coefficients under partial differentiation with respect to X
    C i , j , k l + 1 , m l , n m ¯ = F norm , X · [ ( i + 1 ) · C i + 1 , j 2 , k l , m l , n m + ( i + 1 ) · C i + 1 , j , k 2 l , m l , n m + i 2 ( n + 1 ) · C i 1 , j , k l , m l , n m ] .
  • Normalized recursive computation of the coefficients under partial differentiation with respect to Y
    C i , j , k l , m l + 1 , n m ¯ = F norm , Y · [ ( j + 1 ) · C i 2 , j + 1 , k l , m l , n m + ( j + 1 ) · C i , j + 1 , k 2 l , m l , n m + j 2 ( n + 1 ) · C i , j 1 , k l , m l , n m ] .
This normalization method ensures numerical stability by avoiding the ill-conditioned multiplication of terms with an extreme dynamic range. It transforms the operation from a post-process multiplication (involving factorially large terms and infinitesimally small factors) into a sequential process where all intermediate values are kept near unity. This approach not only prevents numerical overflow but also inherently minimizes the propagation of compounding round-off errors.

3.3. Numerical Validation: A Step-by-Step Walkthrough ( n = 8 , m = 2 )

To demonstrate the practical application and numerical stability of the Direct Cartesian Method, we present a step-by-step derivation for the degree n = 8 and order m = 2 case. The objective is to compute the normalized spherical basis functions C B 8 2 ¯ and S B 8 2 ¯ directly from Cartesian coordinates.
According to the summation formula derived in Equation (10), the target basis functions are constructed as a linear combination of the following Cartesian partial derivatives of order n:
For the computation of the cosine-term basis function ( C B 8 2 ¯ ), the summation requires derivatives where the order of X-differentiation (l) is even. Thus, we require
  • The derivative of 1 / R differentiated six times with respect to Z and two times with respect to X ( l = 2 ).
  • The derivative of 1 / R differentiated six times with respect to Z and two times with respect to Y ( l = 0 ).
C B 8 2 ¯ = 17 70 210 · 28 8 ! 8 X 2 Z 6 1 R 8 Y 2 Z 6 1 R .
For the computation of the sine-term basis function ( S B 8 2 ¯ ), the summation requires derivatives where l is odd. Thus, we require
  • The derivative of 1 / R differentiated six times with respect to Z, one time with respect to X, and one time with respect to Y ( l = 1 ).
S B 8 2 ¯ = 17 70 210 · 56 8 ! 8 X Y Z 6 1 R .
Every required derivative involves differentiating six times with respect to Z; therefore, the polynomial A 0 , 0 , 6 serves as the common base for all subsequent calculations.

3.3.1. Calculation of the Normalized Base Z-Derivative ( l = 0 , m l = 0 , n m = 6 )

The Z-derivative numerator polynomial is expressed using Equation (12)
A 0 , 0 , 6 ¯ = ( i , j , k ) T ( 0 , 0 , 6 ) C i , j , k ¯ 0 , 0 , 6 X i Y j Z k .
We determine the constituent terms (exponent triplets i , j , k ) based on parity and homogeneity constraints. Since we differentiate six times with respect to Z, the sum of exponents is i + j + k = 6 , and all exponents must be even. The resulting index vectors are [ 6 , 0 , 0 ] , [ 4 , 2 , 0 ] , [ 4 , 0 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 0 , 4 ] , [ 2 , 4 , 0 ] , [ 0 , 0 , 6 ] , [ 0 , 6 , 0 ] , [ 0 , 2 , 4 ] , and [ 0 , 4 , 2 ] . This results in exactly 10 terms, which corresponds to Equation (13), i.e., the term-counting formula:
| T ( 0 , 0 , 6 ) | = 6 2 + 1 6 2 + 2 2 = 10 .
The coefficients of the X 2 r Y 2 ( q r ) Z 6 2 q monomial are calculated using the Normalized Formula for Z-Differentiation Equation (18).
C 0 , 0 , 6 2 r , 2 ( q r ) , 6 2 q ¯ = ( 1 ) 6 13 · s = 1 q 1 ( 2 s ) 2 ( 8 2 s ) ( 7 2 s ) · q r ,
where q ranges from 0 to 3, and r ranges from 0 to q.
Although the true sixth-order Z-derivative of 1 / R would require multiplication by n ! , our algorithm computes only the normalized values to maintain stability.
The resulting polynomial terms (using dimensionless coordinates for numerical stability) are derived from the values presented in Table 6 as follows:
A 0 , 0 , 6 ¯ = 13 · Z 6 13 15 2 Y 2 Z 4 13 15 2 X 2 Z 4 + 13 45 8 Y 4 Z 2 + 13 45 4 X 2 Y 2 Z 2 + 13 45 8 X 4 Z 2 13 5 16 Y 6 13 15 16 X 2 Y 4 13 15 16 X 4 Y 2 13 5 16 X 6 .

3.3.2. Computation of the X-Derivative Branch

To obtain one of the term required for C B 8 2 ¯ , we differentiate the Z-derivative result two times with respect to X.
  • Step 1: First X-derivative ( l = 1 , m l = 0 , n m = 6 )
The numerator polynomial is expressed using Equation (12)
A 1 , 0 , 6 ¯ = ( i , j , k ) T ( 1 , 0 , 6 ) C i , j , k 1 , 0 , 6 ¯ X i Y j Z k .
We determine the constituent terms (exponent triplets i , j , k ) based on parity and homogeneity constraints. Since we differentiate six times with respect to Z and one time with respect to X, the sum of exponents is i + j + k = 7 , where j and k are even, and i is odd. The resulting index vectors are [ 7 , 0 , 0 ] , [ 5 , 2 , 0 ] , [ 5 , 0 , 2 ] , [ 3 , 4 , 0 ] , [ 3 , 2 , 2 ] , [ 3 , 0 , 4 ] , [ 1 , 6 , 0 ] , [ 1 , 4 , 2 ] , [ 1 , 2 , 4 ] , and [ 1 , 0 , 6 ] . This results in exactly 10 terms, which corresponds to Equation (13), i.e., the term-counting formula:
| T ( 1 , 0 , 6 ) | = 7 1 2 + 1 7 1 2 + 2 2 = 10 .
To obtain the coefficients of the terms, we utilize the normalized recursive computation of the coefficients under partial differentiation with respect to X Equation (19):
C i , j , k 1 , 0 , 6 ¯ = 15 2 91 · ( i + 1 ) · C i + 1 , j 2 , k 0 , 0 , 6 ¯ + ( i + 1 ) · C i + 1 , j , k 2 0 , 0 , 6 ¯ + i 14 · C i 1 , j , k 0 , 0 , 6 ¯ .
Since normalization is integrated into every step, the computed normalized values are:
A 1 , 0 , 6 ¯ = 5 105 32 X 7 + 15 105 32 X 5 Y 2 15 105 4 X 5 Z 2 + 15 105 32 X 3 Y 4 15 105 2 X 3 Y 2 Z 2 + 15 105 2 X 3 Z 4 + 5 105 32 X Y 6 15 105 4 X Y 4 Z 2 + 15 105 2 X Y 2 Z 4 2 105 X Z 6 .
  • Step 2: Second X-derivative ( n = 8 )
Using the Normalized Recurrence for X-Differentiation, we differentiate again with respect to X, using the same method we just described. The resulting polynomial terms (using dimensionless coordinates for numerical stability) are
A 2 , 0 , 6 ¯ = 17 70 24 X 8 23 17 70 192 X 6 Y 2 + 247 17 70 192 X 6 Z 2 7 17 70 64 X 4 Y 4 + 157 17 70 64 X 4 Y 2 Z 2 29 17 70 8 X 4 Z 4 5 17 70 192 X 2 Y 6 + 67 17 70 64 X 2 Y 4 Z 2 7 17 70 2 X 2 Y 2 Z 4 + 101 17 70 60 X 2 Z 6 + 17 70 192 Y 8 23 17 70 192 Y 6 Z 2 + 17 70 8 Y 4 Z 4 + 11 17 70 60 Y 2 Z 6 17 70 15 Z 8 .

3.3.3. Computation of the Y-Derivative Branch

Next, we compute the derivatives required for the Y-component. We return to the Z-derivative ( n = 6 ) and differentiate recursively with respect to Y utilizing the normalized recursive computation of the coefficients under partial differentiation with respect to Y Equation (20).
  • Step 1: First Y-derivative ( l = 0 , m l = 1 , n m = 6 )
The numerator polynomial is expressed using Equation (12):
A 0 , 1 , 6 ¯ = ( i , j , k ) T ( 0 , 1 , 6 ) C i , j , k 0 , 1 , 6 ¯ X i Y j Z k .
We determine the constituent terms (exponent triplets i , j , k ) based on parity and homogeneity constraints. Since we differentiate six times with respect to Z and one time with respect to Y, the sum of exponents is i + j + k = 7 , where i and k are even, and j is odd. The resulting index triplets are
[ 0 , 7 , 0 ] , [ 2 , 5 , 0 ] , [ 0 , 5 , 2 ] , [ 4 , 3 , 0 ] , [ 2 , 3 , 2 ] , [ 0 , 3 , 4 ] , [ 6 , 1 , 0 ] , [ 4 , 1 , 2 ] , [ 2 , 1 , 4 ] , [ 0 , 1 , 6 ] .
This results in exactly 10 terms, which corresponds to Equation (13), i.e., the term-counting formula:
| T ( 0 , 1 , 6 ) | = 7 1 2 + 1 7 1 2 + 2 2 = 10 .
To obtain the coefficients of the terms, we utilize the normalized recursive computation of the coefficients under partial differentiation with respect to Y Equation (20):
C i , j , k 0 , 1 , 6 ¯ = 15 2 91 · ( j + 1 ) · C i 2 , j + 1 , k 0 , 0 , 6 ¯ + ( j + 1 ) · C i , j + 1 , k 2 0 , 0 , 6 ¯ + j 14 · C i , j 1 , k 0 , 0 , 6 ¯ .
Since normalization is integrated into every step, the computed normalized values are:
A 0 , 1 , 6 ¯ = 5 105 32 Y 7 + 15 105 32 X 2 Y 5 15 105 4 Y 5 Z 2 + 15 105 32 X 4 Y 3 15 105 2 X 2 Y 3 Z 2 + 15 105 2 Y 3 Z 4 + 5 105 32 X 6 Y 15 105 4 X 4 Y Z 2 + 15 105 2 X 2 Y Z 4 2 105 Y Z 6 .
  • Step 2: Second Y-derivative ( n = 8 )
Using the Normalized Recurrence for Y-Differentiation, we differentiate again with respect to Y, using the same method we just described. The resulting polynomial terms (using dimensionless coordinates for numerical stability) are
A 0 , 2 , 6 ¯ = 17 70 24 Y 8 23 17 70 192 X 2 Y 6 + 247 17 70 192 Y 6 Z 2 7 17 70 64 X 4 Y 4 + 157 17 70 64 X 2 Y 4 Z 2 29 17 70 8 Y 4 Z 4 5 17 70 192 X 6 Y 2 + 67 17 70 64 X 4 Y 2 Z 2 7 17 70 2 X 2 Y 2 Z 4 + 101 17 70 60 Y 2 Z 6 + 17 70 192 X 8 23 17 70 192 X 6 Z 2 + 17 70 8 X 4 Z 4 + 11 17 70 60 X 2 Z 6 17 70 15 Z 8 .

3.3.4. Synthesis of the Basis Function and Symmetry Analysis

Following the computation of the individual recursive branches, we construct the final normalized spherical basis function C B 8 , 2 ¯ according to Equation (10). This requires the subtraction of the normalized polynomial terms obtained from the Y-derivative branch ( A 0 , 2 , 6 ¯ ) from those of the X-derivative branch ( A 2 , 0 , 6 ¯ ):
C B 8 , 2 ¯ = A 2 , 0 , 6 ¯ A 0 , 2 , 6 ¯ R 17 .
This result matches the value calculated from spherical coordinates as P 8 , 2 ( cos ϑ ) cos ( 2 λ ) . Dividing these final results by R 2 n + 1 yields the explicit Cartesian potential component for degree n = 8 and order m = 2 .
R 8 P 8 2 · c o s ( 2 λ ) · k n m R 17 = C B 8 , 2 ¯ = ( 3 17 70 64 X 8 3 17 70 32 X 6 Y 2 + 45 17 70 32 X 6 Z 2 + 45 17 70 32 X 4 Y 2 Z 2 15 17 70 4 X 4 Z 4 + 3 17 70 32 X 2 Y 6 45 17 70 32 X 2 Y 4 Z 2 + 3 17 70 2 X 2 Z 6 + 3 17 70 64 Y 8 45 17 70 32 Y 6 Z 2 + 15 17 70 4 Y 4 Z 4 3 17 70 2 Y 2 Z 6 ) / R 17 .
It is important to observe the inherent symmetry in the computation of A 2 , 0 , 6 ¯ and A 0 , 2 , 6 ¯ . The recursive operations for the X branch and Y branch are mathematically identical under the permutation of X and Y coordinates. This symmetry is visually evident when comparing Table 7 (X-derivation) and Table 8 (Y-derivation). The structure of the calculation remains invariant; only the first column (the monomials X i Y j Z k ) and the last column (the results) differ, reflecting the interchange of exponents i and j.
Consequently, the resulting derivatives themselves exhibit symmetry. When calculating the difference A 2 , 0 , 6 ¯ A 0 , 2 , 6 ¯ , this symmetry leads to the cancellation of specific terms. The final polynomial in Equation (21) consists of 12 terms, which is 3 fewer than the constituent polynomials (15 terms each).
The terms that vanish are those where the coefficients in both branches are identical due to X-Y symmetry. This occurs for monomials where the exponents of X and Y are equal ( i = j ). In the n = 8 , m = 2 case, these nullified terms are
  • Z 8 (where i = j = 0 );
  • X 2 Y 2 Z 4 (where i = j = 2 );
  • X 4 Y 4 (where i = j = 4 ).
This algebraic cancellation is exact and structurally guaranteed by the method, further simplifying the final expression of the sectorial basis functions.
Computation of S B 8 , 2 ¯ : The calculation of S B 8 , 2 ¯ requires the derivative differentiated six times with respect to Z, one time with respect to X, and one time with respect to Y. We utilize the intermediate result A 0 , 1 , 6 ¯ (calculated in the Y-branch step) and differentiate it recursively with respect to X using the normalized recursive computation of the coefficients under partial differentiation with respect to X Equation (19). This result matches the value calculated from spherical coordinates as P 8 , 2 ( cos ϑ ) sin ( 2 λ ) . Dividing these final results by R 2 n + 1 yields the explicit Cartesian potential component for degree n = 8 and order m = 2 .
The result is
R 8 P 8 2 · s i n ( 2 λ ) · k n m R 17 = S B 8 , 2 ¯ = ( 3 17 70 32 X 7 Y 9 17 70 32 X 5 Y 3 + 45 17 70 16 X 5 Y Z 2 9 17 70 32 X 3 Y 5 + 45 17 70 8 X 3 Y 3 Z 2 15 17 70 2 X 3 Y Z 4 3 17 70 32 X Y 7 + 45 17 70 16 X Y 5 Z 2 15 17 70 2 X Y 3 Z 4 + 3 17 70 X Y Z 6 ) / R 17 .

3.4. Numerical Stability and Operating Range

While the primary focus of this derivation is analytical, assessing the numerical behavior of the resulting formulas is essential for practical implementation. To evaluate the operational limits, the proposed method was tested against a standard double-precision reference implementation (MATLAB R2022b built-in functions based on standard recurrences [9]).
The numerical experiments confirm that the Direct Cartesian Method maintains high precision up to degree n 130 . It is acknowledged that specialized numerical “evaluators,” such as the approaches by Holmes and Featherstone [10] or Fukushima [11], can achieve significantly higher degrees (up to 2 32 degrees) using techniques like exponent extension. However, these methods typically operate as purely numerical evaluators, obscuring the underlying algebraic structure. In contrast, our method retains the analytical structure of the derivatives.
Beyond the n 130 threshold, precision naturally degrades in our direct double-precision implementation due to the finite representation of floating-point numbers: catastrophic cancellation affects the zonal terms ( m = 0 , near n 170 ) and compounding rounding errors appear in the recursive summation of sectoral terms ( n = m , starting from n 115 ). Consequently, the method is verified as numerically robust for degrees n 100 , which is adequate for the intended analytical applications.

4. Conclusions

This study examined the similarity between the basis functions employed in the Cartesian coordinate system’s solution to the potential, which are derivable from the partial derivatives of 1 / R , and those used in the spherical coordinate system’s solution. The latter were computed using the Rodrigues formula and subsequently converted to Cartesian coordinates, outlined in Section 1.2 and the Section Converting the Spherical Representation of the Laplace Equation into Cartesian Coordinates.
My analysis, illustrated in Table 3 and Table 4, demonstrated that these basis functions can be categorized into four distinct groups. Within these groups, Cartesian basis functions differentiated an identical number of times with respect to the Z coordinate, and possessing matching parities in their orders of differentiation with respect to X and Y independently, are summed, after multiplication by appropriate coefficients as specified in Equation (10), to derive the normalized spherical basis function corresponding to specific values of n and m. Figure 2 offers an illustrative explanation of this method, and the validity of the approach is further corroborated by Table 5, which presents the results of substituting into Equation (10) for the n = 3 case.
To facilitate the practical application of this theoretical connection, a Direct Numerical Method was developed for calculating the partial derivatives of the 1 / R function. As defined in Equation (11), the derivative is decomposed into a denominator R 2 n + 1 and a homogeneous numerator polynomial A l , m l , n m . This numerator is further resolved into constituent monomials X i Y j Z k multiplied by their respective coefficients C i , j , k l , m l , n m Equation (12). We established that the valid exponent triplets ( i , j , k ) —representing the powers of the Cartesian coordinates within the derivative terms—are strictly determined by homogeneity ( i + j + k = n ) and parity constraints. The values of these coefficients are generated algorithmically: the initial Z-derivatives are determined using a closed-form analytical formula Equation (18), while the coefficients for the X and Y branches are computed via the derived recurrence relations Equations (19) and (20).
Crucially, to address numerical stability, we introduced a step-wise normalization scheme. By incorporating the recursive ratios of the normalization factors directly into the recurrence formulas, the algorithm is designed to mitigate factorial growth. This ensures that intermediate coefficients remain within a manageable numerical range. Comprehensive numerical testing at higher degrees is planned for future research.
The effectiveness of the proposed method is demonstrated for a representative case in Section 3.3. We presented a step-by-step derivation of the normalized spherical basis functions for degree n = 8 and order m = 2 ( C B 8 , 2 ¯ and S B 8 , 2 ¯ ). This walkthrough confirmed that the method correctly reproduces the target functions through the weighted summation of the recursively generated, normalized Cartesian derivatives.
Furthermore, the derived Direct Cartesian formulation offers distinct advantages for specific applications, particularly in satellite geodesy and orbit determination where precise higher-order partial derivatives are required for force modeling. This necessitates the computation of the full gravitational gradient tensor, a problem also heavily researched in the context of recursive algorithms, such as those discussed by Casotto et al. [12] and Tsoulis [13].
Unlike spherical coordinates, which encounter singularities at the poles—a limitation explicitly addressed by non-singular Cartesian formulations like those of Pines [14], Cunningham [15], and Metris et al. [16]—the derivatives in our proposed method remain well-defined globally. Additionally, the transparent structure of the polynomial coefficients allows for direct analytical manipulation and a step-wise normalization that distinguishes it from purely numerical evaluation schemes.
Future Work: Key areas for future development include the extension to degrees n > 100 , GPU implementation, and integration into existing geodesy software (e.g., GMT).

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The author declares no conflict of interest.

Appendix A. Derivation of Equation (10)

The proof is based on the general theory of spherical harmonics as described by Hobson [17]. The connection between the derivatives of the reciprocal distance potential and the spherical harmonics is given by Maxwell’s formula:
n m Z n m X ± i Y m 1 R = ( 1 ) n m ( n m ) ! P n m ( cos θ ) R n + 1 ( cos m λ ± i sin m λ ) .
To derive Equation (10), we expand the differential operator on the left-hand side using the binomial theorem:
X + i Y m = l = 0 m m l X l i Y m l = l = 0 m i m l m l m X l Y m l .
Substituting this expansion into Equation (A1) and applying the operator to 1 R differentiated with respect to Z:
l = 0 m i m l m l n X l Y m l Z n m 1 R = ( 1 ) n m ( n m ) ! P n m ( cos θ ) R n + 1 e i m λ .
We define the basis functions as C B n m ¯ = k n m P n m cos ( m λ ) R n + 1 and S B n m ¯ = k n m P n m sin ( m λ ) R n + 1 . Rearranging the equation for the spherical harmonic term:
P n m e i m λ R n + 1 = 1 ( 1 ) n m ( n m ) ! l = 0 m i m l m l n ( 1 / R ) X l Y m l Z n m .
Multiplying by the normalization factor k n m and separating the Real and Imaginary parts corresponds to C B n m ¯ and S B n m ¯ . Using the identity 1 ( n m ) ! = n ! m ! ( n m ) ! m ! n ! = n m m ! n ! and rewriting the phase factors ( 1 ) n m = ( 1 ) n + m , we obtain the form presented in Equation (10). The summation indices l { 0 , 2 , } and l { 1 , 3 , } arise naturally from the selection of Real (even powers of i) and Imaginary (odd powers of i) terms.

Appendix B. Derivation of the Recursive Relations

The objective is to prove that if an n-th order derivative has the form f ( n ) = A n R 2 n + 1 , the subsequent ( n + 1 ) -th derivative will have the form A n + 1 R 2 ( n + 1 ) + 1 , and to derive the recursive relationship between A n + 1 and A n .
  • Step 1: Differentiation of the General Form
We begin with the general form of the n-th derivative:
f ( n ) = A n R 2 n + 1 .
We differentiate this expression with respect to X (without loss of generality) using the quotient rule u v = u v u v v 2 , where
  • u = A n u = A n X ;
  • v = R 2 n + 1 = ( X 2 + Y 2 + Z 2 ) ( n + 1 / 2 ) . Its derivative via the chain rule is
    v = ( n + 1 2 ) ( X 2 + Y 2 + Z 2 ) ( n 1 / 2 ) · ( 2 X ) = ( 2 n + 1 ) X R 2 n 1 .
  • Step 2: Substitution and Simplification
Substituting these into the quotient rule yields
f ( n + 1 ) = X f ( n ) = A n X R 2 n + 1 A n ( 2 n + 1 ) X R 2 n 1 R 2 n + 1 2 f ( n + 1 ) = ( X 2 + Y 2 + Z 2 ) A n X ( 2 n + 1 ) X A n R 2 n + 3 .
The denominator becomes R 4 n + 2 . We simplify the numerator by factoring out R 2 n 1 :
Numerator = R 2 n 1 A n X R 2 A n ( 2 n + 1 ) X .
Dividing the simplified numerator by the denominator R 4 n + 2 gives the final form:
f ( n + 1 ) = ( X 2 + Y 2 + Z 2 ) A n X ( 2 n + 1 ) X A n R 2 n + 3 .
This confirms the new denominator exponent is 2 ( n + 1 ) + 1 = 2 n + 3 . The new numerator polynomial, A n + 1 , is therefore defined by the recurrence:
A n + 1 = ( X 2 + Y 2 + Z 2 ) A n X ( 2 n + 1 ) X A n .
  • Step 3: Expansion and Coefficient Matching
To find the coefficient C i , j , k l + 1 , m l , n m or C i , j , k l + 1 , m l + 1 , n m or C i , j , k l + 1 , m l , n m + 1 of the X i Y j Z k term in A n + 1 , we expand A n in its general form, A n = i , j , k C i , j , k l , m l , n m X i Y j Z k , and apply the formula from Equation (A2).
The first term, ( X 2 + Y 2 + Z 2 ) A n X , is expanded:
( X 2 + Y 2 + Z 2 ) i , j , k i C i , j , k l + 1 , m l , n m X i 1 Y j Z k = i , j , k i C i , j , k l , m l , n m X i + 1 Y j Z k + X i 1 Y j + 2 Z k + X i 1 Y j Z k + 2 .
The second term, ( 2 n + 1 ) X A n , is expanded:
( 2 n + 1 ) X i , j , k C i , j , k l , m l , n m X i Y j Z k = i , j , k ( 2 n + 1 ) C i , j , k l , m l , n m X i + 1 Y j Z k .
We now collect all source terms from these four expansions that produce the target exponents ( i , j , k ) :
  • Contribution 1 (from X 2 · X ):
    X i + 1 Y j Z k X i Y j Z k . This requires ( i , j , k ) = ( i 1 , j , k ) .
    The coefficient is a · C i , j , k l , m l , n m = ( i 1 ) C i 1 , j , k l , m l , n m .
  • Contribution 2 (from Y 2 · X ):
    X i 1 Y j + 2 Z k X i Y j Z k . This requires ( i , j , k ) = ( i + 1 , j 2 , k ) .
    The coefficient is a · C i , j , k l , m l , n m = ( i + 1 ) C i + 1 , j 2 , k l , m l , n m .
  • Contribution 3 (from Z 2 · X ):
    X i 1 Y j Z k + 2 X i Y j Z k . This requires ( i , j , k ) = ( i + 1 , j , k 2 ) .
    The coefficient is a · C i , j , k l , m l , n m = ( i + 1 ) C i + 1 , j , k 2 l , m l , n m .
  • Contribution 4 (from 2 ( n + 1 ) X ):
    X i + 1 Y j Z k X i Y j Z k . This requires ( i , j , k ) = ( i 1 , j , k ) .
    The coefficient is ( 2 n + 1 ) C i 1 , j , k l , m l , n m .
  • Step 4: Final Formulation
Summing these contributions, we note that Contributions 1 and 4 originate from the same source coefficient, C i 1 , j , k l , m l , n m . Combining them yields
( i 1 ) ( 2 n + 1 ) C i 1 , j , k l , m l , n m = ( i 2 n 2 ) C i 1 , j , k l , m l , n m .
The total coefficient C i , j , k l + 1 , m l , n m is the sum of the three distinct source terms, which proves the normalized recursive computation of the coefficients under partial differentiation with respect to X Equation (19):
C i , j , k l + 1 , m l , n m = ( i + 1 ) C i + 1 , j 2 , k l + 1 , m l , n m + ( i + 1 ) C i + 1 , j , k 2 l , m l , n m + ( i 2 ( n + 1 ) ) C i 1 , j , k l , m l , n m .
The Y- and Z-Recurrence Equations (14)–(16) are derived analogously by differentiating with respect to Y and Z.

References

  1. Laplace, P.S. Traité de Mécanique Céleste; L’Imprimerie de Crapelet: Chez J.B.M. Duprat: Paris, France, 1827. [Google Scholar]
  2. Poisson, S.D. Mémoire sur la Théorie du Magnétisme en Movement; L’Académie: Paris, France, 1826. [Google Scholar]
  3. Kellogg, O.D. Foundations of Potential Theory; Courier Corporation: North Chelmsford, MA, USA, 1953; Volume 31. [Google Scholar]
  4. Morse, P.M.; Feshbach, H. Methods of Theoretical Physics; Technology Press: Cambridge, MA, USA, 1953. [Google Scholar]
  5. LeGendre, A.M. Sur l’attraction des sphéroïdes homogènes. Mémoires MathéMatiques Phys. Présenté l’Académie R. Sci. 1785, 10, 411–435. [Google Scholar]
  6. Rodrigues, O. De l’attraction des sphéroïdes. Corresp. l’École Impériale Polytech. (Thesis Fac. Sci. Univ. Paris) 1816, 3, 361–385. [Google Scholar]
  7. DMA WGS84 Development Committee. Department of Defense World Geodetic System 1984, Its Definition and Relationship with Local Geodetic Systems; Technical Report; Defense Mapping Agency: Springfield, VA, USA, 1991.
  8. Ribaldone, C.; Desmarais, J.K. Spherical to Cartesian coordinates transformation for solid harmonics revisited: Construction of the Hartree potential. J. Chem. Phys. 2025, 163, 074102. [Google Scholar] [CrossRef] [PubMed]
  9. Abramowitz, M.; Stegun, I. Handbook of Mathematical Functions. In Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables; National Bureau of Standards: Gaithersburg, MD, USA, 1972; pp. 9–63. [Google Scholar]
  10. Holmes, S.A.; Featherstone, W.E. A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions. J. Geod. 2002, 76, 279–299. [Google Scholar] [CrossRef]
  11. Fukushima, T. Numerical computation of spherical harmonics of arbitrary degree and order by extending exponent of floating point numbers. J. Geod. 2012, 86, 271–285. [Google Scholar] [CrossRef]
  12. Casotto, S.; Fantino, E. Gravitational gradients by tensor analysis with application to spherical coordinates. J. Geod. 2009, 83, 621–634. [Google Scholar] [CrossRef]
  13. Tsoulis, D.; Jamet, O.; Verdun, J.; Gonindard, N. Recursive algorithms for the computation of the potential harmonic coefficients of a constant density polyhedron. J. Geod. 2009, 83, 925–942. [Google Scholar] [CrossRef]
  14. Pines, S. Uniform representation of the gravitational potential and its derivatives. AIAA J. 1973, 11, 1508–1511. [Google Scholar] [CrossRef]
  15. Cunningham, L.E. On the computation of the spherical harmonic terms needed during the numerical integration of the orbital motion of an artificial satellite. Celest. Mech. 1970, 2, 207–216. [Google Scholar] [CrossRef]
  16. Métris, G.; Xu, J.; Wytrzyszczak, I. Derivatives of the gravity potential with respect to rectangular coordinates. Celest. Mech. Dyn. Astron. 1998, 71, 137–151. [Google Scholar] [CrossRef]
  17. Hobson, E.W. The Theory of Spherical and Ellipsoidal Harmonics; Cambridge University Press: Cambridge, UK, 1931; Chapter IV, Section 85: The System of Zonal, Tesseral, and Sectorial Harmonics; pp. 132–134. [Google Scholar]
Figure 1. Second-degree (n = 2) basis functions of the Cartesian representation. The vertices of the triangle are the 2nd partial derivatives of the 1 / R function. (Top: 2 / Z 2 , bottom left: 2 / Y 2 , bottom right: 2 / X 2 .) The denoted spherical terms ( C B 2 0 , C B 2 1 , S B 2 1 , and S B 2 2 ) are proportional to the respective derivatives (see Table 1).
Figure 1. Second-degree (n = 2) basis functions of the Cartesian representation. The vertices of the triangle are the 2nd partial derivatives of the 1 / R function. (Top: 2 / Z 2 , bottom left: 2 / Y 2 , bottom right: 2 / X 2 .) The denoted spherical terms ( C B 2 0 , C B 2 1 , S B 2 1 , and S B 2 2 ) are proportional to the respective derivatives (see Table 1).
Mathematics 14 00226 g001
Figure 2. Third-degree ( n = 3 ) basis functions—the partial derivatives of 1 / R function—of the Cartesian representation. The top 4 derivatives, at the vertices of the rhomboid, are identical with C B 3 0 , C B 3 1 , S B 3 1 , and S B 3 2 spherical base functions.
Figure 2. Third-degree ( n = 3 ) basis functions—the partial derivatives of 1 / R function—of the Cartesian representation. The top 4 derivatives, at the vertices of the rhomboid, are identical with C B 3 0 , C B 3 1 , S B 3 1 , and S B 3 2 spherical base functions.
Mathematics 14 00226 g002
Table 1. Spherical coefficients ( n = 2 ) expressed in spherical and Cartesian coordinates.
Table 1. Spherical coefficients ( n = 2 ) expressed in spherical and Cartesian coordinates.
Coeffs.In Spherical CoordinatesIn Cartesian Coordinates
C 20 3 ρ 2 cos 2 ϑ 2 ρ 2 2 x 2 2 y 2 2 + z 2
C 21 3 ρ 2 cos ϑ sin ϑ cos λ 3 x z
S 21 3 ρ 2 cos ϑ sin ϑ sin λ 3 y z
C 22 3 ρ 2 sin 2 ϑ cos 2 λ 3 ρ 2 sin 2 ϑ sin 2 λ 3 ( x 2 y 2 )
S 22 6 ρ 2 sin 2 ϑ cos λ sin λ 6 x y
Table 2. Number of terms (coefficients or basis functions) for the respective degree, for Cartesian and spherical representation.
Table 2. Number of terms (coefficients or basis functions) for the respective degree, for Cartesian and spherical representation.
nNumber of Terms Using the Taylor Series-Based Cartesian CoordinatesNumber of Terms Using the Spherical Coordinate System
133
265
3107
4159
52111
62813
n 0.5 n 2 + 1.5 n + 1 2 n + 1
Table 3. Explicit algebraic forms of the fully normalized spherical basis functions for degree n = 3 . The functions C B n m ¯ and S B n m ¯ represent the Schmidt-normalized cosine and sine harmonic terms, respectively. The terms are systematically categorized into four subsets based on the parity of the order m and the harmonic character (cosine or sine). The final row, labeled “Constituent monomials,” identifies the specific combinations of Cartesian coordinate powers ( X i Y j Z k / R 2 n + 1 ) characterizing each group, serving as a structural reference for comparison with the Cartesian partial derivatives.
Table 3. Explicit algebraic forms of the fully normalized spherical basis functions for degree n = 3 . The functions C B n m ¯ and S B n m ¯ represent the Schmidt-normalized cosine and sine harmonic terms, respectively. The terms are systematically categorized into four subsets based on the parity of the order m and the harmonic character (cosine or sine). The final row, labeled “Constituent monomials,” identifies the specific combinations of Cartesian coordinate powers ( X i Y j Z k / R 2 n + 1 ) characterizing each group, serving as a structural reference for comparison with the Cartesian partial derivatives.
m CB 3 even ¯ CB 3 odd ¯ SB 3 odd ¯ SB 3 B ¯
0 Z 3 3 Y 2 Z 2 3 X 2 Z 2 R 7 · 7
1 X Y 2 4 X Z 2 + X 3 4 R 7 · 42 Y Z 2 + X 2 Y 4 + Y 3 4 R 7 · 42
2 X 2 Z 2 Y 2 Z 2 R 7 · 105 105 X Y Z R 7
3 X 3 4 + 3 X Y 2 4 R 7 · 70 3 X 2 Y 4 + Y 3 4 R 7 · 70
Constituent monomials Z 3 R 7 , Y 2 Z R 7 , X 2 Z R 7 X 3 R 7 , X Y 2 R 7 , X Z 2 R 7 Y 3 R 7 , X 2 Y R 7 , Y Z 2 R 7 X Y Z R 7
Table 4. The basis functions of the Cartesian representation for degree n = 3 , constructed from the partial derivatives of the inverse distance function ( 1 / R ). The expressions incorporate the binomial and factorial coefficients ( n m m l / n ! ) originating from the Taylor series expansion. The columns are organized according to the parity of the differentiation orders with respect to X and Y, mirroring the classification logic of Table 3. Note the identical structure of the “Constituent monomials” in the bottom row compared to the spherical formulation, demonstrating the direct correspondence between the highest-order Z-derivatives and the spherical basis functions.
Table 4. The basis functions of the Cartesian representation for degree n = 3 , constructed from the partial derivatives of the inverse distance function ( 1 / R ). The expressions incorporate the binomial and factorial coefficients ( n m m l / n ! ) originating from the Taylor series expansion. The columns are organized according to the parity of the differentiation orders with respect to X and Y, mirroring the classification logic of Table 3. Note the identical structure of the “Constituent monomials” in the bottom row compared to the spherical formulation, demonstrating the direct correspondence between the highest-order Z-derivatives and the spherical basis functions.
m n m m l n ! n X even Y even Z n m 1 R n m m l n ! n X odd Y even Z n m 1 R n m m l n ! n X even Y odd Z n m 1 R n m m l n ! n X odd Y odd Z n m 1 R
0 Z 3 3 2 Y 2 Z 3 2 X 2 Z R 7
1 6 X Z 2 3 2 X Y 2 3 2 X 3 R 7 6 Y Z 2 3 2 X 2 Y 3 2 Y 3 R 7
2 6 X 2 Z 3 2 Y 2 Z 3 2 Z 3 R 7 15 X Y Z R 7
6 Y 2 Z 3 2 X 2 Z 3 2 Z 3 R 7
3 X 3 3 2 X Z 2 3 2 X Y 2 R 7 Y 3 3 2 Y Z 2 3 2 X 2 Y R 7
6 X Y 2 3 2 X 3 3 2 X Z 2 R 7 6 X 2 Y 3 2 Y Z 2 3 2 Y 3 R 7
Constituent monomials Z 3 R 7 , Y 2 Z R 7 , X 2 Z R 7 X 3 R 7 , X Y 2 R 7 , X Z 2 R 7 Y 3 R 7 , X 2 Y R 7 , Y Z 2 R 7 X Y Z R 7
Table 5. Explicit analytical derivation of the normalized spherical basis functions for degree n = 3 via the Direct Cartesian Method. The table demonstrates the practical application of the general summation formula Equation (10) by mapping each target harmonic function ( C B 3 m ¯ , S B 3 m ¯ ) to a specific weighted linear combination of the partial derivatives of the inverse distance function ( 1 / R ). The columns display the constituent derivatives with their associated correction factors, the intermediate algebraic substitution, and the final Cartesian polynomial forms, thereby validating the proposed transformation logic.
Table 5. Explicit analytical derivation of the normalized spherical basis functions for degree n = 3 via the Direct Cartesian Method. The table demonstrates the practical application of the general summation formula Equation (10) by mapping each target harmonic function ( C B 3 m ¯ , S B 3 m ¯ ) to a specific weighted linear combination of the partial derivatives of the inverse distance function ( 1 / R ). The columns display the constituent derivatives with their associated correction factors, the intermediate algebraic substitution, and the final Cartesian polynomial forms, thereby validating the proposed transformation logic.
Normalized Spherical Basis FunctionsProperly Summed and Then Corrected Cartesian Basis FunctionsSubstituted Intermediate ResultsResults
C B 3 0 ¯ ( 1 ) 0 · k 3 0 · 0 ! · 1 3 ! 3 Z 3 1 R Z 3 3 Y 2 Z 2 3 X 2 Z 2 R 7 · 7
C B 3 1 ¯ ( 1 ) 1 · k 3 1 · 1 ! · 3 3 ! 3 X Z 2 1 R 6 X Z 2 3 X Y 2 2 3 X 3 2 R 7 · 7 6 X Y 2 4 X Z 2 + X 3 4 R 7 · 42
C B 3 2 ¯ ( 1 ) 2 · k 3 2 · 2 ! · 3 3 ! 3 Y 2 Z 1 R 3 X 2 Z 1 R 6 Y 2 Z 3 X 2 Z 2 3 Z 3 2 R 7 6 X 2 Z 3 Y 2 Z 2 3 Z 3 2 R 7 · 7 15 X 2 Z 2 Y 2 Z 2 R 7 · 105
C B 3 3 ¯ ( 1 ) 3 · k 3 3 · 3 ! · 1 3 ! 3 X 3 1 R 3 · 3 X Y 2 1 R X 3 3 X Z 2 2 3 X Y 2 2 R 7 6 X Y 2 3 X 3 2 3 X Z 2 2 R 7 · 7 10 X 3 4 + 3 X Y 2 4 R 7 · 70
S B 3 1 ¯ ( 1 ) 1 · k 3 1 · 1 ! · 3 3 ! 3 Y Z 2 1 R 6 Y Z 2 3 X 2 Y 2 3 Y 3 2 R 7 · 7 6 Y Z 2 + X 2 Y 4 + Y 3 4 R 7 · 42
S B 3 2 ¯ ( 1 ) 2 · k 3 2 · 2 ! · 3 · 2 3 ! 3 X Y Z 1 R 15 X Y Z R 7 · 7 15 X Y Z R 7 · 105
S B 3 3 ¯ ( 1 ) 3 · k 3 3 · 3 ! · 1 3 ! 3 · 3 X 2 Y 1 R 3 Y 3 1 R 6 X 2 Y 3 Y Z 2 2 3 Y 3 2 R 7 Y 3 3 Y Z 2 2 3 X 2 Y 2 R 7 · 7 10 3 X 2 Y 4 + Y 3 4 R 7 · 70
Table 6. Coefficients and monomials of the normalized Z-derivative for ( n m ) = 6 , arranged by indices q and r, using Equation (18) ( A 0 , 0 , 6 ¯ = C 0 , 0 , 6 2 r , 2 ( q r ) , 6 2 q ¯ · X 2 r Y 2 ( q r ) Z 6 2 q ).
Table 6. Coefficients and monomials of the normalized Z-derivative for ( n m ) = 6 , arranged by indices q and r, using Equation (18) ( A 0 , 0 , 6 ¯ = C 0 , 0 , 6 2 r , 2 ( q r ) , 6 2 q ¯ · X 2 r Y 2 ( q r ) Z 6 2 q ).
A 0 , 0 , 6 ¯ r = 0r = 1r = 2r = 3
q = 0 13 Z 6
q = 1 13 15 2 Y 2 Z 4 13 15 2 X 2 Z 4
q = 2 13 45 8 Y 4 Z 2 13 45 4 X 2 Y 2 Z 2 13 45 8 X 4 Z 2
q = 3 13 5 16 Y 6 13 15 16 X 2 Y 4 13 15 16 X 4 Y 2 13 5 16 X 6
Table 7. Recursive calculation of X-derivative terms ( n = 7 ).
Table 7. Recursive calculation of X-derivative terms ( n = 7 ).
X i Y j Z k F norm , X i + 1 C i + 1 , j 2 , k 0 , 0 , 6 ¯ C i + 1 , j , k 2 0 , 0 , 6 ¯ i 14 C i 1 , j , k 0 , 0 , 6 ¯ C i , j , k 1 , 0 , 6 ¯ · X i Y j Z k
X 7 15 2 91 800 7 13 5 16 5 105 32 X 7
X 5 Y 2 15 2 91 6 13 5 16 0 9 13 15 16 15 105 32 X 5 Y 2
X 5 Z 2 15 2 91 60 13 5 16 9 13 45 8 15 105 4 X 5 Z 2
X 3 Y 4 15 2 91 4 13 15 16 0 11 13 15 16 15 105 32 X 3 Y 4
X 3 Y 2 Z 2 15 2 91 4 13 45 8 13 15 16 11 13 45 4 15 105 2 X 3 Y 2 Z 2
X 3 Z 4 15 2 91 40 13 45 8 11 13 15 2 15 105 2 X 3 Z 4
X Y 6 15 2 91 2 13 15 16 0 13 13 5 16 5 105 32 X Y 6
X Y 4 Z 2 15 2 91 2 13 45 4 13 15 16 13 13 45 8 15 105 4 X Y 4 Z 2
X Y 2 Z 4 15 2 91 2 13 15 2 13 45 4 13 13 15 2 15 105 2 X Y 2 Z 4
X Z 6 15 2 91 20 13 15 2 13 13 2 105 X Z 6
Table 8. Recursive calculation of Y-derivative terms ( n = 7 ) using Z-derivative ( n = 6 ) coefficients.
Table 8. Recursive calculation of Y-derivative terms ( n = 7 ) using Z-derivative ( n = 6 ) coefficients.
X i Y j Z k F norm , Y j + 1 C i 2 , j + 1 , k 0 , 0 , 6 ¯ C i , j + 1 , k 2 0 , 0 , 6 ¯ j 14 C i , j 1 , k 0 , 0 , 6 ¯ C i , j , k 0 , 1 , 6 ¯
Y 7 15 2 91 800 7 13 5 16 5 105 32 Y 7
X 2 Y 5 15 2 91 6 13 5 16 0 9 13 15 16 15 105 32 X 2 Y 5
Y 5 Z 2 15 2 91 60 13 5 16 9 13 45 8 15 105 4 Y 5 Z 2
X 4 Y 3 15 2 91 4 13 15 16 0 11 13 15 16 15 105 32 X 4 Y 3
X 2 Y 3 Z 2 15 2 91 4 13 45 8 13 15 16 11 13 45 4 15 105 2 X 2 Y 3 Z 2
Y 3 Z 4 15 2 91 40 13 45 8 11 13 15 2 15 105 2 Y 3 Z 4
X 6 Y 15 2 91 2 13 15 16 0 13 13 5 16 5 105 32 X 6 Y
X 4 Y Z 2 15 2 91 2 13 45 4 13 15 16 13 13 45 8 15 105 4 X 4 Y Z 2
X 2 Y Z 4 15 2 91 2 13 15 2 13 45 4 13 13 15 2 15 105 2 X 2 Y Z 4
Y Z 6 15 2 91 20 13 15 2 13 13 2 105 Y Z 6
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gilányi, G. Direct Transformation of Laplace Equation’s Solution from Spherical to Cartesian Representation. Mathematics 2026, 14, 226. https://doi.org/10.3390/math14020226

AMA Style

Gilányi G. Direct Transformation of Laplace Equation’s Solution from Spherical to Cartesian Representation. Mathematics. 2026; 14(2):226. https://doi.org/10.3390/math14020226

Chicago/Turabian Style

Gilányi, Gibárt. 2026. "Direct Transformation of Laplace Equation’s Solution from Spherical to Cartesian Representation" Mathematics 14, no. 2: 226. https://doi.org/10.3390/math14020226

APA Style

Gilányi, G. (2026). Direct Transformation of Laplace Equation’s Solution from Spherical to Cartesian Representation. Mathematics, 14(2), 226. https://doi.org/10.3390/math14020226

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop