Let $X_0,X_1,\dots,X_n$ be independent random variables, each distributed uniformly on [0,1].Find $$ E\left[ \min_{1\leq i\leq n}\vert X_0 -X_i\vert \right] $$.
Would any member of this math.stackexchange take efforts to explain with all details the following author's solution to this question?
Author's solution: Let L be the expression in question. Then $$L=\displaystyle\int_0^1 E \left[ \min_{1 \leq i \leq n}\vert x- X_i \vert dx\right] =\displaystyle\int_0^1\displaystyle\int_0^1\left[P(\vert X_0 - x\vert\geq u )\right]^ndu dx $$ Since $ P(\vert X_0 -x \vert \geq u ) = \max(1-u-x,0) + \max(x-u ,0), x,u \in [0,1]$ we have $$ P(\vert X_0 -x \vert \geq u )=\begin{cases} 1- 2u & 0 \leq u < x\\ 1-u -x & x \leq u < 1-x & x \in[0,\frac12 ]\\ 0, & 1-x \leq u \leq 1\end{cases}$$ So, $$L = 2\displaystyle\int_0^\frac12\left[\displaystyle\int_0^x (1-2u)^n du + \displaystyle\int_x^{1-x}(1-u-x)^n du\right]dx = \frac{n+3}{2(n+1)(n+2)}$$
It’s a damn shame to do this sort of thing with calculus (let alone a double integral). I’ll answer your question, but first I’ll derive the answer the way it should be derived.
Uniformly independently distribute $n+2$ points on a circle of circumference $1$. Uniformly randomly pick one of the points as point $0$. By symmetry, the expected length of the interval between its neighbours is $\frac2{n+2}$. The distance to its nearest neighbour is uniformly distributed between $0$ and half of that, so the expected distance to the nearest neighbour is $\frac1{2(n+2)}$, and accordingly the expected distance to the other neighbour is $\frac3{2(n+2)}$.
Now uniformly randomly pick another one of the $n+2$ points at which to cut the circle into an interval (leaving $n$ other points). With probability $\frac1{n+1}$, the nearest neighbour of point $0$ is picked, and its other neighbour becomes its nearest neighbour. Thus, the expected distance to the nearest neighbour on the interval is
$$ \frac1{n+1}\cdot\frac3{2(n+2)}+\frac n{n+1}\cdot\frac1{2(n+2)}=\frac{n+3}{2(n+1)(n+2)}\;. $$
Now to answer your question: $X_0$ is uniformly distributed on $[0,1]$, so the expected value of the expression is the integral over that interval. (The $\mathrm dx$ in that integral is misplaced.)
The next equality uses
$$ \mathsf E[U]=\int_0^\infty\mathsf P(U\ge u)\mathrm du $$
for the non-negative random variable
$$ U=\min_{1\le i\le n}|x-X_i|\;, $$
with
$$ \mathsf P(U\ge u)=P(|X_0-x|\ge u)^n\;, $$
since the minimum is $\ge u$ exactly if all $n$ distances are $\ge u$, all with the same probability $P(|X_0-x|\ge u)$. (The index $0$ here is slightly confusing, since $x$ is the dummy variable for $X_0$; I would have written $X_1$, but it doesn’t matter since the $n+1$ variables are i.i.d.)
The next equality adds up the lenghts of the two regions where the inequality is satisfied; the $\max(\cdot,0)$ construction ensures that nothing is added if one of these regions doesn’t exist and the corresponding difference is negative.
The next equality makes the three cases that can occur for $x\in[0,\frac12]$ explicit, in which zero, one or two of the maximum functions vanish, respectively.
The next equality splits the inner integral into the first two cases (as the integrand is zero in the third) and uses symmetry to replace the outer integral over $[0,1]$ by twice the integral over $[0,\frac12]$.
The rest is just standard integration.