What is the average length of a line segment in a $1 \times 1$ field?
Given
$$x_1, y_1, x_2, y_2 \in [0,1]$$
$$S = (x_1,y_1,x_2,y_2)$$
$$dist(x_1,y_1,x_2,y_2) = \sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$
Find $$\frac{\sum\limits_{n=0}^{\infty} dist(S_n)}{|S|}$$
I know that it's $\approx \boxed{0.52}$ from writing a program that sums up a bunch of random line segment lengths and divides it by the number of samples taken, but what's the closed form?