<p>The chain rule is already included, since the derivative is taken with respect to <span class="math-container">$\varphi$</span>. Note that
<span class="math-container">\begin{equation}
\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}.
\end{equation}</span></p>

CC BY-SA 4.0
2022-02-01T08:23:14.930Z
2022-02-01T08:23:14.930Z
Joscha Fregin
<p>I am currently using the GGM05C Stokes' coefficients to reconstruct the gradient of gravity potential of Earth.</p>
<p>I have found an expression for said gradient in spherical coordinates in <a href="http://icgem.gfz-potsdam.de/str-0902-revised.pdf" rel="nofollow noreferrer">this technical report by the ICGEM</a>. In particular, equation 122 on page 23 shows the partial derivatives of the gravity potential <span class="math-container">$W$</span> with respect to the three spherical coordinates parameters <span class="math-container">$r$</span> (distance to center), <span class="math-container">$\lambda$</span> (longitude) and <span class="math-container">$\varphi$</span> (geocentric latitude).</p>
<p>These equations involve the use of associated Legendre functions <span class="math-container">$P_{lm}$</span>, which are a function of the latitude <span class="math-container">$\varphi$</span>. I understand then that, when performing the partial derivatives with respect to <span class="math-container">$r$</span>, <span class="math-container">$\varphi$</span> and <span class="math-container">$\lambda$</span>, the Legendre functions remain unaltered in the derivatives with respect to <span class="math-container">$r$</span> and <span class="math-container">$\lambda$</span>, since the Legendre functions are not a function of either <span class="math-container">$r$</span> or <span class="math-container">$\lambda$</span>. However, since they are a function of the latitude <span class="math-container">$\varphi$</span>, when we calculate <span class="math-container">$\dfrac{\partial W}{\partial \varphi}$</span>, we need to derive the associated Legendre functions, obtaining the following expression, as indicated in equation 122 of the linked document:</p>
<p><span class="math-container">$$
\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)
$$</span></p>
<p>However, following the chain rule, shouldn't this derivative also include a multiplication by <span class="math-container">$cos\ \varphi$</span>, since that is the derivative of the <span class="math-container">$sin\ \varphi$</span> nested within <span class="math-container">$P_{\mathscr{l}m}(sin\ \varphi)$</span>?</p>

CC BY-SA 4.0
2022-02-01T08:03:33.423Z
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}$
Joscha Fregin
CC BY-SA 4.0
2022-02-01T08:13:38.957Z
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
CC BY-SA 4.0
2022-02-01T08:26:15.163Z
I remember that I got really confused with spherical harmonics when I had to deal with them in the context of Rossby waves.
Joscha Fregin
<gravity>
Expression for the gradient of gravity potential in spherical coordinates
Rafa
# Expression for the gradient of gravity potential in spherical coordinates

(Asked by: username_0 on 2022-01-31)

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](http://icgem.gfz-potsdam.de/str-0902-revised.pdf). 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)$?

**Tags:** gravity

> **Comments:**
> **username_1**: 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}$  
> **username_0**: 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 :)  
> **username_1**: I remember that I got really confused with spherical harmonics when I had to deal with them in the context of Rossby waves.  

---

## 1 answers

### Answer by username_1 on 2022-02-01. Score: 3 | Accepted answer

The chain rule is already included, since the derivative is taken with respect to $\varphi$. Note that
\begin{equation}
\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}.
\end{equation}


---

