Solution (source code)

= Solution

<Four-momentum conservation> fixes the outgoing system's <invariant mass> to the same $2E/c^2$. In the rest frame of particle 3, let particle 4 have <energy> $E_4'$ and <momentum> $\mathbf p_4'$. Each outgoing particle has <rest mass> $M_2$, so
$$
4E^2=(M_2c^2+E_4')^2-c^2|\mathbf p_4'|^2
=2M_2^2c^4+2M_2c^2E_4'.
$$
Consequently
$$
\boxed{E_4'=\frac{2E^2}{M_2c^2}-M_2c^2.}
$$
Here $E_4'$ is the total <energy>, including rest energy. At the production threshold $E=M_2c^2$, it reduces to $M_2c^2$, as it should. Production is kinematically possible only for $E\ge M_2c^2$. The initial <rest mass> $M_1$ drops out because the conserved total <centre-of-mass energy>, rather than the identity of the incoming particles, determines this outgoing relative motion.