maximum of two uniform distributions

I have a question. Let’s suppose that the two random variables $X1$ and $X2$ follow two Uniform distributions that are independent but have different parameters:

$X1 \sim Uniform(l1, u1)$

$X2 \sim Uniform(l2,u2)$

If we define X3 as the maximum of X1, and X2, i.e., $X3 = max(X1, X2)$, what kind of distribution would it be? It is certainly not a uniform and I can calculate the cumulative probability, i.e., $p(X3 <= a)$, because $p(X3 <= a) = p(X1 <= a) p(X2 <= a)$. But, I wonder if there exists any density function that can model X3.

Solutions Collecting From Web of "maximum of two uniform distributions"

The distribution of $Z = \max(X,Y)$ of independent random variables is
$$F_Z(z) = P\{\max(X,Y)\leq z\}
= P\{X \leq z, Y \leq z\} = P\{X\leq z\}P\{Y \leq z\} = F_X(z)F_y(z)$$
and so the density is
$$f_Z(z) = \frac{d}{dz}F_Z(z) = f_X(z)F_Y(z) + F_X(z)f_Y(z).$$

All of this holds regardless of the distributions of $X$ and $Y$, that is,
they need not be uniformly distributed random variables. But, for
uniform distributions, the density of $Z$ has simple form since $f_X(z)$ and
$f_Y(z)$ are constants and $F_X(z)$ and $F_Y(z)$ are constants or linearly
increasing functions of $z$. For example, if $X, Y \sim U(0,1)$, then
$f_Z(z) = 2z$ for $0 < z < 1$.