Derivative in spherical coordinates Can someone please explain where this comes from? My textbook only says that is a derivative in spherical coordinates. (r is a position vector and $U$ is the potential energy).
$-\dfrac{\partial U}{\partial \textbf{r}} = -\left(\dfrac{\partial U}{\partial R}\textbf{e}_R+\dfrac{1}{R}\dfrac{\partial U}{\partial \theta}\textbf{e}_{\theta}+\dfrac{1}{R\sin\theta}\dfrac{\partial U}{\partial \varphi}\textbf{e}_{\varphi}\right)$
 A: This is the gradient operator in spherical coordinates. See: here. Look under the heading "Del formulae." This page demonstrates the complexity of these type of formulae in general. You can derive these with careful manipulation of partial derivatives too if you know what you're doing. 
The other option is to learn some (basic) Differential Geometry. You can take a course or read a book on it if you really care. Depending on your field of interest, you may not need to care about HOW to get this. 
A: Hints: first, the LHR $U$ and the RHS $U$ are different functions. The first (I will call it $V$) is the potential energy in cartesian coordinates, the second is the potential energy in spherical coordinates. They are related by
$$V(x(R,\theta,\varphi),y(R,\theta,\varphi),z(R,\theta,\varphi)) = U(R,\theta,\varphi).$$
$$V(x,y,z) = U(R(x,y,z),\theta(x,y,z),\varphi(x,y,z)).$$
You can find the relation between the partial derivatives of $U$ and $V$ using the chain rule.
Now,
$$
\frac{\partial V}{\partial\mathbf r} =
\frac{\partial V}{\partial x}{\mathbf i} +
\frac{\partial V}{\partial y}{\mathbf j} +
\frac{\partial V}{\partial z}{\mathbf k} =
\frac{\partial V}{\partial\mathbf r} =
(\cdots){\mathbf i} +
(\cdots){\mathbf j} +
(\cdots){\mathbf k}
$$
(where the $(\cdots)$ are the partial derivatives of $V$ expressed using the partial derivatives of $U$.
Last step: write ${\mathbf i}, {\mathbf j}, {\mathbf k}$ in the new base ${\mathbf e}_R,{\mathbf e}_\theta,{\mathbf e}_\varphi$.
