Average distance from a point in a ball to a point on its boundary

3.4k Views Asked by At

What variety of methods are readily available to find the average distance from a point in $\{ (x,y,z) : x^2+y^2+z^2 \le r^2 \}$ to the point $(0,0,r)$?

I just worked this out and got $6r/5$.

Later postscript:

I initially was going to do this in spherical coordinates. Someone told me he wanted a way that could be presented to students who don't know spherical coordinates. I've up-voted the answer posted below that uses spherical coordinates and I've added my own, which avoids them.

end of later postscript

There's an obvious way to write it as a triply iterated integral (then divide that by the volume of the sphere). The innermost integral ended up as that of $\sec^3\theta\,d\theta$ times a function of the two outer variables. I didn't pursue it beyond that.

I found a way to express it as $\dfrac{\int_0^{2a} u f(u)\,du}{\int_0^{2a} f(u)\,du}$ where the denominator ends up as the volume of a sphere. That that integral did in fact evaluate to $4\pi r^3/3$ told me I was probably doing this right. It didn't look to me like any argument for establishing the volume of a sphere that I'd ever seen before.

What methods would others use for this problem? Is there some argument from more-or-less intuitive geometry? Or from principles of physics? Or slick ways to evaluate integrals instead of brute force? (I confess I haven't even tried spherical coordinates on this yet.)

I'll post my own answer below later. Maybe. Now I've posted my answer.

3

There are 3 best solutions below

0
On

Wlog $r=1$. The average is independent of the direction of the special point, so take the average over all directions: the answer is the mean distance between a random point on a sphere and a random point inside it. That distance depends only on how far away the point is from the centre. To calculate the mean distance between a specific point inside and the sphere, split the sphere into thin wedges joined together at the axis on which the point lies; then the mean distance is independent of the wedge. For each wedge it is the same as the distance in the plane between $(a,0)$ and the upper half of the unit circle (parametrized by $t$), weighted by $\sin t$: $$ \int_0^\pi \sqrt{(\cos t-a)^2+\sin^2t}\sin t\,dt = \frac23(3+a^2). $$

The answer is: $$ \frac1{4\pi} \frac{1}{4\pi/3}\int_0^1da\, 4\pi a^2\times 2\pi\times\frac{2(3+a^2)}{3} = \frac65. $$

1
On

The direct integration route isn't actually that bad, and obtains in fewer words the same triple integral computed by Kirill. We want to compute $\int_S dV \, |\hat{z}-\mathbf{r}|$ where $S$ is the sphere of radius $r$. By the law of cosines, we can write the separation as $$ |\hat{z}-\mathbf{r}| = \sqrt{r^2-2r \rho \cos\theta+\rho^2} $$ where $\theta$ is the azimuthal angle to $\mathbf{r}$ and $\rho=|\mathbf{r}|$. This gives the iterated integral $$ \int_S dV \, |\hat{z}-\mathbf{r}| = \int_{\rho=0}^r \int_{\phi=0}^{2\pi} \int_{\theta=0}^\pi d\rho \,d\phi \,d\theta\,\rho^2 \sin \theta \sqrt{r^2-2r \rho \cos\theta+\rho^2}.$$ But this is precisely the same integral performed by @Kirill in his answer.

1
On

One may say of course that "WLOG" we may assume $r=1$. But leaving $r$ as just $r$ enables us to check that everything is dimensionally correct, i.e. an expression purporting to be a volume is homogeneous of degree $3$ in $r$ and one purporting to be a distance is homogeneous of degree $1$, and in fact we will need to find an area, so that should be homogeneous of degree $2$.

Of course, if one does the problem with $1$ instead of $r$, then one merely multiplies all expressions by $1$, $r$, $r^2$, or $r^3$ according as one is dealing with a dimensionless quantity (e.g. an Euler characteristic), a distance, an area, or a volume.

The above works fine if the shapes don't change. With a torus generated by revolving a circle of radius $1$ about an axis located $r$ units from the center of the circle, the shape changes as $r$ changes, and finding things like the slope of the bitangent plane to the torus can give you non-homogeneous functions of $r$.

So down to business:

Let $0\le u\le 2r$. Let $f(u)$ be the area of the surface $$ \begin{align} \|(x,y,z)-(0,0,r)\| & = u, \\[4pt] \|(x,y,z)\| & \le r. \end{align} $$ Then the sought average is $$ \frac{\displaystyle\int_0^{2a} uf(u)\,du}{\displaystyle\int_0^{2a} f(u)\,du}, \tag 1 $$ and if the denominator doesn't come to $\dfrac 4 3 \pi r^3$, you'll know there's a mistake.

So how do we find $f(u)$? I did that by realizing that it's a surface of revolution about the $z$-axis. That means finding an integral, so, in view of the fact that we then find integrals in $(1)$ above, this does come down to an iterated integral, but doubly rather than triply. The area is $$ \int^{z\,:=\,\text{? ?}}_{z\,:=\,r-u} 2\pi x \sqrt{(dz)^2+(dx)^2} $$ where $x$ lies on a circle of radius $u$ centered at $(0,r)$ in the $xz$-plane. That means $$ \begin{align} x^2+(z-r)^2 & = u^2, \tag 2 \\[6pt] \text{so that} \quad 2x\,dx + 2(z-r)\,dz & = 0. \tag 3 \end{align} $$ Hence $$ \sqrt{(dx)^2 + (dz)^2} = \sqrt{\frac{(z-r)^2}{x^2}\,(dz)^2 + (dz)^2} = \frac{u}{\sqrt{u^2-(z-r)^2}}\,dz = \frac u x \, dz $$ where the first equality follows from $(3)$ and the second from $(2)$. Now we have $$ \begin{align} & \int^{z\,:=\,\text{? ?}}_{z\,:=\,r-u} 2\pi x \sqrt{(dz)^2+(dx)^2} \\[6pt] = {} & \int^{z\,:=\,\text{? ?}}_{z\,:=\,r-u} 2\pi x \frac u x \,dz \\[6pt] = {} & 2\pi u \int^{z\,:=\,\text{? ?}}_{z\,:=\,r-u} dz\qquad \text{(the Archimedes cancelation!)}. \tag 4 \end{align} $$ Now the upper bound of integration: Do a bit of high-school geometry and you see that it is $r-(u^2/(2r))$. Hence $$ [\text{the expression in }(4)] = 2\pi u\left( u - \frac{u^2}{2r} \right). $$ That, then, is $f(u)$.

Go back and evaluate $(1)$. The integrals are merely integrals of polynomials. You get $\dfrac{6r}5$.