# Surface integral over a sphere of inverse of distance

Let $S$ be a sphere in $\mathbb{R}^3$ of radius $r$ centered at the origin and $x_0\not\in S$. Let $f:\mathbb{R}^3\to\mathbb{R}$ be given by $f(x)=\Vert x-x_0\Vert$. I'm asked to compute the (surface) integral $$\int_S fdS$$ I think I have to separate this in the cases $\Vert x_0\Vert>r$ and $\Vert x_0\Vert<r$. For the former, we could use the divergence theorem and for the latter, try to show some kind of invariance and reduce the problem to the case where we have to integrate over a small sphere around $x_0$. However, I haven't been able to develop this ideas as I can't find suitable vector fields $F$ to work with them.

Any kind of help or suggestions are greatly appreciated.

• I am curious: is there more context to the question? I find it interesting, but the solution is somewhat unremarkable in the sense that there is nothing fascinating about it. It is merely technical. (This being said, nice work @Doug M!) – Kuifje Dec 1 '16 at 16:39

$\iint f(\mathbf x) |dS|$

Note that $\mathbf x \in \mathbb R^3$ or $\mathbf x = (x,y,z)$

$f(x) = \sqrt {(x-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}$

Lets do this in spherical

$x = \cos\theta\sin\phi\\ y = \sin\theta\sin\phi\\ z = \cos\phi$

$|dS|= \|(\frac {\partial x}{\partial\phi},\frac {\partial y}{\partial\phi},\frac {\partial z}{\partial\phi})\times(\frac {\partial x}{\partial\theta},\frac {\partial y}{\partial\theta},\frac {\partial z}{\partial\theta})\| = \sin\phi$

$f(x) = \sqrt {x^2 + y^2 + z^2 - 2xx_0 - 2yy_0 -2zz_0 + x_0^2 +y_0^2 + z_0^2}$ $f(x) = \sqrt {1 - 2\cos\theta sin\phi x_0 - 2\sin\theta\sin\phi y_0 -2\cos\phi z_0 + x_0^2 +y_0^2 + z_0^2}$

$\iint \sqrt {1 - 2\cos\theta \sin\phi x_0 - 2\sin\theta\sin\phi y_0 -2\cos\phi z_0 + x_0^2 +y_0^2 + z_0^2} \sin\phi \;d\phi\;d\theta$

The geometry of this is symmetric. We don't need to use the point $(x_0,y_0,z_0)$ the result will be the same regardless of the orientation of the point. All we need is the distance from the origin. $x_0, y_0 = 0, z_0=d$

$\iint \sqrt {1 - 2\cos\phi d + d^2} \sin\phi \;d\phi\;d\theta$

$u^2 = 1 - 2d\cos\phi + d^2\\ 2u\; du = 2 d\sin\phi\;d\phi$

$\int_0^{2\pi}\int_{d-1}^{d+1} \frac {u^2}{d} \;du\;d\theta$

Assuming $d>1$. I suppose I could say: $\int_0^{2\pi}\int_{|d-1|}^{|d+1|} \frac {u^2}{d} \;du\;d\theta$

$\frac 23 \pi (6d + \frac {2}{d})$ if $d>1$

Wich is the surface area times the distance to the center plus a little bit, and that little bit gets increasingly trivial as $d$ gets large.

$\frac 23 \pi (6 + 2d^2)$ if $d<1$

Again equals the surface area plus a little bit and tends to the surface area exactly if $d=0$

• So where does this get us? – Kuifje Nov 30 '16 at 22:12
• Needed to let the problem marinate. – Doug M Nov 30 '16 at 22:55
• Nice. I guess the main trick is to notice that you can set $x_0=y_0=0$ with no loss of generality. – Kuifje Dec 1 '16 at 16:41

I suspect there is a typo in the question, and that the function to integrate is $$f(x)=\frac{1}{||x-x_0||}$$ Indeed:

1. This is what the title of the question says
2. The exact same question was posted here.

In this case, using all of @Doug M's work: $$\boxed{ \iint_Sf(x)\; dS = \frac{1}{d}\int_0^{2\pi}\int_{|d-1|}^{|d+1|}dud\theta =\cases{\frac{4\pi}{d} \quad \mbox{if } d\ge1\\ 4\pi \quad \mbox{if } d<1 } }$$

• To be precise, @Doug M did all the work assuming the sphere had radius $r=1$. It is straightforward to adapt the calculations with any $r>0$. – Kuifje Dec 2 '16 at 4:40