- #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?
##\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: