# Definite solution for the mean distance from an external point to the surface of a sphere.

Sphere, radius $E$, is centred at point $O$ $[0,0,0]$.

External point $Q$ is at $[D,0,0]$.

I can slice the sphere by making multiple planar cuts parallel to the $YZ$ plane to produce circular zones (quasi-discs) of equal infinitessimal width $dx$ and position $x_i$. The curved surface of each zone has the same surface area. The radius $R_i$ of any zone $i$ lies in the $YZ$ plane and has magnitude: $R_i = \sqrt{E^2 - x_i^2} .$

The distance $L_i$ from point $Q$ to any point $P_i$ in the zone $i$ is given by:- $$L_i = \sqrt{ (D-x_i)^2 + R_i^2} = \sqrt{ D^2 -2Dx_i + x_i^2 + E^2 - x_i^2} = \sqrt{ D^2 -2Dx_i + E^2 }$$ $$L_i = D \sqrt{ 1 -\frac{2x_i}{D} + \frac{E^2}{D^2} }.$$

Now I wish to integrate this expression over the range $-E\cdots+E$ and then divide by $2E$ to obtain the average value $\bar{L}$ thus

$$\bar{L} = \frac{D}{2E} \int_{-E}^{+E} \sqrt{ 1 -\frac{2x_i}{D} + \frac{E^2}{D^2} } dx.$$

I can make a Taylor Series approximation of the square root term using the standard formula $(1+x)^{0.5} = 1 + x/2 - x^2/8 + x^3/16 -\cdots$

Applying this to the square root term I obtain $$\sqrt{ 1 -\frac{2x_i}{D} + \frac{E^2}{D^2} } = 1-x_i/D + (1/2)E^2/D^2 -(1/2)x_i^2/D^2 + (1/2)x_iE^2/D^3 + \cdots$$ where the subsequent terms on the RHS diminish in magnitude. By dropping terms with odd powers of $x_i$ (because they will go to zero when integrating over the range $-E \le x_i \le +E$ ) and consolidating and integrating I come up with the following approximate result:-

$$\bar{L} = \frac{D}{2E} \int_{-E}^{+E} \sqrt{ 1 -\frac{2x_i}{D} + \frac{E^2}{D^2} } dx \approx D\left(1 + \frac{E^2}{3D^2} + A\right)$$ where A is a small term whose expression depends on the number of terms evaluated in the Taylor series approximation. From numerical modelling it appears plausible that the term $A$ vanishes if the Taylor Series is extended to infinite terms and thus the definite solution would be given by:-

$$\bar{L} = D\left(1 + \frac{E^2}{3D^2} \right) = D + \frac{E^2}{3D}$$

MY QUESTION

Is there a way to derive a definite solution to this problem?

• It seems you are close to getting an exact expression for your average as a definite integral, and once that is done it may be possible to attack the resulting definite integral using a trig substitution (at first glance it looks like you'll have a quadratic at worst under a squareroot). Maybe you could add the definite integral version at least (before using series on it, etc). Commented Jun 26, 2015 at 18:28
• It's not clear that with your integrated series as a representation of the integral that you will get convergence to the first two terms as the final answer, at least not according to the couple times I've gone through your presentation. If you'd like a definite answer, either solve the original integral through perhaps substitution as suggested by another comment, or integrate term by term in your full series and see if you can come up with a closed form for the arising integrated series. Commented Jun 26, 2015 at 18:36
• My comment above in fact leads to an elliptic integral. If the sphere has radius $1$ center the origin, and the sphere is parametrized by $x=\sin t \cos \theta,$ $y=\sin t \sin \theta,$ and $z=\cos t,$ where $t \in [0,\pi]$ and $\theta \in [0, 2\pi]$, then taking the external point at $(0,0,z)$ where $z>1$ leads to the integral of $\sqrt{k^2+1-2k \cos t}$ for $t$ from $0$ to $\pi.$ Looking this up in an integral table gives an answer in terms of an elliptic function. [So unfortunately not a "nice" closed form..] Commented Jun 26, 2015 at 20:05
• @coffeemath thanks, I have found a standard formula for the integral of $(ax +b)^{(p/n)}$ and will try that for now. Elliptic integrals are beyond my ability. Commented Jun 26, 2015 at 20:19
• Oops... the squareroot in the previous comment has to be multiplied by the surface area element in the chosen spherical coordinates before doing the integral. This might make it come out easier, or not, I haven't worked that out. But I wonder whether in your chosen rectangular version of the average distance: Should there be some kind of surface area element for the sphere in that case also? (The sphere is tilted at various angles so some "rings" count more than others.) Commented Jun 26, 2015 at 21:22

To complete the spheric coordinate computation, recall working with the unit sphere center origin, radius $1$ [this can be rescaled to fit the more general sphere radius]. And let the point outside the sphere be $P=(0,0,k)$ where $k>1$ ensures it is outside the sphere. The distance from any point $(x,y,z)$ to point $P$ is then $$f(x,y,z)=\sqrt{x^2+y^2+(k-z)^2}.$$ One then wants to integrate this over the sphere with parametrizion $$x=\sin t \cos \theta,\ y=\sin t \sin \theta, \ z=\cos \theta.$$ One must not forget to multiply $f(x,y,z)$ by the volume element $\sin t$ in spherical coordinates as set up above. $f(x,y,z)$ becomes $\sqrt{k^2+1-2k \cos t}$ and after multiplying by $\sin t$ it becomes a simple integral via aubstitution, let $u$ be what's under the radical, etc. After integrating from $0$ to $\pi$ it becomes, if I'm not wrong, $$\frac{(k+1)^3-(k-1)^3}{3k}.$$ This could be further manipulated into $(6k^2+2)/(3k)$ but I thought it looked nicer in terms of the cube difference.
Added correction: In the above I have only integrated over $t \in [0,\pi]$ but must also integrate the resulting constant over $\theta \in [0,p\pi]$ to finish the integral. Then that integral must be divided by $4 \pi$ i.e. the surface area of the sphere of radius $1.$ The net result is to multiply my answer above by $1/2$ which makes it agree with steveOw's answer above. [Once my answer is adjusted to use the more general case of sphere radius $E$ and distance to sphere $D$ the two answers match.]
• Looks professional but too advanced for me to follow! A similar cube difference crops up in my answer. How do you get the result into terms of the original $D$ and $E$? Commented Jun 26, 2015 at 23:18
• @steveoW In terms of the original $D,E$ the $k$ I use is just $D/E.$ So with that plugged in for $k$ you get a certain answer by pluggint into the last formula I had involving the cube difference. But then that result gives the average distance in the original setup as a multiple of $E$, that is it (result from using $k=D/E$ in formula) should be multiplied by $E$ so you get $E \cdot [(D/E+1)^3-(D/E-1)^3]/[3(D/E)]$ which right now I don't venture to simplify without my algebra calculator handy. Commented Jun 26, 2015 at 23:49
• @steveOw actually the calculation only involves spherical coordinates and integration over a surface, which depending on how much calc you've had usually is in calc 3 or so... But one can see why the factor of $\sin t$ comes in since as $t$ (angle down from north pole) passes by the equator it changes the fastest... Commented Jun 26, 2015 at 23:54
• My simulator agrees with my answer $\bar{L}=D+(E^2/3D^2)$. From your last but one comment I calc your answer as ${L}=2D+(2E^2/3D^2)$. Consider the physical model of sphere radius $E$ and external point $Q$ at distance $D$ from sphere centre. If we keep $D$ constant and vary $E$ towards to zero so $\bar{L}$ should tend to $D$, not $2D$. Commented Jun 27, 2015 at 9:11
Following suggestions from coffeemath & user2566092 I found the following standard rule:- $$\int (ax + b) ^{p/n} = \frac{n}{(n+p)a} (ax + b) ^{1+p/n} +C$$ for $p = \pm1, \pm2, \cdots p \ne -n .$ (Source: The Universal Encyclopedia of Mathematics, page 590; a similar equation is here). Applying that to the expression for $\bar {L}$ $$\bar{L} = \frac{D}{2E} \int_{-E}^{+E} \sqrt{ 1 -\frac{2x_i}{D} + \frac{E^2}{D^2} } dx = \frac{D}{2E} \int_{-E}^{+E} \left[ \left(\frac{-2}{D}\right)x_i + \left(1 + \frac{E^2}{D^2}\right) \right]^{1/2} dx$$ whence $a=-2/D,b = 1 +(E^2/D^2), p = 1, n = 2$ and so $$\bar{L} = \frac{D}{2E} \frac{2}{3(-2/D)} \left[ \left( \left(\frac{-2}{D}\right)x_i + \left(1 + \frac{E^2}{D^2}\right) \right)^{3/2}+constant\right]_{-E}^{+E}$$ then cancelling and dropping the constant leads to $$\bar{L} = \frac{-D^2}{6E} \left[ \left( \frac{-2Dx_i+D^2+E^2}{D^2} \right)^{3/2}\right]_{-E}^{+E} = \frac{-D^2}{6E} \left( \frac{1}{D^2}\right) ^{3/2} \left[ \left( -2Dx_i+D^2+E^2 \right)^{3/2}\right]_{-E}^{+E}$$ expanding and shuffling minus signs $$\bar{L} = \frac{1}{6DE} \left[ \left(2DE+D^2+E^2 \right)^{3/2} - \left(-2DE+D^2+E^2 \right)^{3/2} \right]$$ this simplifies to $$\bar{L} = \frac{1}{6DE} \left[ \left( (D+E)^2 \right)^{3/2} - \left((D-E)^2 \right)^{3/2} \right] = \frac{1}{6DE} \left[ (D+E)^3 -(D-E)^3 \right]$$ and then $$\bar{L} = \frac{1}{6DE} \left[ 6D^2E +2E^3 \right] = D + \frac{E^2}{3D}$$ and finally $$\bar{L} = D \left( 1+ \frac{E^2}{3D^2} \right).$$