Observations $ X_1, X_2,\ldots,X_n$ are drawn from normal populations with the same mean $ \mu $ but with different variances $ \sigma_1^2, \sigma_2^2,\ldots, \sigma_n^2 $. Is it possible to estimate all the parameters? If we assume that the $ \sigma_i^2 $ are known, what is the maximum-likelihood estimator of $ \mu $?
My attempt:
The likelihood function is $$ L(x_1,\ldots,x_n; \mu, \sigma_1,\ldots, \sigma_n) = \frac 1 {(2\pi)^{n/2}} \prod_{i=1}^n \dfrac 1 {\sigma_i} e^{-\sum_{i=1}^n \dfrac{(x_i-\mu)^2}{2\sigma_i^2} }$$
Then we take the natural logarithm. We derive with respect to $ \sigma_i$ and we equate these derivatives to zero. We obtain
$$ -\frac 1 {\sigma_i} + \frac{(x_i-\mu)^2}{\sigma_i^3} = 0 $$
From here we get that
$$ \widehat{\sigma_i} = X_i - \mu$$
Is this correct?
Analogously for the other question but now we derive with respect to $ \mu $.