Suppose that $X$ follows a distribution with p.d.f. given by
\begin{equation}
f(x;\theta)=\dfrac{2xe^{-(x/\theta)^2}}{\theta^2}
\end{equation}
for $x>0$ Assume that $X_1,X_2,...,X_n$ is a random sample of size $n$ from the distribution. Find the maximum likelihood estimator, $\tilde{\theta}_{ML}$, of $\theta$
I'm having issues with how this simplifies. Can someone check my work?
\begin{equation}
L(\theta)=\prod^n_{i=1}f(x;\theta)=\frac{2^n}{\theta^{2n}}\prod^n_{i=1}x_ie^{-\left(\dfrac{\sum^n_{i=z}x_i^2}{\theta^2}\right)}
\end{equation}
\begin{equation}
log(L(\theta))=nlog(2)-2nlog(\theta)+\sum^n_{i=1}log(x_i)-\frac{\sum^n_{i=1}x_i^2}{\theta^2}
\end{equation}
\begin{equation}
L'(\theta)=-\frac{2n}{\theta}+\frac{2\sum^n_{i=1}x_i^2}{\theta^3}
\end{equation}
I think I have done this incorrectly because I don't know how I would isolate $\theta$. Any help would be appreciated.