Laplace Equation Problem I’m trying to solve the Laplace Equation. First, we notice the problem is invariant under rotations prompting us to write
$$u(x) = \phi(|x|)$$
The part I don’t understand is where you substitute \phi(|x|) back into the original problem. I get how you find the partial derivatives of $u$ in terms of $\phi$, but how does one get the result
$$\Delta u(x)= \phi^{\prime \prime}  + \frac{n-1}{r} \phi ^\prime$$
I know that $\Delta u(x) = \sum_{i=1}^n \frac{\partial^2 u}{\partial x_i^2}$, but I don’t know how this helps. 

Note that if we have
$$
u(x)=\phi(|x|)
$$
then, away from $x=0$, we have
$$
\partial_{x_i}u(x)=u_{x_i}=\phi'(|x|)\frac{x_i}{|x|}
$$
Apply $\partial_{x_i}$ again to find 
$$
u_{x_i^2}=\phi''(|x|)\frac{x_i^2}{|x|^2}+\phi'(|x|)\frac{|x|-\frac{x_i^2}{|x|}}{|x|^2}\\
=\phi''(|x|)\frac{x_i^2}{|x|^2}+\phi'(|x|)\frac{1}{|x|}-\phi'(|x|)\frac{x_i^2}{|x|^3}\\
$$
by the chain, product and quotient rules. 
Then, summing over all of the $i$ to find the laplacian gives
$$
\Delta u=\frac{n}{|x|}\phi'(|x|)+\frac{\phi''(|x|)}{|x|^2}\sum_{i}x_i^2-\frac{\phi'(|x|)}{|x|^3}\sum_{i}x_i^2\\
=\frac{n}{|x|}\phi'(|x|)+\frac{\phi''(|x|)}{|x|^2}|x|^2-\frac{\phi'(|x|)}{|x|^3}|x|^2\\
=\frac{n-1}{r}\phi'(r)+\phi''(r)
$$
and the desired ode 
$$
\Delta u=0=\frac{n-1}{r}\phi'(r)+\phi''(r)\\
\implies 
\frac{\phi''(r)}{\phi'(r)}=\frac{1-n}{r}\\
\implies \log(\phi'(r))=\log r^{1-n}+C\implies \phi'(r)=C'\frac{1}{r^{n-1}}
$$
which we integrate again, leading us to
$$
\phi(r)=\begin{cases}C'\log(r)+D&\text{if}\;n=2\\
\frac{C'}{(2-n)r^{n-2}}+D&\text{otherwise}
\end{cases}
$$
