Pion at rest decay into muon and neutrino a pion at rest can decay into a muon and a neutrino. Conservation of energy and 3-momentum require
Conservation of energies $$E_\pi  = E_\mu + E_\nu$$
Conservation of momentum $$P_\pi  = P_\mu  + P_\nu$$
but $$P_\pi = 0 $$  so $$P_\mu = -  P_\nu$$
in this case we get 
$$E_\pi = m_\pi c^2 $$
$$E_\mu = c \sqrt{m^2_\mu c^2+P^2_\mu}$$
and 
$$ E_\nu = P_\nu c = P_\mu c $$
putting these in conservation of energy we get 
$$ m_\pi c^2 = c \sqrt{m^2_\mu c^2+P^2_\mu } + P_\mu c $$
and solving for $P_\mu$ gives $$P_\mu = \frac{(m_\pi^2 -m^2_\mu)c}{(2m_\pi)}$$
we are given that $$E_\mu = \frac{(m_\pi^2+m^2_\mu)c^2}{(2m_\pi)}$$
Question. I just can't work out how the value of $E_\mu$ is obtained. If someone can explain that it would be wonderful. 
 A: It's just algebra.
You can start with $$p_\mu = \sqrt{E_\mu^2 - m_\mu^2} = \frac{m_\pi^2-m_\mu^2}{2m_\pi},$$
square both sides: $$E_\mu^2 - m_\mu^2 = \frac{m_\pi^4 + m_\mu^4 - 2m_\pi^2 m_\mu^2}{4m_\pi^2}, $$
rearrange: $$E_\mu^2 = \frac{m_\pi^4 + m_\mu^4 - 2m_\pi^2 m_\mu^2}{4m_\pi^2} + m_\mu^2 = \frac{m_\pi^4 + m_\mu^4 - 2m_\pi^2 m_\mu^2}{4m_\pi^2} + \frac{4m_\pi^2 m_\mu^2}{4m_\pi^2} = \frac{m_\pi^4 + m_\mu^4 + 2m_\pi^2 m_\mu^2}{4m_\pi^2}$$
then take the square root:
$$E_\mu=\frac{m_\pi^2+m_\mu^2}{2m_\pi}.$$
A: Using four-momentum algebra we can do this in one line, you bring the four-momentum of the particle you want to eliminate to one side of the equation. In this case we want to eliminate the four-momentum of the neutrino, so write down the following four-momentum conservation equation:
$$P_{\nu} = P_{\pi} - P_{\mu}$$
We then square both sides (i.e. we take the Lorentz inner product with the quantity itself), and we use the energy-momentum relation $P^2 = m^2$ (in $c=1$ units, and it's easy to derive by noting that $P^2$ being a Lorentz scalar has the same value in any frame, and it's equal to $m^2$ in the rest frame, in case of massless particles where no rest frame exists, the momentum is equal in magnitude to the energy so the relation holds in that case as well). This immediately yields the solution:
$$0 = m_{\pi}^2 + m_{\mu}^2 - 2 m_{\pi} E_{\mu}$$
