Need Help With Gradient (Spherical Coordinates)

  • #1

Homework Statement


Find te gradient of the following function f(r) = rcos(##\theta##) in spherical coordinates.

Homework Equations


\begin{equation}
\nabla f = \frac{\partial f}{\partial r} \hat{r} + (\frac{1}{r}) \frac{\partial f}{\partial \theta} \hat{\theta} + \frac{1}{rsin\theta} \frac{\partial f}{\partial \phi} \hat{\phi}
\end{equation}

The Attempt at a Solution


I know that z = rcos##\theta##


But I don't know where to go from there since I don't see any ##\hat{r}##, ##\hat{\theta}##, ##\hat{\phi}##
 

Answers and Replies

  • #2
2,800
602
Do you know how to calculate ## \frac{\partial f}{\partial r} ##,## \frac{\partial f}{\partial \theta} ## and ## \frac{\partial f}{\partial \phi} ##?
 
  • #3
Do you know how to calculate ## \frac{\partial f}{\partial r} ##,## \frac{\partial f}{\partial \theta} ## and ## \frac{\partial f}{\partial \phi} ##?

if you're asking if I know how to take partial derivatives, then yes. The issue lies in I don't know where to begin since there is ##\hat{r}##, ##\hat{\theta}##, ##\hat{\phi}## in the equation.
 
  • #4
2,800
602
Its just like gradient in the Cartesian coordinates. You calculate ## \frac{\partial f}{\partial x} ##,etc. and assume they are components of a vector field. So you have ## \vec \nabla f=(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z})=\frac{\partial f}{\partial x}\hat x+\frac{\partial f}{\partial y}\hat y+\frac{\partial f}{\partial z}\hat z ##.
What is so different about spherical coordinates?
 
  • #5
So would it be:

\begin{equation}
\begin{split}
f(r) = rcos(\theta) \\
\frac{\partial f}{\partial r} = cos\theta \\
\frac{\partial f}{\partial \theta} = - rsin \theta \\
\frac{\partial f}{\partial \phi} = 0
\end{split}
\end{equation}
So the gradient is
\begin{equation}
cos\theta \ \hat{r} + -sin\theta \ \hat{\theta}
\end{equation}

Is this correct?
 
  • #7

Related Threads on Need Help With Gradient (Spherical Coordinates)

  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
2K
Replies
2
Views
411
Replies
7
Views
9K
Replies
1
Views
156
  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
2
Views
798
  • Last Post
Replies
2
Views
7K
Replies
5
Views
3K
Replies
0
Views
6K
Top