We have a sample $X_1, ..., X_n$ from $U[M,2M]$, $M>0$. Define $U=\frac{(n+1)}{(2n+1)}\max(X_i)$. I wish to show that $U$ is an unbiased estimator for $M$, but I am getting a wrong result. This is how I am trying to do it.
$f(x)=\frac{1}{2M-M}=\frac{1}{M}$
$P(X_i \leq x)=\int_M^x \frac{1}{M} dy = \frac{x-M}{M}$
$P(\max(X_i) \leq x) = P(X_1 \leq x, ... , X_n \leq x)=(\frac{x-M}{M})^n$
$E(\max(X_i))=\int_M^{2M} {1- (\frac{y-M}{M})^n } dy = \frac{n}{n+1}M$
$E(U)=E(\frac{(n+1)}{(2n+1)}\max(X_i))=\frac{(n+1)}{(2n+1)}E(\max(X_i))=\frac{(n+1)}{(2n+1)}*\frac{n}{n+1}M$
but I have to show that $ E(U)=M$ so it is an unbiased estimator, I really don't see where I am going wrong!