Consider $f_X(x;\theta)=\theta\cdot x$, $x\leq\sqrt{\frac{2}{\theta}}$. Find the maximum likelihood for the estimator $\hat{\theta}$ of $\theta$.
By definition, the MLE of $f(x_1\ldots,x_n;\hat{\theta})=\max.f(x_1,\ldots,x_n;\theta)$
$$L(\theta)=\prod_{i=1}^n f(x_i;\theta) \implies \ln (L(\theta))=\sum_{i=1}^n \ln(\theta \cdot x_i)=n\cdot \ln(\theta)+\sum_{i=1}^n\ln(x_i)$$
$$\implies \frac{d}{d\theta}L'(\theta)=\frac{d}{d\theta}n\cdot \ln(\theta)=\frac{n}{\theta}=0 \iff n=0$$
This makes of course no sense, so could anyone give me a hint where I made a mistake?
The likelihood function $L(\theta; x_1, x_2, \ldots, x_n)$ is given by $$L(\theta; x_1, x_2, \ldots, x_n) = \begin{cases} \prod\limits_{i=1}^n \theta \cdot x_i, & \theta \leq \frac{2}{x_{(n)}^2},\\ 0, & \theta > \frac{2}{x_{(n)}^2}, \end{cases}$$ where $x_{(n)} = \max\limits_k x_k$ is the $n$-th order statistic. In other words, $L(\theta; x_1, x_2, \ldots, x_n)$ is proportional to $\theta^n$ for $\theta \in \left(0,\frac{2}{x_{(n)}^2}\right]$ and $L(\theta; x_1, x_2, \ldots, x_n) =0$ otherwise.
Thus, $L(\theta; x_1, x_2, \ldots, x_n)$ is a monotone increasing function of $\theta$ on $\left(0,\frac{2}{x_{(n)}^2}\right] = \left(0,\frac{2}{(\max_k x_k)^2}\right]$. Finding the location of its maximum is left as an exercise for you. But, please don't differentiate and set the derivative equal to $0$ as you tried previously.