Let $B_R(0)$ be a ball in $\mathbb R^3 $ and define
$$u(x)=\int_{B_R(0)}\frac{1}{|y-x|}dy$$
Prove that
$$ u(x) = \begin{cases} \frac{2}{3}\pi(3R^2-|x|^2) & \quad \text{for $0 \le|x|\le R$ }\\[8pt] \frac{4}{3}\pi \frac{R^3}{|x|} & \quad \text{for |x|>R} \end{cases}$$
My attempt:
For $|x| \le R$, I found that the function $w(x)=\frac{2}{3}\pi(3R^2-|x|^2)$ solves $\Delta w=-4\pi$, and $w(x)=\frac{4}{3}\pi R^2$ on $\partial B_R(0)$.
Therefore I can use the Green's representatio formula in a ball to get $w(x)=\int_{B_R(0)}\frac{1}{|y-x|}dy$, then I am done.
Green's function says $w(x)=\int_{\partial B_{R(0)}}(\frac{4}{3}\pi R^2)(\frac{\partial G}{\partial v})\ ds(y)+\int_{ B_{R(0)}}(-4\pi)G(x,y)\ dy$.
By $\int_{\partial B_{R(0)}}(\frac{\partial G}{\partial v})=1$,
I have $w(x)=\frac{4}{3}\pi R^2+\int_{ B_{R(0)}}(-4\pi)G(x,y)\ dy$
Plug in the formula of $G(x,y)$ in a ball.
Then $w(x)=\frac{4}{3}\pi R^2+\int_{ B_{R(0)}}(-4\pi)(\frac {1}{-4\pi |x-y|}+\frac{1}{-4\pi ||x|(y-\frac{R^2}{|x|^2}x)|}{})\ dy=\int_{B_R(0)}\frac{1}{|y-x|}dy+\frac{4}{3}\pi R^2-\int_{ B_{R(0)}}\frac{1}{ ||x|(y-\frac{R^2}{|x|^2}x)|}{})\ dy$
I have been working on this for a night and a day and I don't know what to do next? Anyone know about this? Please help me. Thanks so much!
The Last part of the equation $\int_{ B_{R(0)}}\frac{1}{ ||x|(y-\frac{R^2}{|x|^2}x)|}{})\ dy$ is harmonic with respect to $x$. By the Mean Value Property, I can calculate it as $\frac{4}{3}\pi R^3 \frac{1}{R}$. So it cancelled out and I am done.