[Math] Average distance from point to circle

euclidean-geometryexpectation

I need to find the average distance from the origin of the Euclidean plane to the points on a circle with radius $R$. The distance from the origin to the center of the circle is denoted by $r$. Observe that there's no requirement on $r$ and $R$, i.e., we can have $R \geq r$ (the origin is inside the circle) or $R \leq r$ (the origin is outside the circle).

Tentative solution: let $\phi$ denote a random variable uniformly distributed in $[0, 2 \pi]$. The average distance to the circle is given by

$\frac{1}{2 \pi} \int_{0}^{2\pi} \sqrt{r^{2} + R^{2} + 2 r R \cos \phi} \ \mathrm{d} \phi$

Any idea on how to solve this integral? I've tried substituting $\cos \phi \to z$ but it doesn't get any better.

Thanks in advance.

Best Answer

Unfortunately, the answer it not what you would like to hear.

There is nothing more to do to your integral except to express it as the Complete elliptic integral of the second kind.

Using $\cos\phi$ even and substituting $\phi=2t$ you get:

$\int_{0}^{2\pi} \sqrt{r^{2} + R^{2} + 2 r R \cos \phi} \ \mathrm{d} \phi$

$=2\int_{0}^{\pi} \sqrt{r^{2} + R^{2} + 2 r R \cos \phi} \ \mathrm{d} \phi$

$=4\int_{0}^{\pi/2} \sqrt{r^{2} + R^{2} + 2 r R \cos(2t)} \ \mathrm{d} t$

$=4\int_{0}^{\pi/2} \sqrt{r^{2} + R^{2} + 2 r R (1-2\sin^2t)} \ \mathrm{d} t$

$=4\int_{0}^{\pi/2} \sqrt{(r+R)^{2} - 4 r R \sin^2t} \ \mathrm{d} t$

$=4(r+R)\int_{0}^{\pi/2} \sqrt{1 - \frac{4 r R}{(r+R)^{2}} \sin^2t} \ \mathrm{d} t$

$=4(r+R)E\left(\frac{2 \sqrt{r R}}{r+R}\right)$

So your answer is $\frac{2}{\pi}(r+R)E\left(\frac{2 \sqrt{r R}}{r+R}\right)$

Related Question