Divergence in sphecical coordinates I read in wikipedia, 
$$
\nabla\vec{V}=\frac{1}{r^2}\frac{\partial (Vr^2)}{\partial r}+\frac{1}{r\sin\phi}\frac{\partial V}{\partial \theta}+\frac{1}{r\sin\phi}\frac{\partial(V\sin\phi)}{\partial\phi} .
$$
My objective was to obtain it from its cartesian equivalent. I really don't know where I'm doing wrong: I took the partial derivatives I isolated the partial derivates of $V$ with respect to $x,y,$ and $z$, and then I had
\begin{align}
\frac{\partial V}{\partial x}
&=-\sin\phi \sin\theta \frac{\partial V}{\partial r} + \frac{\sin\theta}{r\sin\phi} \frac{\partial V}{\partial \theta} - \frac{\cos\theta\cos\phi}{r}\frac{\partial V}{\partial \phi},
\\
\frac{\partial V}{\partial y}
&=-\sin\theta \sin\phi \frac{\partial V}{\partial r}-\frac{\cos\theta }{r\sin\theta}\frac{\partial V}{\partial \theta}-\frac{\sin\theta \cos\phi}{r} \frac{\partial V}{\partial \phi},
\\
\frac{\partial V}{\partial z}
&=\phantom{-}\cos\phi \frac{\partial V}{\partial r}-\frac{\sin\phi}{r}\frac{\partial V}{\partial \phi}.
\end{align}
I'm not sure how to get to the expression above from the ones that I have, thanks in advance.
 A: In Cartesian Coordinates, the Divergence of a vector $\vec V$ is 
$$\nabla \cdot \vec V=\frac{\partial V_x}{\partial x}+\frac{\partial V_y}{\partial y}+\frac{\partial V_z}{\partial z}$$
We can express the Cartesian components of $\vec V$ in terms of the spherical coordinate components by the relationships by equating $\hat xV_x+\hat yV_y+\hat zV_z=\hat rV_r+\hat \theta V_\theta+\hat \phi V_\phi$ and taking inner products of both sides with the Cartesian unit vectors.  Proceeding we find
$$\begin{align}
V_x&=\sin(\theta)\cos(\phi)V_r+\cos(\theta)\cos(\phi)V_\theta-\sin(\phi)V_\phi\\\\
V_y&=\sin(\theta)\sin(\phi)V_r+\cos(\theta)\sin(\phi)V_\theta+\cos(\phi)V_\phi\\\\
V_z&=\cos(\theta)V_r-\sin(\theta)V_\theta
\end{align}$$
In addition, we have from the chain rule 
$$\begin{align}
\frac{\partial }{\partial x}&=\frac{\partial r}{\partial x}\frac{\partial }{\partial r}+\frac{\partial \theta}{\partial x}\frac{\partial }{\partial \theta}+\frac{\partial \phi}{\partial x}\frac{\partial }{\partial \phi}\\\\
&=\sin(\theta)\cos(\phi)\frac{\partial }{\partial r}+\frac{\cos(\theta)\cos(\phi)}{r}\frac{\partial }{\partial \theta}-\frac{\sin(\phi)}{r\sin(\theta)}\frac{\partial }{\partial \phi}\\\\
\frac{\partial }{\partial y}&=\frac{\partial r}{\partial y}\frac{\partial }{\partial r}+\frac{\partial \theta}{\partial y}\frac{\partial }{\partial \theta}+\frac{\partial \phi}{\partial y}\frac{\partial }{\partial \phi}\\\\
&=\sin(\theta)\sin(\phi)\frac{\partial }{\partial r}+\frac{\cos(theta)\sin(\phi)}{r}\frac{\partial }{\partial \theta}+\frac{\cos(\phi)}{r\sin(\theta)}\frac{\partial }{\partial \phi}\\\\
\frac{\partial }{\partial z}&=\frac{\partial r}{\partial z}\frac{\partial }{\partial r}+\frac{\partial \theta}{\partial z}\frac{\partial }{\partial \theta}+\frac{\partial \phi}{\partial z}\frac{\partial }{\partial \phi}\\\\
&=\cos(\theta)\frac{\partial }{\partial r}-\frac{\sin(\theta)}{r}\frac{\partial }{\partial \theta}
\end{align}$$
Can you proceed now?
