Is the divergence invariant by change of coordinates?

352 Views Asked by At

According to the integral definition of divergence $$ \text{div}E=\lim_{|V|\to0}\int_VE\cdot\nu $$ it seems natural to say that is invariant by change of coordinates. To double-check this, i tried to see if it works in the simplest case. Take in $\mathbb{R}^2$ a general vector field $$ A_1(x,y)\partial_x+A_2(x,y)\partial_y $$ Changing into polar coordinate we have $$ A_1(r\cos\theta,r\sin\theta)\left(\cos\theta\partial_r-\frac{\sin\theta }{r}\partial_\theta\right)+A_2(r\cos\theta,r\sin\theta)\left(\sin\theta\partial_r+\frac{\cos\theta }{r}\partial_\theta\right) $$ so that the coefficients become $$ A_r=A_1(r\cos\theta,r\sin\theta)\cos\theta+A_2(r\cos\theta,r\sin\theta)\sin\theta $$ and $$ A_\theta=\frac{1}{r}\left(-A_1(r\cos\theta,r\sin\theta)\sin\theta+A_2(r\cos\theta,r\sin\theta)\cos\theta\right). $$ After direct calculation, we see that $$ \partial_r A_r+\partial_\theta A_\theta=\partial_x A_1+\partial_y A_2-\frac{1}{r}(A_1\cos\theta+A_2\sin\theta)$$ and according to this formula the divergence is not invariant under change to polar coordinates. Is this true or my calculations are wrong at some point? Any help is very appreciated.