Gradient of function in spherical coordinates

$\begingroup$

How do you find the gradient of the function: $$h(r,\theta,\phi) = \frac{1}{r}e^{r^2}$$ I'm not sure what $h(r,\theta,\phi)$ is supposed to output? Is it coordinates? How do you convert this function to cartesian coordinates?

$\endgroup$

1 Answer

$\begingroup$

$h(r,\theta,\phi)$ will output a scalar (a number), as it depends only on the radial distance $r$; the gradient of $h$ will output a vector: $\nabla h$ is a vector.

To find the gradient, consider that in spherical coordinates the gradient has the form:

$$\nabla=(\frac{\partial}{\partial r},\frac{1}{r}\frac{\partial}{\partial \theta},\frac{1}{r \sin\theta}\frac{\partial}{\partial \phi})$$ Thus, the sought gradient in spherical coordinates is $$\nabla h = (-\frac{e^{r^2}}{r^2}+2e^{r^2}\ln e, 0, 0 )$$ The first component of the derived gradient vector is the derivative of $h$ w/respect to $r$.

To convert $h$ to Cartesian coordinates, consider the conversion formula: $$r=\sqrt{x^2+y^2+z^2}$$. You don't need the conversions of $\theta$ or $\phi$ since $h$ does not depend on them:

$$h(x,y,z)=\frac{1}{\sqrt{x^2+y^2+z^2}}e^{x^2+y^2+z^2}$$

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like