Gradient of a differentiable function $\def\n{\nabla}\def\f{\frac}\def\b{\begin{pmatrix}}\def\e{\end{pmatrix}}\def\p{\partial}\def\l{\left(}\def\r{\right)}\def\v{\mathcal{V}}$
I have the vector field $\textbf{r} = (x,y,z)$ and $r = |\textbf{r}|=\sqrt{x^2+y^2+z^2}$
I want to prove that $\nabla f(r) = \cfrac{f^\prime(r)}{r}\textbf{r}$
Now I have $\nabla f(r) = \b \f{\p f}{\p x} \\ \f {\p f}{\p y}\\\f {\p f}{\p z}\e$
and working from the otherside, I have:
$\f {f^\prime{(r)}}{r} \textbf{r}=\b \f {xf^\prime (r)}{r} \\ \f {yf^\prime (r)}{r} \\ \f {zf^\prime (r)}{r} \e$
Which implies:
$$\b \f{\p f}{\p x} \\ \f {\p f}{\p y}\\\f {\p f}{\p z}\e = \b \f {xf^\prime (r)}{r} \\ \f {yf^\prime (r)}{r} \\ \f {zf^\prime (r)}{r} \e$$
and I can't see how this is true. Any ideas?
 A: Use the chain rule to evaluate $\frac{\partial f}{\partial x}$:
$$
\frac{\partial f}{\partial x}=\frac{\partial f}{\partial r}\frac{\partial r}{\partial x}=f'(r)\cdot \frac{2x}{2\sqrt{x^2+y^2+z^2}}=\frac{x\cdot f'(r)}{r}
$$
Similar logic holds for $\frac{\partial f}{\partial y}$ and $\frac{\partial f}{\partial z}$, so the equation in your last line holds.
A: If $f$ is a function of $u(x, y, z)$, the the gradient $\nabla f$ of $f$ is given by
$\nabla f((u(x, y, z)) = \dfrac{df}{du}(u(x, y, z) \nabla u, \tag{1}$
as follows readily from the chain rule:
$\dfrac{\partial f(u(x, y, z))}{\partial x} = \dfrac{f(u)}{du}(u(x, y, z)) \dfrac{\partial u}{\partial x}, \tag{2}$
with analogous formulas holding for the $y$ and $z$ components of $\nabla f(x, y, z)$.  In the present case,
$u(x, y, z) = r(x, y, z) = (x^2 + y^2 + z^2)^{1/2}, \tag{3}$
whence we have
$\dfrac{\partial u}{\partial x} = \dfrac{1}{2}(x^2 + y^2 + z^2)^{-1/2}(2x) = \dfrac{x}{(x^2 + y^2 + z^2)^{1/2}} = \dfrac{x}{r}, \tag{4}$
where we have again used the chain rule in computing $\partial u/\partial x$; analogous formulas hold for the $y$ and $z$ partial derivatives of $u$.  It follows that
$\nabla u = \begin{pmatrix} \dfrac{x}{r} \\ \dfrac{y}{r} \\ \dfrac{z}{r} \end{pmatrix} = \dfrac{\mathbf r}{r}, \tag{5}$
where
$\mathbf r = \begin{pmatrix} x \\ y \\ z \end{pmatrix}. \tag{6}$
Bringing together (1), (3), and (5) yields the desired result:
$\nabla f(r) = \dfrac{f'(r))}{r} \mathbf r. \tag{7}$
Of course, in the above we implicitly avoided that nasty point $r = 0$, i.e. $(x, y, z) = (0, 0, 0)$.
Hope this helps. Cheers,
and as always,
Fiat Lux!!!
A: We know;
\begin{align}
\frac{\p f}{\p x}=&\frac{\p f}{\p r}\frac{\p r}{\p x} \\
=&f'(r) (2x\cdot \frac{1}{2}(x^2 + y^2 +z^2)^{-1/2}) \\
=&f'(r)\frac{x}{r}
\end{align}
This solves your problem
A: Note that $$\nabla f(r)=f'(r)\nabla r$$ and $$2r\nabla r=\nabla r^{2}=\nabla(x^{2}+y^{2}+z^{2})=(2x,2y,2z)=2\text{r}$$ i.e. $\nabla r=\frac{1}{r}\text{r}$.
