If an insect starts at a random point inside a circular plate of radius R and crawls in a straight line in a random direction until it reaches the edge of the plate, what will be the average distance it travels to the edge?
The average distance traveled to the edge of the plate is
{\frac{8}{3\pi}}r\approx.8488\,r.We begin by considering the average distance \bar{D}_X to the perimeter if the insect starts at a particular point X inside the circle. Because of symmetry, \bar{D}_X will only depend on the distance from X to the center O of the circle; suppose this distance is a. As shown in the figure, let f(α) be the distance from X to the perimeter along the line at angle α (counterclockwise) from the radius through X.
Since the insect crawls off in a random direction, we have
\overline{{{D}}}_{X}=\frac{1}{2\pi}\,\int_{0}^{2\pi}f(\alpha)d\alphaas the average distance it will travel from X to the perimeter. Note that the distance from X to the perimeter at Q (in the opposite direction from P) is f(α + π), and that
f(\alpha)+f(\alpha+\pi)=P Q=2\sqrt{r^{2}-a^{2}\sin^{2}\alpha}.Thus, we have
\overline{{{D}}}_{X}=\frac{1}{2\pi}\,\int_{0}^{2\pi}f(\alpha)\,d\alpha=\frac{1}{2\pi}\,\int_{0}^{\pi}(f(\alpha)+f(\alpha+\pi))\,d\alpha\\={\frac{1}{\pi}}\ \int_{0}^{\pi}{\sqrt{r^{2}-a^{2}\,\sin^{2}\alpha}}\,d\alpha\\={\frac{2}{\pi}}\ \int_{0}^{\pi/2}{\sqrt{r^{2}-a^{2}\,\sin^{2}\alpha}}\,d\alpha.To get the overall average, we have to average \bar{D}_X over all points X within the circle. This is most easily done using polar coordinates. (Since r is being used for the radius of the circle, we will continue to write a for the radial polar coordinate.) The required average is
\frac{1}{\pi r^{2}}\int_{0}^{2\pi}\int_{0}^{r}\left(\frac{2}{\pi}\int_{0}^{\pi/2}\sqrt{r^{2}-a^{2}\sin^{2}\alpha}\,d\alpha\right)a\,d a\,d\theta\\={\frac{4}{\pi r^{2}}}\;\int_{0}^{\pi/2}\;\int_{0}^{r}a\sqrt{r^{2}-a^{2}\,\sin^{2}\alpha}\,d a\,d\alpha\\=\frac{4}{\pi r^{2}}\,\int_{0}^{\pi/2}\left[-\frac{1}{3}\,\frac{(r^{2}-a^{2}\sin^{2}\alpha)^{3/2}}{\sin^{2}\alpha}\right]_{a=0}^{a=r}\,d\alpha\\={\frac{4}{\pi r^{2}}}\,\int_{0}^{\pi/2}{\frac{-1}{3\,\sin^{2}\alpha}}\left[(r^{2}-r^{2}\,\sin^{2}\alpha)^{3/2}-(r^{2})^{3/2}\right]\,d\alpha\\={\frac{4}{\pi r^{2}}}\,\int_{0}^{\pi/2}{\frac{-1}{3\sin^{2}\alpha}}\left(r^{3}\,\cos^{3}\alpha-r^{3}\right)d\alpha\\={\frac{4r}{3\pi}}\,\int_{0}^{\pi/2}{\frac{1-\cos^{3}\alpha}{\sin^{2}\alpha}}\,d\alpha.To continue with this improper integral, we first evaluate the indefinite integral.
\int{\frac{1-\cos^{3}\alpha}{\sin^{2}\alpha}}\,d\alpha=\int{\frac{1-(1-\sin^{2}\alpha)\cos\alpha}{\sin^{2}\alpha}}\,d\alpha\\=\int\left(\csc^{2}\alpha-{\frac{\cos\alpha}{\sin^{2}\alpha}}+\cos\alpha\right)\,d\alpha\\=-\cot\alpha+{\frac{1}{\sin\alpha}}+\sin\alpha+C\\={\frac{1-\cos\alpha}{\sin\alpha}}+\sin\alpha+C.Therefore,
\int_{0}^{\pi/2}{\frac{1-\cos^{3}\alpha}{\sin^{2}\alpha}}\,d\alpha=\lim_{b\to0^{+}}\left[{\frac{1-\cos\alpha}{\sin\alpha}}+\sin\alpha\right]_{b}^{\pi/2}\\=\lim_{b\to0^{+}}\left(1+1-{\frac{1-\cos b}{\sin b}}-\sin b\right)\\= 2,and the average distance the insect crawls to the perimeter of the circle is
\frac{4r}{3\pi}\,\int_{0}^{\pi/2}\frac{1-\cos^{3}\alpha}{\sin^{2}\alpha}\,d\alpha=\frac{8}{3\pi}\,r.