Help in proving that $\nabla\cdot (r^n \hat r)=(n+2)r^{n-1}$ 
Show that$$\nabla \cdot  (r^n \hat r)=(n+2)r^{n-1}$$  where $\hat r$ is the unit vector along $\bar r$.

Please give me some hint. I am clueless as of now.
 A: You may want to use $\vec{\nabla}\cdot$ in spherical coordinates. We have
$$\vec{\nabla} \cdot \vec{A} = \dfrac1{r^2} \dfrac{\partial (r^2 A_r)}{\partial r} + \dfrac1{r \sin(\theta)} \dfrac{\partial(A_{\theta} \sin(\theta))}{\partial \theta} + \dfrac1{r\sin(\theta)} \dfrac{\partial(A_{\phi})}{\partial \phi}$$
In your case, $\vec{A} = r^n \hat{r}$. Hence, $A_r = r^n$, $A_{\theta} = A_{\phi} = 0$. Now conclude what you want by computing the derivatives.
A: You can also use Cartesian coordinates and using the fact that $r \hat{r} = \vec{r} = (x,y,z)$.
\begin{align}
r^n \hat{r} &= r^{n-1} (x,y,z) \\
\nabla \cdot r^n \hat{r} & = \partial_x(r^{n-1}x) + \partial_y(r^{n-1}y) + \partial_z(r^{n-1}z) 
\end{align}
Each term can be calculated:
$\partial_x(r^{n-1}x) = r^{n-1} + x (n-1) r^{n-2} \partial_x r$
$\partial_x r = \frac{x}{r}$. (Here, I used the fact that $r = \sqrt{x^2+y^2+z^2}$.)
The terms involving $y$ and $z$ are exactly the same with $y$ and $z$ replacing $x$.
And so,
\begin{align}
\nabla \cdot r^n \hat{r}& = r^{n-1} + x(n-1)r^{n-2}\frac{x}{r} + r^{n-1} + y(n-1)r^{n-2}\frac{y}{r} + r^{n-1} + z(n-1)r^{n-2}\frac{z}{r}\\
& = 3r^{n-1}+(n-1)(x^2 + y^2 + z^2)r^{n-3} \\
& = 3r^{n-1} + (n-1)r^2 r^{n-3} \\
& = (n+2)r^{n-1}
\end{align}
Of course, polar is the easiest :)
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\color{#0000ff}{\large\nabla\cdot\pars{r^{n}\,\hat{r}}}
&=
\nabla\cdot\pars{r^{n - 1}\vec{r}}
=
\nabla\pars{r^{n - 1}}\cdot\vec{r} + r^{n - 1}\nabla\cdot\vec{r}
=
\bracks{\totald{r^{n - 1}}{r}\,{\vec{r} \over r}}\cdot\vec{r}
+ r^{n - 1}\times 3
\\[3mm]&=
\pars{n - 1}r^{n - 2}\,{r^{2} \over r} + 3r^{n - 1}
=
\color{#0000ff}{\large\pars{n + 2}r^{n - 1}}
\end{align}

We have used the identities:
$$
\nabla\cdot\pars{\varphi\vec{A}}
= \nabla\varphi\cdot\vec{A} + \varphi\nabla\cdot\vec{A}\,,\qquad
\nabla\fermi\pars{r} = \totald{\fermi\pars{r}}{r}\,{\vec{r} \over r}\,,\qquad
\nabla\cdot\vec{r} = 3
$$

