Distribution of maximum of normally distributed random variables I'm trying to find the closed-form CDF and PDF of $Y = \max(X_1, ..., X_n)$ where $X_i \sim \mathcal{N}(\mu_i, \sigma^2)$.
My thought process so far:
$$
\begin{align*}
F_Y(y) &= \mathbb{P}(\max(X_1, ..., X_n) \leq y) \\
&= \prod_{i=1}^n F_{X_i}(y) \\
\implies f_Y(y) &= \frac{\partial}{\partial y} \prod_{i=1}^n F_{X_i}(y)
\end{align*}
$$
I'm not sure how to proceed from here, or whether this is even the correct approach. Any help is much appreciated.
Edit: The linked question pertains to IID random variables, whereas I am more interested in INID random variables.
 A: Problems like this, where you want to differentiate the product of a bunch of functions that depend on your variable of interest, can be dealt with by logarithmic differentiation.  Let $\Phi$ and $\phi$ denote the CDF and PDF of the standard normal distribution (respectively).  Since the normal random variables in your question have the same variance you get:
$$\prod_{i=1}^n F_i(y) = \prod_{i=1}^n \Phi \Big( \frac{y-\mu_i}{\sigma} \Big) = \exp \Bigg( \sum_{i=1}^n \ln \Phi \Big( \frac{y-\mu_i}{\sigma} \Big) \Bigg).$$
Differentiating with respect to $y$ and applying the chain rule gives:
$$\begin{equation} \begin{aligned}
f_Y(y) = \frac{d F_Y}{dy}(y) 
&= \Bigg( \frac{1}{\sigma} \sum_{i=1}^n \frac{\phi ( (y-\mu_i)/\sigma ) }{\Phi ( (y-\mu_i)/\sigma )} \Bigg) \exp \Bigg( \sum_{i=1}^n \ln \Phi \Big( \frac{y-\mu_i}{\sigma} \Big) \Bigg) \\[6pt]
&= \Bigg( \frac{1}{\sigma} \sum_{i=1}^n \frac{\phi ( (y-\mu_i)/\sigma ) }{\Phi ( (y-\mu_i)/\sigma )} \Bigg) \Bigg( \prod_{i=1}^n \Phi \Big( \frac{y-\mu_i}{\sigma} \Big) \Bigg). \\[6pt]
\end{aligned} \end{equation}$$
In the special case where $\mu = \mu_1 = \cdots = \mu_n$ this reduces to the well-known formula:
$$f_Y(y) = \frac{n}{\sigma} \cdot \phi \Big( \frac{y-\mu}{\sigma} \Big) \cdot \Phi \Big( \frac{y-\mu}{\sigma} \Big)^{n-1}.$$
A: We can express each $F_{X_i}$ in terms of an error function, and when differentiating via the product rule to get $f_Y$ we can re-obtain from each of those error functions in turn a Gaussian function. It depends what you mean by closed form -- if you leave the $\mu_i$ as symbolic parameters then you will have explicit sums and products over $i$. It will be in suitable form to compute numerically for given parameters if you have access to elementary and error functions.
