Let $a,b,c>0$ with $a>b$ and let $X\_1,\dots,X\_n$ be a collection of independent uniform samples from the unit interval. Assume that we re-order the samples so that $X\_1\leq X\_2 \leq \cdots \leq X\_n$, and then let $Z\_i := X\_{i+1}-X\_i$ denote the differences between neighbors. My question is, is there any way to compute the expectation of the sum $$\sum\_i\max\{ aZ\_i~,~bZ\_i+c \}$$? This seems difficult but not intractably so.



Expectation of a function of sorted uniform random variables
Let's throw in $X\_0=0$ and $X\_{n+1}=1$. Then there are $n+1$ variables $(Z\_i)$ lying on the simplex $\{z\in\mathbb R^{n+1}\_+\colon z\_1+\ldots+z\_{n+1}=1\}$. The distribution is uniform. Each $Z\_i$ has the same marginal distribution with density $f\_Z(z)=(n+1)(1-z)^n$. So your expectation is just $(n+1)\int\_0^1 (n+1)\max(az,bz+c)(1-z)^n\,dz$, which is easy to evaluate explicitly. 


If you don't like having $Z\_1$ and $Z\_{n+1}$, the sum is over $n-1$ identically distributed random variables (not independent, but expectation doesn't care), so the pre-factor $n+1$ is replaced with $n-1$. 


