Easy question about divergence in cylindrical coordinates

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 8K views
EricVT
Messages
165
Reaction score
6
Consider a cylindrical shell so that the cross sectional radius is some constant a.

In the first term of the divergence expression in cylindrical coordinates:

[tex]\frac{1}{r}\frac{\partial}{\partial r}(rA_{r})[/tex]

When I multiply the radial component by r, do I go ahead and substitute r=a before I take the derivative with respect to r or do I substitute r=a after I take the derivative with respect to r?

Thanks a lot.
 
Physics news on Phys.org
Well for example, I have the A_r component of my vector:

[tex]A_{r}=Pcos\theta[/tex]

And r=a is constant.

So if I do the divergence by multiplying A_r by r and then taking the derivative with respect to r, I get that that the first term is:

[tex]\frac{1}{r}\frac{\partial}{\partial r}(rA_{r}) = \frac{1}{r}\frac{\partial}{\partial r}(rPcos\theta) = \frac{Pcos\theta}{r}[/tex]

And then evaluate at r=a.

However, if I put in r=a before taking the derivative then I get:

[tex]\frac{1}{r}\frac{\partial}{\partial r}(rA_{r}) = \frac{1}{r}\frac{\partial}{\partial r}(aPcos\theta) = 0[/tex]

Which way is correct?
 
EricVT said:
Well for example, I have the A_r component of my vector:

[tex]A_{r}=Pcos\theta[/tex]

And r=a is constant.

So if I do the divergence by multiplying A_r by r and then taking the derivative with respect to r, I get that that the first term is:

[tex]\frac{1}{r}\frac{\partial}{\partial r}(rA_{r}) = \frac{1}{r}\frac{\partial}{\partial r}(rPcos\theta) = \frac{Pcos\theta}{r}[/tex]

And then evaluate at r=a.

However, if I put in r=a before taking the derivative then I get:

[tex]\frac{1}{r}\frac{\partial}{\partial r}(rA_{r}) = \frac{1}{r}\frac{\partial}{\partial r}(aPcos\theta) = 0[/tex]

Which way is correct?

I was backing and forthing on this and finally deleted my post because I was second-guessing things. I believe the correct thing to do is to differentiate first and then evaluate at r = a . If you set r = a first, you set certain terms constant which will seem to have zero derivative, but don't in fact. Seeing your example satisfied me as to this point. So I'm reasonably sure your first result is the correct one.