Solution:
Our job is to arrange the nine numbers in a way that maximizes the spikiness. Let an element be a peak if it is higher than its neighbor(s) and a valley if it is lower than its neighbor(s). It is not hard to show that an optimal arrangement has every element either a peak or a valley (if you have some number that is neither, just move it to the end to increase spikiness). Since 9 is odd, there are two possibilities: the end points are either both peaks or both valleys.
Sort the numbers from least to greatest: x1,…,x9. If we arrange them in such a way that it starts and ends with peaks, the factor of xi added to the final result will be [−2,−2,−2,−2,1,1,2,2,2], respectively. If we choose the other way (starting and ending with valleys), we get [−2,−2,−2,−1,−1,2,2,2,2]. Notice that both cases have a base value of [−2,−2,−2,−1,0,1,2,2,2], but then we add on max(x6−x5,x5−x4).
Since the expected value of xi is 10i, our answer is −102(1+2+3)−104+106+102(7+8+9)+E(max(x6−x5,x5−x4)). This last term actually has value 43E(x6−x4)=43⋅102. This is because if we fix all values except x5, then x5 is uniformly distributed in [x4,x6]. Geometric probability tells us that the distance from x5 to its farthest neighbor is 43 to total distance between its two neighbors (x6−x4). We add this all up to get 2079.