I'm given the vector:
$$\vec{V}{(r,θ,z)}=\frac{1}{r}\hat{e_r} + (r\cosθ)\hat{e_θ}+\frac{z^2}{r^2}\hat{e_z}$$
I want the scalar product ${\vec{\nabla}}\cdot{\vec{V}}$
We know that in cylindrical coordinates : $$\vec{\nabla}=\left<\frac{\partial}{\partial r},\frac{1}{r}\frac{\partial}{\partial θ},\frac{\partial}{\partial z} \right>$$
So , the product should be $${\vec{\nabla}}\cdot{\vec{V}} =\frac{\partial}{\partial r}\left(\frac{1}{r}\right) + \frac{1}{r}\frac{\partial}{\partial θ}(r\cosθ)+\frac{\partial}{\partial z}\left(\frac{z^2}{r^2}\right) = -\frac{1}{r^2}-\sinθ +\frac{2z}{r^2}$$
However , in the answers , the answer given is this : $${\vec{\nabla}}\cdot{\vec{V}}=\frac{1}{r}\Big\{\frac{\partial}{\partial r}(1)+\frac{\partial}{\partial θ}(r\cosθ)+\frac{1}{r}\frac{\partial}{\partial z}(z^2)\Big\}=-\sinθ+\frac{2z}{r^2}$$
I don't understand why $\frac{1}{r}$ was factored out and how is that possible. I understand you can factor it out for the partial derivative with respect to $θ$ and $z$ but in the first one, which is with respect to $r$, it shouldn't be factored out, it should be differentiated. Any thoughts? Am I missing something or is there a typo in the answers?
\sin
(example $\sin(x)$) as opposed tosin
(example $sin(x)$). Math functions need to be upright characters to distringuish them from variables that are slanted. $\endgroup$