Define $\Delta x \equiv x_2 – x_1$, to be consistent with this post. Similarly, define $\Delta y \equiv y_2 – y_1$ and $\Delta z \equiv z_2 – z_1$. The Cartesian coordinates are $x$, $y$, & $z$. In contrast, the spherical coordinates are $r$, $\theta$, & $\phi$. Here, $\phi$ is the azimuthal angle in the $xy$-plane. Next, use this post to obtain the equations relating Cartesian coordinates to spherical coordinates. In particular: $x = r \sin\theta \cos \phi $ $y = r \sin \theta \sin \phi $ $z = r \cos\theta $ Note that $x$ changes if $r$ changes, $\theta$ changes, and/or $\phi$ changes. Similarly, $y$ changes if $r$ changes, $\theta$ changes, and/or $\phi$ changes. Finally, $z$ changes if $r$ changes and/or $\theta$ changes. To express all of these options, it is possible to construct a matrix [1]: Some of the functional dependencies have been indicated so that it is clear how the ratios of differences can eventually become derivatives.  As done in previous posts, I constrain each angle to be nonnegative.  Note that it is possible to multiply each element by the quantity in the denominator:   From algebra, the previous matrix is equal to: These two matrices will be useful later. Next, from this post, one type of derivative is $ \lim_{\Delta x \rightarrow 0^+} \frac{f(a+\Delta x) – f(a)}{\Delta x} \equiv \frac{d f(x)}{dx}\big|_{a^+}$. Define $\Delta f(\Delta x) \equiv f_2(\Delta x) – f_1(\Delta x)$ $f_2(\Delta x) \equiv f(a+\Delta x)$ $f_1(\Delta x) \equiv f(a)$ Then $\Delta f(\Delta x) = f(a+\Delta x) – f(a)$, and the previous definition indicates that $ \lim_{\Delta x \rightarrow 0^+} \frac{ \Delta f( \Delta x) }{\Delta x} = \frac{d f(x)}{dx}\big|_{a^+}$. Given the above information, perhaps it is useful to construct a matrix that is identical to the previous matrix except for an additional $\lim_{\Delta x \rightarrow 0^+}$ applied to each element of […]