Suppose $X_1, \dots, X_n$ are iid from a uniform distribution in $[-a, a]$. Their PDF is thus given by $$f(x) = \dfrac{1}{2a}\mathbb{I}(x \in [-a ,a])\text{.}$$ $\mathbb{I}$, above, denotes the indicator function. I wish to find a MLE for $a$.
The likelihood function is given by $$L(a \mid x_1, \dots, x_n) = \left(\dfrac{1}{2a}\right)^n\prod_{i=1}^{n}\mathbb{I}(x_i \in [-a, a])\text{.}$$ I am quite certain that one cannot do the traditional method of finding the loglikelihood, setting its derivative equal to $0$, and solving for $a$. I know there's some trick to doing this - perhaps involving an order statistic - but it has been a long time since I've seen the trick. Can I have a hint, not a complete solution on how to proceed with this problem?
Edit: Intuitively speaking, I think that if I wanted to choose $a$ to maximize $L$, I wouldn't choose $a$ to be a negative value. Actually, I would choose $a$ to be the smallest value of $x_i$ which is greater than $0$ - since it will be placed in the denominator of $L$ and as $x_i$ is larger, $L$ gets smaller.