Density function of ordered statistic of a uniform distribution from $0
Assume $X_1, X_2, ..., X_n$ is a random sample of a uniform random variable $X$ on the interval $(0,\theta)$. What is the density function for $X$ and the density function for $X_{(n)}$ where $X_{(n)}$ is the $n$-th ordered statistic of $X$.
So, it's pretty trivial that $f_X(x) = \dfrac{1}{\theta}$.
I also know that the density function for an ordered statistic of a uniform random variable on interval $0<x<1$ follows a beta distribution:
$$f_{X_r}(x) = \dfrac{\Gamma{(n+1)}}{\Gamma{(r)}\Gamma{(n-r+1)}}x^{r-1}(1-x)^{n-r}.$$
So, considering that I want to know the the density function for the interval $0<x<\theta$, I feel like I could just divide through by $\theta$ to make the interval $0<\frac{x}{\theta}<1$, and then (considering that I want the density function for the n'th ordered statistic), the distribution function would become:
$$f_{X_{(n)}}{(x)} = n\left(\dfrac{x}{\theta}\right)^{n-1}$$

However, the text I am following along with reports that this value is:
$$f_{X_{(n)}}{(x)} = n\dfrac{x^{n-1}}{\theta^n}.$$

Can anyone help me figure out what I'm missing here?
Thanks!
 A: First, the density of $X$ should be more precisely written as:  $$f_X(x) = \begin{cases} 1/\theta, & 0 \le x \le \theta \\ 0, & \text{otherwise.} \end{cases}$$  Or using indicator function notation, we could write it as $$f_X(x) = \frac{1}{\theta} \mathbb 1(0 \le x \le \theta).$$  The distinction is important.
As for the order statistic, how do you know it is beta?  Far better to proceed from first principles:  if $X_{(n)} = \max (X_1, \ldots, X_n)$, then for $0 \le x \le \theta$, we have $$\Pr[X_{(n)} \le x] \overset{\text{ind}}{=} \prod_{i=1}^n \Pr[X_{i} \le x] = \prod_{i=1}^n \frac{x}{\theta} = \left(\frac{x}{\theta}\right)^n.$$  This is because $X_{(n)} \le x$ if and only if every observation $X_1, \ldots, X_n$, is at most $x$.  Thus the desired probability is the product of the individual probabilities that each observation is at most $x$, since the $X_i$s are IID.
If $x > \theta$, then $\Pr[X_{(n)} \le x] = 1$, and if $x < 0$, then $\Pr[X_{(n)} \le x] = 0$.  So the CDF is $$F_{X_{(n)}}(x) = \begin{cases} 0, & x < 0 \\ (x/\theta)^n, & 0 \le x \le \theta \\ 1, & x > \theta. \end{cases}$$  Now differentiation gives $$f_{X_{(n)}}(x) = \frac{dF_{X_{(n)}}}{dx} = \frac{nx^{n-1}}{\theta} \mathbb 1(0 \le x \le \theta),$$ as claimed.  No need to use ad hoc procedures that may or may not be justified.
A: There are several ways to remedy the issue. The simplest is to recognize that you are performing a linear transformation
and hence
$$f_{X_{(n)}}(x) = \frac{f_{U(n)}(x/\theta)}{\left|\frac{du}{dx}\right|_{u = x/\theta}} = \frac{1}{\theta}\cdot\frac{\Gamma(n,1)}{\Gamma(n)\Gamma(1)}(x/\theta)^{n-1}(1-x/\theta)^{1-1} = n\cdot\frac{x^{n-1}}{\theta^n}$$
which gives the desired result.
You could also calculate the cdf
$$P(X_{(n)}\leq x) = \left(\frac{x}{\theta}\right)^n.$$
This gives that the pdf is 
$$f_{X_{(n)}}(x) = n\cdot\left(\frac{x}{\theta}\right)^{n-1}\cdot\frac{1}{\theta} = n\cdot\frac{x^{n-1}}{\theta^n}.$$
A: The largest of the $X_i$, say $W$, is less than or equal to $w$ if and only if all the $X_i$ are $\le w$. Thus for $w$ between $0$ and $\theta$ we have 
$$F_W(w)=\Pr(W\le w)=\left(\frac{w}{\theta}\right)^n.$$
For the density function $f_W(w)$, differentiate.  We get 
$$\frac{n}{\theta^n}w^{n-1}$$
in the interval $0\lt w\lt \theta$. (The density function is $0$ elsewhere.)
A: The density of the $r$-th order statistic is obtained by the count of arrangements, the density of the r-th statistic, the CDF of those less and the complement of the CDF of those greater. 
$\begin{align}f_{X_{(r)}}(x) ~=~& \frac{n!}{(r-1)!1!(n-r)!}~f_X(x)~F_X(x)^{r-1}~(1-F_X(x))^{n-r}
\\ ~=~& \frac{n!}{(r-1)!(n-r)!}~ \frac 1\theta ~\Big(\frac x\theta\Big)^{r-1}~\Big(\frac{\theta-x}\theta\Big)^{n-r} ~~\mathbf 1_{x\in[0;\theta]}
\end{align}$
