How to obtain the gradient in polar coordinates

72.1k Views Asked by At

I'm not sure on how to find the gradient in polar coordinates. The thing that troubles me the most is how to find the unit vectors $\hat{r}$ and $\hat{\theta}$. My approach for the rest is expressing the partial derivatives in respect of $r$ and $\theta$ using the chain rule.

How can I get around solving this problem?

1

There are 1 best solutions below

3
On

The gradient operator in 2-dimensional Cartesian coordinates is $$ \nabla=\hat{\pmb e}_{x}\frac{\partial}{\partial x}+\hat{\pmb e}_{y}\frac{\partial}{\partial y} $$ The most obvious way of converting this into polar coordinates would be to write the basis vectors $\hat{\pmb e}_x$ and $\hat{\pmb e}_{y}$ in terms of $\hat{\pmb e}_{r}$ and $\hat{\pmb e}_{\theta}$ and write the partial derivatives $\frac{\partial}{\partial x}$ and $\frac{\partial}{\partial y}$ in terms of $\frac{\partial}{\partial r}$ and $\frac{\partial}{\partial \theta}$ using the chain rule.

enter image description here

So we have: $$ \begin{align} \hat{\pmb e}_{x}&=\cos\theta\, \hat{\pmb e}_{r}-\sin\theta\, \hat{\pmb e}_{\theta} \\ \hat{\pmb e}_{y}&=\sin\theta\, \hat{\pmb e}_{r}+\cos\theta\, \hat{\pmb e}_{\theta} \\ &\\ \frac{\partial}{\partial x}&=\frac{\partial r}{\partial x}\frac{\partial}{\partial r}+\frac{\partial\theta}{\partial x}\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} \end{align} $$ Observing that $r=\sqrt{x^2+y^2}$ and $\theta=\arctan\left(\frac{y}{x}\right)$, we have $$ \begin{align} \frac{\partial r}{\partial x}&=\cos\theta &\frac{\partial r}{\partial y}&=\sin\theta\\ \frac{\partial\theta}{\partial x}&=-\frac{\sin\theta}{r} & \frac{\partial\theta}{\partial y}&=\frac{\cos\theta}{r} \end{align} $$ and $$ \begin{align} \nabla&=\hat{\pmb e}_{x}\frac{\partial}{\partial x}+\hat{\pmb e}_{y}\frac{\partial}{\partial y}\\ &=(\cos\theta\, \hat{\pmb e}_{r}-\sin\theta\, \hat{\pmb e}_{\theta})\left(\frac{\partial r}{\partial x}\frac{\partial}{\partial r}+\frac{\partial\theta}{\partial x}\frac{\partial}{\partial \theta}\right)+(\sin\theta\, \hat{\pmb e}_{r}+\cos\theta\, \hat{\pmb e}_{\theta})\left( \frac{\partial r}{\partial y}\frac{\partial}{\partial r}+\frac{\partial\theta}{\partial y}\frac{\partial}{\partial \theta} \right)\\ &=\ldots\\ &=\hat{\pmb e}_{r}\frac{\partial }{\partial r}+\hat{\pmb e}_{\theta}\frac{1}{r}\frac{\partial }{\partial \theta}. \end{align} $$

This certainly gives the right answer, but there is a quicker way. Consider a function $f(\pmb r)$ in polar coordinates: this is a function $f(r,\theta)$. The small change in going from the point $\pmb r$ with coordinates $(r,\theta)$ to the point $\pmb r+\operatorname{d}\pmb r$ with coordinates $(r + \operatorname{d}r,\theta + \operatorname{d}\theta)$ is $$ \operatorname{d}f=\frac{\partial f}{\partial r}\operatorname{d}r+\frac{\partial f}{\partial \theta}\operatorname{d}\theta \tag 1 $$ Observe that $\operatorname{d}f=\operatorname{d}\pmb r\cdot \nabla f$ and $\operatorname{d}\pmb r=\operatorname{d}r\hat{\pmb e}_{r}+r\operatorname{d}\theta \hat{\pmb e}_{\theta}$. Suppose, then, that $$ \nabla f=\alpha\hat{\pmb e}_{r}+\beta \hat{\pmb e}_{\theta} $$ where $\alpha$ and $\beta$ are to be found. We get $$\operatorname{d}f=\operatorname{d}\pmb r\cdot \nabla f=\left(\operatorname{d}r\hat{\pmb e}_{r}+r\operatorname{d}\theta \hat{\pmb e}_{\theta}\right)\cdot\left(\alpha\hat{\pmb e}_{r}+\beta \hat{\pmb e}_{\theta}\right)=\alpha\operatorname{d}r+\beta r\operatorname{d}\theta \tag 2$$ because $\hat{\pmb e}_{r}\cdot\hat{\pmb e}_{r}=\hat{\pmb e}_{\theta}\cdot \hat{\pmb e}_{\theta}=1$ and $\hat{\pmb e}_{\theta}\cdot \hat{\pmb e}_{r}=0$. Comparing (1) and (2) we see that $\alpha=\frac{\partial f}{\partial r}$ and $\beta=\frac{1}{r}\frac{\partial f}{\partial \theta}$. Therefore, we get $$\nabla f=\hat{\pmb e}_{r}\frac{\partial f}{\partial r}+\hat{\pmb e}_{\theta}\frac{1}{r}\frac{\partial f}{\partial \theta}$$ and we can identify the gradient operator itself as $$ \nabla =\hat{\pmb e}_{r}\frac{\partial }{\partial r}+\hat{\pmb e}_{\theta}\frac{1}{r}\frac{\partial }{\partial \theta}. $$