Finding the gradient of a given function Given the function $\phi=B_0/r=B_0/\vert \mathbf{x}\vert$ in a spherical axisymmetric geometry, where $B_0$ is a constant. Find $\nabla\phi$.

The given answer is 
$$\phi=\frac{B_0}{r}=\frac{B_0}{\vert \mathbf{x}\vert}\implies \nabla\phi = -\frac{B_0\mathbf{x}}{\vert \mathbf{x}\vert^3}=-\frac{B_0\mathbf{e}_r}{r^2}$$
However I'm confused on how this implication has been achieved. 

I have attempted:
$$\nabla\phi = \frac{\partial \phi}{\partial x_i}\mathbf{x}_i = B_0\frac{\partial}{\partial x_i}\left(\frac{1}{\vert\mathbf{x}\vert}\right)\mathbf{x}_i=B_0\frac{\partial}{\partial x_i}\left((\sum_{i=1}^3 x_i^2)^{-1/2}\right)\mathbf{x}_i$$
But I have no idea how to find this derivative. Can anyone help?

1º Note that r=$\sqrt{x^2+y^2+z^2}$, then ∇ϕ=($\frac{∂}{∂x}\frac{B_0}{\sqrt{x^2+y^2+z^2}}$,$\frac{∂}{∂x}\frac{B_0}{\sqrt{x^2+y^2+z^2}}$,$\frac{∂}{∂x}\frac{B_0}{\sqrt{x^2+y^2+z^2}}$). 
2º$\frac{∂}{∂x}\frac{B_0}{\sqrt{x^2+y^2+z^2}}$=$-\frac{B_0}{2(\sqrt{x^2+y^2+z^2})^3} 2x$. 
3º ∇ϕ=($-\frac{B_0}{\sqrt{x^2+y^2+z^2})^3} x,-\frac{B_0}{\sqrt{x^2+y^2+z^2})^3} y,-\frac{B_0}{\sqrt{x^2+y^2+z^2})^3} z$)=$-\frac{B_0}{(\sqrt{x^2+y^2+z^2})^3}e_r$, onde $e_r$=(x,y,z)
