Suppose my pdf is some function that requires that $x\geq0$ or else it becomes $0$. Also, the parameter is $\theta>0$. Now, I would like to calculate the MLE of that pdf for $X_1,...,X_n$ i.i.d. random variables.
Now, suppose I differentiated with regards to the log-likelihood and found that the derivative is:
$$\frac{\partial l_x(\theta)}{\partial x}=\frac{n}{\theta}-\sum_{i=1}^{n}x_i^2$$
and so we get that
$$\hat{\theta}^{MLE}=\frac{n}{\sum_{i=1}^{n}x_i^2}$$
Now if we were to constrain the parameter space from $\theta>0$ to {1,2}, meaning the parameter space for $\theta$ is now only 1 or 2, what would my new MLE of $\theta$ be?
Thanks!