Find cumulative distribution function 
It is the second part that I am having troubles with.
I've tried Y from x to x+u and X from 0 to 1: didn't work !
So what are the correct limits in this case(that give you the required answer) ?
 A: Accounting for all inequalities, the region of integration
$$\{(x,y)\ \vert\  0\lt x\lt y\lt 1,\ y \lt x+u\}$$
is a trapezoid, which is a little messy to describe as a repeated integral.  (The figure shows it in blue.)  It's easier to integrate over the triangle $y \ge x+u$ (shown in red in the figure) to compute $\Pr(R\gt u)$ and subtract that from unity:
$$\Pr(R\le u) = 1 - \int_u^1 \int_0^{y-u} (y-x)^{n-2} dx\,dy.$$


An alternative way to derive this result--and therefore to check it--imagines obtaining the original data $X_1, \ldots, X_n$ by means of $Y_1=0$ and $n-1$ iid uniform variates $Y_2, \ldots, Y_n$ and then adding a uniform "offset" $X_1$ to them modulo $1$, so that $X_i = X_1 + Y_i$ for $i=1, 2, \ldots, n$.  The chance that the range lies in an interval $[u, u+du)$ for very small positive $du$ is the chance that 


*

*One of the $Y_2, \ldots, Y_n$ lies in $[1-u, 1-u-du)$, equal to $(n-1)du$; and

*The remainder of the $Y_i$ (apart from $Y_1=0$) lie in $[1-u, 1]$, equal (by virtue of their independence) to $u^{n-2}$; and

*$X_1$ lies in $[0, 1-u-du)$, equal to $1-u-du$.
Because these three events are independent, their chances multiply.  These have to be multiplied by the $n$ mutually exclusive possibilities for the role of $X_1$, giving
$$\Pr(R \in [u, u+du)) = n(n-1)u^{n-2}(1-u-du)du = n(n-1)\left(u^{n-2}(1-u)du - u^{n-2}(du)^2\right).$$
In the limit as $du \to 0$ from above, the second term is vanishingly small compared to the first, giving the density $$dR = n(n-1)u^{n-2}(1-u)du.$$ Integrate this from $0$ to $u$ to obtain $\Pr(R\le u)$.
