Find gradient in spherical and cartesian coordinates

In summary, the conversation discusses finding the gradient of 3r^2 in both spherical and Cartesian coordinates. The gradient is calculated to be 6r \hat r in spherical coordinates and can be transformed to 6x \hat x + 6y \hat y + 6z \hat z in Cartesian coordinates by expressing r and \hat r in terms of x, y, and z.
  • #1
naele
202
1

Homework Statement


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

Homework 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]

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:
Physics news on Phys.org
  • #2
Are you given that theta=0? If so that's ok, except how did the 6 move from the numerator to the denominator?
 
  • #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.
 
  • #4
naele said:
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.

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.
 
  • #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]
 
  • #6
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?
 
  • #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]
 

Related to Find gradient in spherical and cartesian coordinates

What is the difference between spherical and cartesian coordinates?

Spherical coordinates use a set of three coordinates (r, θ, φ) to specify a point in three-dimensional space, where r represents the distance from the origin, θ represents the angle from the positive z-axis, and φ represents the angle from the positive x-axis. Cartesian coordinates, on the other hand, use a set of three coordinates (x, y, z) to specify a point in three-dimensional space, where x, y, and z represent the distances from the origin along the x, y, and z axes, respectively.

How do you convert between spherical and cartesian coordinates?

To convert from spherical coordinates to cartesian coordinates, use the following equations:
x = r * sin(θ) * cos(φ)
y = r * sin(θ) * sin(φ)
z = r * cos(θ)
To convert from cartesian coordinates to spherical coordinates, use the following equations:
r = √(x² + y² + z²)
θ = arccos(z / r)
φ = arctan(y / x)

How do you find the gradient in spherical coordinates?

The gradient in spherical coordinates can be found using the following formula:
∇f = (∂f/∂r)er + (1/r)(∂f/∂θ)eθ + (1/rsin(θ))(∂f/∂φ)eφ
where er, eθ, and eφ are unit vectors in the r, θ, and φ directions, respectively.

Can you find the gradient in both spherical and cartesian coordinates?

Yes, the gradient can be found in both spherical and cartesian coordinates. However, the equations used to find the gradient will differ depending on the coordinate system being used.

Why is it important to be able to find the gradient in different coordinate systems?

Finding the gradient in different coordinate systems allows for a more versatile and comprehensive understanding of a given function or system. It also allows for easier comparison and analysis between different coordinate systems and can be useful in solving various scientific and mathematical problems. Additionally, some problems may be easier to solve in one coordinate system compared to another, so being able to convert between them and find the gradient in each can be beneficial in problem-solving.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
663
Replies
33
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
702
  • Calculus and Beyond Homework Help
Replies
9
Views
378
  • Calculus and Beyond Homework Help
Replies
7
Views
742
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Advanced Physics Homework Help
Replies
12
Views
332
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Back
Top