I am given $X_1, X_2, ..., X_n \overset{iid}{\sim} U(\alpha, \beta)$, and asked to find joint distribution of order statistics- $X_{(1)}, X_{(n)}$. Though I know there exists a much simpler solution, but I wanted to try integrating the joint density instead.
The equation looked as follows- \begin{align*} F_{X_{(1)}, X_{(n)}} (x,y) &= \frac{n(n-1)}{(\beta-\alpha)^n}\int_{\alpha}^y \int_{\alpha}^x (v-u)^{n-2} du \cdot dv \\ &= \frac{(y-\alpha)^n - (y-x)^n + (\alpha - x)^n}{(\beta-\alpha)^n} \end{align*}
The equation is correct except for the last $(\alpha-x)^n$ term. Since my joint density is correct, I inferred the mistake must be in my integral. I have tried changing the limits and reversing the order of integrals but nothing seems to work. I would be grateful if anyone could tell me where I am going wrong.
The upper limit on your inner integral should be $\ \min(x,v)\ $ because the density isn't always $\ \frac{n(n-1)(v-u)^{n-1}}{(\beta-\alpha)^n}\ $. When $\ u>v\ $, it vanishes.