Let $X_1, \ldots, X_n$ a random sample of a Uniform(0,1), I want to show which the joint distribution of $(X_1,X_{(n)})$ is. I do the following:
$$ P(X_1\leq x, X_{(n)}\leq y)=P(X_1\leq x, X_1\leq y, \ldots , X_n\leq y)=$$ $$ P(X_1\leq \min(x,y), X_2\leq y, \ldots, X_n\leq y)=P((X_1\leq \min(x,y))P(X_2\leq y)\ldots P( X_n\leq y)=$$ $$ = \min(x,y)y^{n-1}$$
When I compute the density function (by derivation), it is:
$f(x,y)=(n-1)y^{n-2}$ in $0\leq x\leq y\leq 1$
and it doesn't integrate $1$ but $\frac{n-1}{n}$. I don't know where the problem is.