Find gradient in spherical and cartesian coordinates

Click For Summary
The discussion focuses on finding the gradient of the function 3r^2 in both spherical and Cartesian coordinates. The gradient in spherical coordinates is determined to be 6r in the radial direction, \(\hat r\). When converting to Cartesian coordinates, the participants clarify that r is the magnitude \(\sqrt{x^2 + y^2 + z^2}\) and \(\hat r\) can be expressed in terms of Cartesian unit vectors. The conversion process leads to a consistent result of 6x \(\hat x\) + 6y \(\hat y\) + 6z \(\hat z\) when calculated directly in Cartesian coordinates. The discussion emphasizes the importance of understanding coordinate transformations in vector calculus.
naele
Messages
199
Reaction score
1

Homework Statement


Find the gradient of 3r^2 in spherical coordinates, then do it in Cartesian coordinates

Homework Equations


<br /> \nabla f=\hat r \frac{\partial f}{\partial r} + \hat \theta \frac{1}{r} \frac{\partial f}{\partial \theta}+ \hat \phi \frac{1}{r\sin \theta}\frac{\partial f}{\partial \phi}<br />
z=r \cos \theta

The Attempt at a Solution



Since there's no \theta, \phi then the gradient is simply 6r \hat r. Transforming to cartesian coordinates gives \frac{z}{6}\hat z because cos 0 = 1. Any of the other coordinate transforms involve \sin \theta or \sin \phi so z is the only non-zero coordinate.
 
Last edited:
Physics news on Phys.org
Are you given that theta=0? If so that's ok, except how did the 6 move from the numerator to the denominator?
 
It wasn't necessarily given, I just assumed it was since the 3r^2 has no theta or phi term to just consider them as zero when I took the gradient. That second part with z/6 I suspect is completely wrong because I don't understand how to transform from spherical to cartesian.
 
naele said:
It wasn't necessarily given, I just assumed it was since the 3r^2 has no theta or phi term to just consider them as zero when I took the gradient. That second part with z/6 I suspect is completely wrong because I don't understand how to transform from spherical to cartesian.

Then you can't put theta=0. 6 r \hat r is fine. What's r in cartesian coordinates? What's \hat r in cartesian coordinates? You must know at least one of those. Look them up if you don't. Alternatively, express 3r^2 in cartesian coordinates and do it directly.
 
r is just the magnitude so in Cartesian that's \sqrt{x^2 + y^2 +z^2}. I think that \hat r = \sin \theta \cos \phi \hat x + \sin \theta \sin \phi \hat y + \cos \theta \hat z
 
That's ok. Then 3r^2=3*(x^2+y^2+z^2). Can you use that to find the gradient directly in cartesian coordinates? But why not write
<br /> \hat r = \sin \theta \cos \phi \hat x + \sin \theta \sin \phi \hat y + \cos \theta \hat z<br />
as
<br /> \hat r = (x \hat x + y \hat y + z \hat z)/r<br />
That's the same thing isn't it?
 
Yes, I see it now. Doing it both ways gives me the same result
6x \hat x + 6y \hat y + 6z \hat z
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
Replies
33
Views
4K
Replies
3
Views
2K
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K