1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Find gradient in spherical and cartesian coordinates

  1. Oct 4, 2009 #1
    1. The problem statement, all variables and given/known data
    Find the gradient of [itex]3r^2[/itex] in spherical coordinates, then do it in Cartesian coordinates

    2. Relevant equations
    [tex]
    \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}
    [/tex]
    [tex]z=r \cos \theta[/tex]

    3. The attempt at a solution

    Since there's no [itex]\theta, \phi[/itex] then the gradient is simply [itex]6r \hat r[/itex]. Transforming to cartesian coordinates gives [tex]\frac{z}{6}\hat z[/tex] because cos 0 = 1. Any of the other coordinate transforms involve [itex] \sin \theta [/itex] or [itex] \sin \phi[/itex] so z is the only non-zero coordinate.
     
    Last edited: Oct 4, 2009
  2. jcsd
  3. Oct 4, 2009 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Are you given that theta=0? If so that's ok, except how did the 6 move from the numerator to the denominator?
     
  4. Oct 4, 2009 #3
    It wasn't necessarily given, I just assumed it was since the [itex]3r^2[/itex] 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.
     
  5. Oct 4, 2009 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Then you can't put theta=0. [itex]6 r \hat r[/itex] is fine. What's r in cartesian coordinates? What's [itex]\hat r[/itex] 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.
     
  6. Oct 4, 2009 #5
    r is just the magnitude so in Cartesian that's [tex]\sqrt{x^2 + y^2 +z^2}[/tex]. I think that [tex]\hat r = \sin \theta \cos \phi \hat x + \sin \theta \sin \phi \hat y + \cos \theta \hat z[/tex]
     
  7. Oct 4, 2009 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    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
    [tex]
    \hat r = \sin \theta \cos \phi \hat x + \sin \theta \sin \phi \hat y + \cos \theta \hat z
    [/tex]
    as
    [tex]
    \hat r = (x \hat x + y \hat y + z \hat z)/r
    [/tex]
    That's the same thing isn't it?
     
  8. Oct 4, 2009 #7
    Yes, I see it now. Doing it both ways gives me the same result
    [tex]6x \hat x + 6y \hat y + 6z \hat z[/tex]
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Find gradient in spherical and cartesian coordinates
Loading...