Gradient and divergence operators

In summary, this method of getting the gradient of polar coordinates works without the need to transform the coordinates first, but the divergence is expressed in terms of the Cartesian components of the vector differentiated with respect to the polar variables.
  • #1
Hiero
322
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
  • #2
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 Hiero
  • #3
Also: the coordinate vectors in polar coordinates are functions of position. The cartesian coordinate vectors are constant.
 
  • #4
@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.
 
  • #5
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.
 
  • #6
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:
  • #7
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?
 
  • #8
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)
 
  • #9
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?
 

1. What is the gradient operator?

The gradient operator is a mathematical operation that calculates the rate of change or slope of a scalar field at a particular point in space. It is represented by the symbol ∇ and is often used in vector calculus to find the direction of steepest ascent or descent of a function.

2. How is the gradient operator applied?

The gradient operator is applied to a scalar field, which is a function that assigns a single value to each point in space. By taking the gradient of a scalar field, we can determine the direction and magnitude of the greatest change in the field at a given point.

3. What is the divergence operator?

The divergence operator is a mathematical operation that measures the extent to which a vector field flows outward or inward from a particular point. It is represented by the symbol ∇· and is often used in vector calculus to analyze the behavior of vector fields.

4. How is the divergence operator used in physics?

In physics, the divergence operator is commonly used in the study of fluid dynamics and electromagnetism. It allows us to understand how fluids flow and how electric and magnetic fields behave in a given space. The divergence of a vector field can also be used to calculate the net flow of a quantity through a closed surface.

5. What is the relationship between the gradient and divergence operators?

The gradient and divergence operators are related in that the divergence of a gradient is always zero. This means that a scalar field's gradient is always perpendicular to its level curves, and the divergence of a vector field's gradient is always zero, indicating that the field is incompressible. Additionally, the gradient and divergence operators can be combined to form the Laplacian operator, which is used to describe the behavior of scalar fields in three-dimensional space.

Similar threads

Replies
3
Views
1K
Replies
6
Views
930
  • Special and General Relativity
Replies
14
Views
798
Replies
8
Views
240
Replies
6
Views
1K
  • Differential Geometry
Replies
9
Views
422
  • Calculus
Replies
6
Views
72
  • Calculus
Replies
29
Views
726
Replies
2
Views
296
Back
Top