# Div an curl in different coordinate systems

• Sunshine
In summary, to calculate the divergence and curl of a vector field in different coordinate systems, one can use various formulas and definitions such as the operator \nabla, the position vector, and the unit vectors in that particular coordinate system. The curl is not invariant under general coordinate transformations while the divergence is a scalar quantity.
Sunshine
To calculate the divergence of a vectorfield in cartesian coordinates, you can think of it as a dot product, and to calculate the curl, you can think of it as a cross product. But how can you calculate the div and curl when you have spherical or cylindrical coordinates, without explicitely converting them to the cartesian system?

For example the radial unity vector e_r = (sin a * cos b, sin a * sin b, cos a)
(standard: a = Theta, b = phi) should affect the curl and div by more than the scaling factor (h)

P.S Is it possible to use tex when writing a post?

Last edited:
I think a good starting point is to define the nabla operator as the operator $\nabla$ such that

$$df=\nabla f\cdot d\vec{r}$$

This allows us to recover easily the form of $\nabla$ in any coordinate system.

For exemple, in cylindrical coordinate: Consider a function $f = f(r,\theta,z)$.Then

$$df = \frac{\partial f}{\partial r}dr + \frac{\partial f}{\partial \theta}d\theta + \frac{\partial f}{\partial z }dz$$

and

$$d\vec{r} = \hat{r}dr + \hat{\theta}rd\theta + \hat{z}dz$$

So after messing around a bit you find that

$$df=\nabla f\cdot d\vec{r} \Leftrightarrow \nabla = \hat{r}\frac{\partial}{\partial r} + \frac{\hat{\theta}}{r}\frac{\partial}{\partial \theta}+ \hat{z}\frac{\partial}{\partial z }$$

quasar987 said:
$$d\vec{r} = \hat{r}dr + \hat{\theta}rd\theta + \hat{z}dz$$

So after messing around a bit you find that

$$df=\nabla f\cdot d\vec{r} \Leftrightarrow \nabla = \hat{r}\frac{\partial}{\partial r} + \frac{\hat{\theta}}{r}\frac{\partial}{\partial \theta}+ \hat{z}\frac{\partial}{\partial z }$$

Hm, shouldn't it be
$$d\vec{r} = \hat{r}dr + \mathbf{\dfrac{\hat{\theta}}{r}}d\theta + \hat{z}dz$$
if you divide with the scalefactor?

Otherwise the second equation would become
$$df=\nabla f\cdot d\vec{r} \Leftrightarrow \nabla = \hat{r}\frac{\partial}{\partial r} + \hat{\theta}r\frac{\partial}{\partial \theta}+ \hat{z}\frac{\partial}{\partial z }$$

I'm still not sure if I've got it right, but I'll think over this, and return with more questions if they arise. Thanks for the help :)

Sunshine said:
Hm, shouldn't it be
$$d\vec{r} = \hat{r}dr + \mathbf{\dfrac{\hat{\theta}}{r}}d\theta + \hat{z}dz$$
if you divide with the scalefactor?

Mmh.. the position vector in cylindrical coordinate is just $\vec{r}=r\hat{r}+z\hat{z}$. If you differentiate that with respect to an hypothetical variable t, you get

$$\frac{d\vec{r}}{dt} = \frac{dr}{dt}\hat{r}+r\frac{d\hat{r}}{dt}+\frac{dz}{dt}\hat{z}+\z\frac{d\hat{z}}{dt} = \frac{dr}{dt}\hat{r}+r\frac{d\hat{r}}{d\theta}\frac{d\theta}{dt}+\frac{dz}{dt}\hat{z}+0 = \frac{dr}{dt}\hat{r}+r\frac{d\theta}{dt}\hat{\theta}+\frac{dz}{dt}\hat{z}$$

And multiplying by dt gives $d\vec{r}$.

Sunshine said:
Otherwise the second equation would become
$$df=\nabla f\cdot d\vec{r} \Leftrightarrow \nabla = \hat{r}\frac{\partial}{\partial r} + \hat{\theta}r\frac{\partial}{\partial \theta}+ \hat{z}\frac{\partial}{\partial z }$$

You're right, my mistake

However my biggest problem remains.

Let's look at the position vector
$$\vec{r} = (r cos \theta, r sin \theta, z)$$

$$\frac{\partial \vec{r}}{\partial r} = (cos \theta, sin \theta, 0)$$

$$h_r = \sqrt{cos^2 \theta + sin^2 \theta} = 1$$

and according to the definition

$$\hat{r} = \frac{1}{h_r} \frac{\partial \vec{r}}{\partial r} = (cos \theta, sin \theta, 0)$$

the question is, which of the equations below are correct

$$\nabla \cdot \hat{r} = \nabla \cdot (1,0,0)$$
OR
$$\nabla \cdot \hat{r} = \nabla \cdot (cos \theta, sin \theta, 0)$$

...if I use the $$\nabla$$ that you gave for cylindrical coordinates.
If it's #1, would #2 apply if the $$\nabla$$ was defined on another way, i.e not as

$$\nabla = \hat{r}\frac{\partial}{\partial r} + \hat{\theta}r\frac{\partial}{\partial \theta}+ \hat{z}\frac{\partial}{\partial z }$$

Both

$$\nabla \cdot \hat{r} = \nabla \cdot (1,0,0)$$
AND
$$\nabla \cdot \hat{r} = \nabla \cdot (cos \theta, sin \theta, 0)$$

are correct, if you notice the distinction that in #1, (1,0,0) means $(r=1,\theta=0,z=0)$ (i.e. (1,0,0) represents the vector $\hat{r} = 1\hat{r}+0\hat{\theta}+0\hat{z}$), while in #2, $(cos\theta,sin\theta,0)$ means $(x=cos\theta,y=sin\theta,z=0)$ (i.e. represents the vector $\hat{r}=cos\theta \hat{x} + sin\theta \hat{y} + 0\hat{z}$

The base of $\mathbb{R}^3$ used in #1 is different than that used in #2. Therfor if you're going to take the dot product of either of them with nabla, you got to express nabla in the same base.

so you mean that
$$(\frac{\partial}{\partial x}, \frac{\partial}{\partial y},\frac{\partial}{\partial z }) \cdot (cos \theta, sin \theta, 0) = (\frac{\partial}{\partial r}, \frac{1}{r}\frac{\partial}{\partial \theta},\frac{\partial}{\partial z }) \cdot (1,0,0)$$

Well, I see that it's true in this case where both sides are zero but is it so for an arbitrary vector field?

And is curl similar?

Of course.Remember that the divergence of a vector field is a scalar wrt general coordinates transformations,so eveluating it in cartesian is no difference than eveluating it in cylindrical or spherical...

As for the curl,well,it gives a pseudotensor of a higher rank,so it's not invariant under general coordinate transformations...

Daniel.

I've turned those formulas upside down by now, and still very confused...

The thing is that I'm supposed to calculate $$\nabla \cdot \vec{e_x}$$ and $$\nabla \times \vec{e_x}$$ where $$\vec{e_x}$$ are the unit vectors with $$x = r, \rho, \theta, \phi$$ (cylindrical and spherical coordinates).
It means a total of 8 "questions" and all of them (!) becomes 0 if I use any of the equations in my last post (you always get 0 when differentiating a scalar)... that's why I've been suspecting that I'm supposed to use
$$\vec{e_r} = (cos \theta, sin \theta, 0)$$

$$\vec{e_{\theta}} = (-sin \theta, cos \theta, 0)$$

etc. and differentiate with respect to $$r, \theta, \phi ...$$

But that isn't the case...?

## 1. What is the definition of "divergence" and "curl" in different coordinate systems?

Divergence and curl are mathematical concepts used to describe the behavior of vector fields in three-dimensional space. Divergence measures the rate at which a vector field is expanding or contracting at a given point, while curl measures the rotation or circulation of the vector field around that point.

## 2. How do the formulas for divergence and curl change when using different coordinate systems?

The formulas for divergence and curl depend on the coordinate system being used. For example, in Cartesian coordinates, the formulas for divergence and curl involve partial derivatives with respect to the x, y, and z coordinates. In cylindrical coordinates, the formulas involve derivatives with respect to the radius, angle, and height coordinates. In spherical coordinates, the formulas involve derivatives with respect to the radius, inclination, and azimuth coordinates.

## 3. How is the concept of "divergence" related to the concept of "flux"?

Flux is the measure of the flow of a vector field across a surface. Divergence is closely related to flux, as it represents the net flow of the vector field out of or into a given point. In fact, the divergence theorem states that the flux of a vector field through a closed surface is equal to the volume integral of the divergence of that field over the enclosed region.

## 4. How can the concepts of "divergence" and "curl" be applied in real-world situations?

Divergence and curl have many applications in physics and engineering. For example, they are used in fluid dynamics to study the flow of fluids, in electromagnetism to describe the behavior of electric and magnetic fields, and in mechanics to analyze the motion of objects under the influence of forces. They can also be used to solve practical problems, such as calculating the flow of air around an airplane wing or determining the strength of an electric field around a charged particle.

## 5. Is it possible for a vector field to have both non-zero divergence and curl?

Yes, it is possible for a vector field to have both non-zero divergence and curl. This type of vector field is known as an "irrotational" field, as it has both expansion and rotation at every point. An example of an irrotational field is the electric field produced by a point charge, which has both a radial component (divergence) and a rotational component (curl).

• Introductory Physics Homework Help
Replies
3
Views
1K
• Introductory Physics Homework Help
Replies
5
Views
2K
• Introductory Physics Homework Help
Replies
3
Views
675
• Introductory Physics Homework Help
Replies
3
Views
3K
• Introductory Physics Homework Help
Replies
5
Views
2K
• General Math
Replies
5
Views
3K
• Introductory Physics Homework Help
Replies
5
Views
2K
• Calculus and Beyond Homework Help
Replies
33
Views
3K
• Introductory Physics Homework Help
Replies
5
Views
914
• Calculus and Beyond Homework Help
Replies
7
Views
719