# Expression for the gradient of gravity potential in spherical coordinates

I am currently using the GGM05C Stokes' coefficients to reconstruct the gradient of gravity potential of Earth.

I have found an expression for said gradient in spherical coordinates in this technical report by the ICGEM. In particular, equation 122 on page 23 shows the partial derivatives of the gravity potential $$W$$ with respect to the three spherical coordinates parameters $$r$$ (distance to center), $$\lambda$$ (longitude) and $$\varphi$$ (geocentric latitude).

These equations involve the use of associated Legendre functions $$P_{lm}$$, which are a function of the latitude $$\varphi$$. I understand then that, when performing the partial derivatives with respect to $$r$$, $$\varphi$$ and $$\lambda$$, the Legendre functions remain unaltered in the derivatives with respect to $$r$$ and $$\lambda$$, since the Legendre functions are not a function of either $$r$$ or $$\lambda$$. However, since they are a function of the latitude $$\varphi$$, when we calculate $$\dfrac{\partial W}{\partial \varphi}$$, we need to derive the associated Legendre functions, obtaining the following expression, as indicated in equation 122 of the linked document:

$$\dfrac{\partial W}{\partial \varphi} = \frac{GM}{r}\sum_{\mathscr{l}=0}^{\mathscr{l}_{max}}\left(\frac{R}{r}\right)^\mathscr{l}\sum_{m=0}^{\mathscr{l}}\dfrac{\partial P_{\mathscr{l}m}(sin\ \varphi)}{\partial \varphi}\left(C_{\mathscr{l}m}^Wcos(m\lambda)+S_{\mathscr{l}m}^Wsin(m\lambda)\right)$$

However, following the chain rule, shouldn't this derivative also include a multiplication by $$cos\ \varphi$$, since that is the derivative of the $$sin\ \varphi$$ nested within $$P_{\mathscr{l}m}(sin\ \varphi)$$?

• I don't think so. $\frac{\partial P(\sin(x))}{\partial x} = \frac{\partial P(\sin(x))}{\partial \sin(x)} \frac{\partial \sin(x)}{\partial x}$ Feb 1, 2022 at 8:03
• Indeed, I see, I didn't properly read the notation. It is in fact the values of $\dfrac{\partial P(sin(x))}{\partial sin(x)}$ that are known, and since $\dfrac{\partial sin(x)}{\partial x}=cos(x)$, we get the two components required to calculate the derivative. Thanks! Feel free to post it as answer and I will mark it as accepted :)
– Rafa
Feb 1, 2022 at 8:13
• I remember that I got really confused with spherical harmonics when I had to deal with them in the context of Rossby waves. Feb 1, 2022 at 8:26

The chain rule is already included, since the derivative is taken with respect to $$\varphi$$. Note that $$$$\frac{\partial P_{\ell m}(\sin(\varphi))}{\partial \varphi} = \frac{\partial P_{\ell m}(\sin(\varphi))}{\partial \sin(\varphi)} \frac{\partial \sin(\varphi)}{\partial \varphi}.$$$$