A central example of gradients is found by considering the gravitational potential energy function caused by a mass \(M\) at the the origin. Another object of mass \(m\) and position \((x,y,z)\) has potential gravitational energy of
\begin{equation*}
P = \frac{-GmM}{\sqrt{x^2 + y^2 +z^2}}\text{.}
\end{equation*}
By convention, this potential energy is negative. It approaches \(-\infty\) in the limit at the origin, and approaches \(0\) as the distance from the origin grows to \(\infty\text{.}\) I’ll writ the gradient of this potential energy; I seperate it into two pieces, one of magnitude and one of diection (where direction is given by a unit vector).
\begin{equation*}
\nabla P = \frac{GmM}{\sqrt{(x^2 + y^2 +z^2)^3}} (x, y, z)
= \frac{GmM}{x^2 + y^2 + z^2} \frac{1}{\sqrt{x^2 + y^2 +
z^2}} (x,y,z)\text{.}
\end{equation*}
This is precisely the force of gravity. The gradient points in the direction of maximum increase in potential energy (directly outward from the origin) with magnitude \(\frac{GmM}{r^2}\) where \(r\) is the distance between the two objects. This is a common situation we will discuss in Calculus IV: many forces are the result of gradients of potential energy functions. These forces are called conservative forces. Gravity, like these other forces, can be thought of as the tendency for objects to lower their potential energy as efficiently as possible.