# Gradient in polar coords using tensors

1. Oct 22, 2012

### ohmymymymygod

Using tensors, I'm supposed to find the usual formula for the gradient in the covariant basis and in polar coordinates. The formula is $\vec{grad}=[\frac{\partial}{\partial r}]\vec{e_{r}}+\frac{1}{r}[\frac{\partial}{\partial \vartheta}]\vec{e_{\vartheta}}$ where $\vec{e_{r}}$ and $\vec{e_{\vartheta}}$ are the covariant basis vectors.

In the contravariant basis with $\vec{e^{r}}$ and $\vec{e^{\vartheta}}$ , we know that $\vec{grad}=[\frac{\partial}{\partial x^{i}}] \vec{e^{i}}$. But from index gymnastics, $\vec{e^{i}}=g^{ij}\vec{e_{j}}$. So $\vec{grad}=[\frac{\partial}{\partial x^{i}}]g^{ij}\vec{e_{j}}$.

In polar coordinates, the inverse metric tensor is $g^{11} = 1, g^{12}=g^{21}=0, g^{22} = \frac{1}{r^{2}}$.

So this gives $\vec{grad}=[\frac{\partial}{\partial r}]\vec{e_{r}}+\frac{1}{r^{2}}[\frac{ \partial}{\partial \vartheta}]\vec{e_{\vartheta}}$. And lo and behold, this is wrong.

2. Oct 22, 2012

### oli4

Hi,
the gymnastics you are talking about allow you to raise or lower indices of a tensor, but in this case what you want to do is express the gradient in different coordinates which is a different matter.

3. Oct 22, 2012

### ohmymymymygod

I'm not using the raising/lowering indices operations to switch from rectangular to polar coordinates, I'm using them to switch, in polar coordinates, from a contravariant basis to a covariant basis.

Actually, I think I know what I got wrong. The correct formula is $\vec{grad}=[\frac{\partial}{\partial r}]\hat{r}+\frac{1}{r}[\frac{\partial}{\partial \vartheta}]\hat{\vartheta}$. The vectors $\hat{r}$ and $\hat{\vartheta}$ are unit vectors, while $\vec{e_{r}}$ and $\vec{e_{\vartheta}}$ aren't unit vectors. But I can write $\vec{e_{j}}=\hat{u_{j}}||\vec{e_{j}}||=\hat{u_{j}}\sqrt{g_{jj}}$, with $\hat{u_{j}}$ a unit vector.

Then the formula for the gradient becomes $\vec{grad}=[\frac{\partial}{\partial x^{i}}]g^{ij}\sqrt{g_{jj}}\vec{u_{j}}$ which I think is more right. (The r factor in √g22 compensates the 1/r2 in g22 for the correct 1/r.) But the indices don't seem to balance out in the way they are supposed to in the Einstein notation...