density for order stat, sufficient stat, MLE question

Pls take a look, this is an exam practice question but no answer is provided.

Question.

Let be a random sample from a distribution with density function

otherwise

where is an unknown parameter.

(a) Let . Find the density function of X.

(b) find a simple sufficient statistic for .

(c) find the maximum likelihood estimator for .

(d) compute the mean square error of the maximum likelihood estimator .

Answer.

(a) I take it X is the maximum Y in the sample ie so I find the density of it

(b) to find sufficient statistics for , I will use Factorisation theorem, ie factorising the joint density function of the sample

the second component depends on the sample only; the first component depends on and on the sample through and can be a sufficient statistic for .

?? does this makes sense ??

(c) here is where I am stuck and cannot move on to (d)

To find MLE for , I will find maximum of log-likelihood of the density of Y

subject to a constraint

this can be equal to zero only if n=0 and this is not what I am looking for here...

Can you help me to spot where I've gone wrong?

thanks!