Let $\{x_1, x_2, \cdots, x_n \}$ be an observed sample from a distribution with probability density function
$$f(x) = \begin{cases}\frac{x^3}{2 \theta^3}e^{-\theta x} & x > 0 \\0 & \textrm{otherwise}\end{cases}$$ where $\theta > 0$ is unknown.
(a) Determine the MLE of $\theta$
(b) Determine the MLE of $\psi(\theta) = \textrm{Var}(X_1)$
Attempt
(a)
$$(x_1, x_2, \cdots, x_n) \sim \textrm{Gamma}(2, 1)$$
$$L(\theta | \bar{x}) = \prod_{i=1}^{n} \frac{x_i^3}{2 \theta^3}e^{-\theta x_i} = \left(\frac{1}{2 \theta^3}\right)^n \prod_{i=1}^{n} x_i^3 e^{-\theta x_i} = \left(\frac{1}{2 \theta^3}\right)^n \bar{x}^{3} e^{-\theta\sum_{i=1}^{n} x_i} \\ = \left(\frac{1}{2 \theta^3}\right)^n \bar{x}^{3} e^{-\theta \bar{x}}$$
$$L(\theta | \bar{x}) = \ln L = n \ln (\frac{1}{2 \theta^3}) + 3 \ln(\bar{x}) - \theta \bar{x} \ln (e)$$
Derivative:
$$0 = \frac{3}{\theta} + 0 -\bar{x}$$
so $$\theta = -\frac{3}{\bar{x}}$$
now to see if it's derivative is less than 0
$S(\theta | \bar{x}) = \frac{-3}{\theta} - \bar{x}$
$S'(\theta | \bar{x}) = \frac{3}{\theta^2} < 0$
therefore $\theta = -\frac{3}{\bar{x}}$ is the Maximum likelihood estimate (MLE)
not sure how to do b