For a function fdefined in terms of spherical radial coordinatewe can write

In spherical polar coordinates

$f$
is not a function of
$\theta$
or
$\phi$
so

Example: Ifthen

Example: Ifthen

$\mathbf{\nabla} f = - \frac{1}{r^2} \mathbf{e}_r$