Gradient and divergence operators

Click For Summary

Discussion Overview

The discussion revolves around the gradient and divergence operators in polar coordinates, exploring the transformation from Cartesian coordinates and the implications for both operators. Participants examine the mathematical identities involved and the differences in behavior between the gradient and divergence in polar systems.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants describe the process of deriving the gradient in polar coordinates from Cartesian forms, using specific identities for coordinate transformation.
  • Others note that while the gradient transformation appears to work correctly, the divergence does not yield the expected results, raising questions about the underlying reasons for this discrepancy.
  • A participant suggests that the divergence should also work but would require expressing the vector components in polar coordinates, indicating a need for careful transformation.
  • Another point raised is that the coordinate vectors in polar coordinates are functions of position, contrasting with the constant nature of Cartesian coordinate vectors.
  • Concerns are expressed regarding the dimensional correctness of the gradient expression, with some participants debating whether certain terms are dimensionless or have dimensions of inverse length.
  • There is a discussion about the notation used for unit vectors in polar coordinates, with some participants unfamiliar with the ##\hat r## notation and seeking clarification.

Areas of Agreement / Disagreement

Participants express differing views on the dimensionality of terms in the gradient expression and the appropriateness of the notation used for unit vectors. There is no consensus on the dimensional correctness of the gradient expression, and the discussion on the divergence remains unresolved.

Contextual Notes

The discussion highlights the complexity of transforming vector operators between coordinate systems and the potential pitfalls in dimensional analysis. There are unresolved questions regarding the transformation of vector components and the implications of coordinate dependence.

Hiero
Messages
322
Reaction score
68
One way to get the gradient of polar coordinates is to start from the Cartesian form:

##\nabla = \hat x \frac{\partial}{\partial x} + \hat y \frac{\partial}{\partial y}##

And then to use the following four identies:

##\hat x = \hat r\cos\theta - \hat{\theta}\sin\theta##

##\hat y = \hat r\sin\theta + \hat{\theta}\cos\theta##

##\frac{\partial}{\partial x} = \frac{\partial r}{\partial x}\frac{\partial}{\partial r}+\frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta}=\cos\theta \frac{\partial}{\partial r}-\frac{\sin\theta}{r}\frac{\partial}{\partial \theta}##

##\frac{\partial}{\partial y} = \frac{\partial r}{\partial y}\frac{\partial}{\partial r}+\frac{\partial \theta}{\partial y}\frac{\partial}{\partial \theta}=\sin\theta \frac{\partial}{\partial r}+\frac{\cos\theta}{r}\frac{\partial}{\partial \theta}##

Plugging those in correctly gives ##\nabla = \hat r \frac{\partial}{\partial r} + \frac{1}{r}\hat{\theta} \frac{\partial}{\partial \theta}##

But when put the latter 2 identities in the equation of the divergence operator ##\nabla ⋅ = \frac{\partial}{\partial x} + \frac{\partial}{\partial y}## we do not get the correct result.

I did the same technique in spherical coordinates (I know, I have too much time) and it also gave the correct gradient but of course the divergence comes out wrong again.

Why does this trick work for the gradient but not the divergence?
 
Last edited:
Physics news on Phys.org
Hiero said:
One way to get the gradient of polar coordinates is to start from the Cartesian form:

##\nabla = \hat x \frac{\partial}{\partial x} + \hat y \frac{\partial}{\partial y}##

And then to use the following four identies:

##\hat x = \hat r\cos\theta - \hat{\theta}\sin\theta##

##\hat y = \hat r\sin\theta + \hat{\theta}\cos\theta##

##\frac{\partial}{\partial x} = \frac{\partial r}{\partial x}\frac{\partial}{\partial r}+\frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta}=\cos\theta \frac{\partial}{\partial r}-\frac{\sin\theta}{r}\frac{\partial}{\partial \theta}##

##\frac{\partial}{\partial y} = \frac{\partial r}{\partial y}\frac{\partial}{\partial r}+\frac{\partial \theta}{\partial y}\frac{\partial}{\partial \theta}=\sin\theta \frac{\partial}{\partial r}+\frac{\cos\theta}{r}\frac{\partial}{\partial \theta}##

Plugging those in correctly gives ##\nabla = \hat r \frac{\partial}{\partial r} + \frac{1}{r}\hat{\theta} \frac{\partial}{\partial \theta}##

But when put the latter 2 identities in the equation of the divergence operator ##\nabla ⋅ = \frac{\partial}{\partial x} + \frac{\partial}{\partial y}## we do not get the correct result.

I did the same technique in spherical coordinates (I know, I have too much time) and it also gave the correct gradient but of course the divergence comes out wrong again.

Why does this trick work for the gradient but not the divergence?

It should work for divergence as well, except it will give you an expression for the divergence in terms of the Cartesian components of the vector differentiated with respect to the polar variables. If we take a vector ##\vec{A} = (A_x, A_y)##, then you will get something like:

##\vec{\nabla} \cdot \vec{A} = \cos \theta \frac{\partial A_x}{\partial r} \dots##

But, normally you want the divergence expressed in terms derivatives of the vector components in polar coordinates:

##\vec{\nabla} \cdot \vec{A} = \frac{1}{r} \frac{\partial}{\partial r}(rA_r) \dots##

To do this, you also have to transform the components of ##\vec{A}## from Cartesian to Polar.

Gradient operates on a scalar function, so there is no component transformation to complicate things. Although, of course, you still have to transform the scalar function into a function of the polar coordinates, which is implicit in the formula for gradient in polar coordinates.
 
  • Like
Likes   Reactions: Hiero
Also: the coordinate vectors in polar coordinates are functions of position. The cartesian coordinate vectors are constant.
 
@PeroK Thanks! Makes too much sense!

Another point is that it’s wrong to leave off the operands for divergence because, for instance, ∂/∂r acts on two different components, so we can’t factor it together like we did for the gradient.

To be overly explicit about what’s happening:

##\nabla \vec A = \frac{\partial}{\partial x} A_x(r(x,y),\theta(x,y)) + \frac{\partial}{\partial y} A_y(r(x,y),\theta(x,y))##

##= \Big( \frac{\partial r(x,y)}{\partial x} \frac{\partial }{\partial r} A_x(r,\theta)+ \frac{\partial\theta (x,y)}{\partial x}\frac{\partial }{\partial \theta}A_x(r,\theta)\Big) + \Big( \frac{\partial r(x,y)}{\partial y} \frac{\partial }{\partial r}A_y(r,\theta) + \frac{\partial\theta (x,y)}{\partial y}\frac{\partial }{\partial \theta}A_y(r,\theta)\Big)##

Which would be true for any change of coordinates. If we use the polar specific identities (such as ##A_x = A_r\cos\theta - A_{\theta}\sin\theta ##, and 3 more) then it indeed comes out correct.

Thanks for the clarification.
 
Hiero said:
Plugging those in correctly gives ##\nabla = \hat r \frac{\partial}{\partial r} + \frac{1}{r}\hat{\theta} \frac{\partial}{\partial \theta}##
The expression is dimensionally incorrect - the first term is non-dimensional, while the second has dimension 1/length.
 
mathman said:
The expression is dimensionally incorrect - the first term is non-dimensional, while the second has dimension 1/length.
Uhh... how is d/dr non-dimensional? That’s also inverse length, isn’t it?

(##\hat r## is non-dimensional since it’s normalized.)
(Maybe ##\hat e_r## is preferable notation.)
 
Last edited:
Hiero said:
Uhh... how is d/dr non-dimensional? That’s also inverse length, isn’t it?

(##\hat r## is non-dimensional since it’s normalized.)
(Maybe ##\hat e_r## is preferable notation.)
##\hat r## is normalized by what?
 
mathman said:
##\hat r## is normalized by what?
By definition! It’s a unit vector! I didn’t define it because I thought this “hat” notation is very common for unit vectors?

Any unit vector ##\hat u## is dimensionless by virtue of the definition: ##\hat u ≡ \vec u/|\vec u|##

For a 2D cartesian basis the commonly taught notation is ##\hat i## and ##\hat j##
For a polar basis I like to call the basis vectors ##\hat r## and ##\hat \theta##

Wolfram-mathworld also uses this notation for the polar basis:
http://mathworld.wolfram.com/PolarCoordinates.html
(Equations 20 and 21)
 
I wasn't familiar with use of the ##\hat r## notation.
 
  • #10
pasmith said:
Also: the coordinate vectors in polar coordinates are functions of position. The cartesian coordinate vectors are constant.
Not sure I get it. Can you expand?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
16
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K