Divergence in spherical coordinates.

1. Aug 6, 2013

yungman

I want to verify:
$$\vec A=\hat R \frac{k}{R^2}\;\hbox{ where k is a constant.}$$
$$\nabla\cdot\vec A=\frac{1}{R^2}\frac{\partial (R^2A_R)}{\partial R}+\frac{1}{R\sin\theta}\frac{\partial (A_{\theta}\sin\theta)}{\partial \theta}+\frac{1}{R\sin\theta}\frac{\partial A_{\phi}}{\partial \phi}$$
$$\Rightarrow\;\nabla\cdot\vec A=\frac{1}{R^2}\frac{\partial \left(R^2\frac{k}{R^2}\right)}{\partial R}= \frac{1}{R^2}\frac{\partial k}{\partial R}=0$$

2. Aug 6, 2013

HallsofIvy

I don't have any problem with that until the last part. What does $\partial k/\partial R$ mean? If "k" is the unit vector in the z direction, it is a constant, and any derivative of it is 0.

3. Aug 6, 2013

TheShrike

He defines $k$ as a constant. So $\frac{\partial k}{\partial R}$ is the partial derivative of $k$ with respect to the variable $R$ which is zero, as he gets.

4. Aug 6, 2013

yungman

Thanks, this is part of a problem in Electrodynamics where the solution manual claimed it is not zero. I just want to verify.

Thanks for the help.