I know that for a circle, the average distance from the center to a point is $(2/3)\sqrt{A/pi}$ in which A is the surface of the circle. This is understandable for me. However, I am wondering about a formula to calculate the average distance from the center of a square and rectangle to a random point.
I have found similar questions on this forum, but I have not yet found an answer that I could grasp my mind around. I can imagine that for the rectangle, it would incorporate like a length vs. width ratio or something.
Can somebody point me in the right direction?
Answer depends on random points distribution. Let this distribution is uniform by area. Let center of rectangle is $O(0;0)$, sides are parallel to axes and one of vertices is $A(a;b)$ with $a>0$, $b>0$. Then all rectangle points are given by inequalities $$-a<x<a \land -b<y<b$$ Let $(x;y)$ is random point, then distance from this point to center is $\sqrt{x^2+y^2}$. Then average distance is $$\frac{1}{4ab}\int_{-a}^a \int_{-b}^b \sqrt{x^2+y^2}\,dy\,dx=\\ \frac{1}{6ab} \left(a^3 \ln \left(\frac{b+\sqrt{a^2+b^2}}{a}\right) +2 ab \sqrt{a^2+b^2} +b^3 \ln \left(\frac{a+\sqrt{a^2+b^2}}{b}\right)\right)$$