This question appeared in a past exam paper, in the form:
Let $X = (X_1\dotsc X_n)\in\mathbb{R}^n$ be an i.i.d. sample from $U[0, \theta], \theta>0$
Apply Rao-Blackwell's theorem to the unbiased estimator $2X_1$ using the statistic $X_{(n)} = \max\{X_i\}$ to compute the efficient estimator for $\theta$. (In other parts of the problem we showed that $X_{(n)}$ is a complete sufficient statistic)
My working looks like this:
\begin{align} F_{X_{(n)}}(y) &= P(X_{(n)}\leq y)= F_{X_1}(y)^n \\ &= \left(\frac{y}{\theta}\right)^n\mathbf{1}(0\leq y\leq \theta) + \mathbf{1}(y>\theta)\\ f_{X_{(n)}}(y) &= \frac{ny^{n-1}}{\theta^n}\mathbf{1}(0\leq y\leq \theta)\\ F_{(X_{1},X_{(n)})}(x, y) &= P(X_1\leq x, X_{(n)}\leq y)\\ &= \left\{ \begin{array}{cl} \theta^{-n}xy^{n-1} & :0\leq x\leq y\leq \theta \\ \theta^{-n}y^n &: 0\leq y\leq x\leq \theta \end{array} \right.\\ f{(X_{1},X_{(n)})}(x, y) &= \theta^{-n}(n-1)y^{n-2}\mathbf{1}(0\leq x\leq y\leq \theta)\\ f_{X_{1}|X_{(n)}}(x| y) &=\frac{\theta^{-n}(n-1)y^{n-2}}{\theta^{-n}ny^{n-1}}\mathbf{1}(0\leq x\leq y)\\ &= \frac{n-1}{n}y^{-1}\mathbf{1}(0\leq x\leq y)\\ \mathbf{E}(X_1|X_{(n)}=y) &=\frac{n-1}{n}\int_0^y\frac{x}{y}dy \\ &=\frac{n-1}{n}\frac{y}{2} \\ \mathbf{E}(2X_1|X_{(n)}) &= \frac{n-1}{n} X_{(n)} \end{align} According to Rao-Blackwell's theorem , this should yield an unbiased estimator for $\theta$. Unfortunately, it is not unbiased and also yields an impossible value of $\theta$, since $X_{(n)}<\theta$.
Playing around with the result, I found that $\frac{n+1}{n} X_{(n)}$ does the job and makes sense, but I can't figure out where I went wrong in my calculations and would be very grateful if someone could point my error out.