Find gradient in spherical and cartesian coordinates

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
 
Back
Top