Pion decay reaction and the invariance of momenta Let's take the following weak decay reaction:
$$
\pi^+ → \mu^+ + \nu_\mu
$$
where masses and the pion energy are known.
Considering the relations among momenta of the involved particles, where 
neutrino mass is considered to be zero
$$
P(E_\pi,p_\pi), P(E_\mu, p_\mu), P(p_\nu, p_\nu)
$$
to calculate the neutrino energy one would say
$$
P_\pi = P_\mu + P_\nu
$$
Now, by leveraging the invariance of squared momenta we obtain
$$
P_\pi - P_\nu = P_\mu
$$
$$
E_\pi^2+p_\pi^2+E_\nu^2+p_\nu^2-2E_\pi E_\nu - 2p_\pi p_\nu cos(\theta) = E_\mu^2+p_\mu^2
$$
However, the latter is actually wrong. Why?
 A: For the decay of a pion into a muon and a neutrino, 4-momentum must be conserved: 
$$ p_\pi^\mu = p_\mu^\mu + p_\nu^\mu \tag{1}$$
where the individual 4-momenta are given by 
$$ \begin{pmatrix} E_\pi \\\textbf p_\pi \end{pmatrix} = \begin{pmatrix} E_\mu \\\textbf p_\mu \end{pmatrix} + \begin{pmatrix} E_\nu \\\textbf p_\nu \end{pmatrix} \tag{2}$$
and the square of a 4-momentum gives the particles mass: $p_x^2 = m_x^2$. 
Option 1: Rest frame
Let us choose the rest frame of the pion, where its spatial 3-momentum is zero: 
$$ \begin{pmatrix} E_\pi \\\textbf 0 \end{pmatrix} = \begin{pmatrix} E_\mu \\\textbf p_\mu \end{pmatrix} + \begin{pmatrix} E_\nu \\\textbf p_\nu \end{pmatrix} \tag{3}$$
and since $E_\pi = \sqrt{\textbf p^2+m_\pi^2}$, the energy simplifies to 
$$ \begin{pmatrix} m_\pi \\\textbf 0 \end{pmatrix} = \begin{pmatrix} E_\mu \\\textbf p_\mu \end{pmatrix} + \begin{pmatrix} E_\nu \\\textbf p_\nu \end{pmatrix} \tag{4}$$
Since we know the masses and want to know $E_\nu$, it is most convenient to subtract the neutrino momentum to the left, because if we square the equation afterwards, we don't have to deal with $E_\mu$ or $p_\mu$, since the right-hand side will only be $p_\mu^2 = m_\mu$ and we know the mass. 
$$ \begin{pmatrix} m_\pi \\\textbf 0 \end{pmatrix} - \begin{pmatrix} E_\nu \\\textbf p_\nu \end{pmatrix} = \begin{pmatrix} E_\mu \\\textbf p_\mu \end{pmatrix} \quad\leftrightarrow\quad p_\pi^\mu - p_\nu^\mu = p_\mu^\mu \tag{5} $$
Now, we square the equation: 
$$ (p_\pi^\mu - p_\nu^\mu)^2 = p_\mu^2 \tag{6}$$
This gives us 
$$ \underbrace{p_\pi^2}_{m_\pi^2} - 2p_\pi \cdot p_\nu + \underbrace{p_\nu^2}_{m_\nu^2 = 0} = \underbrace{p_\mu^2}_{m_\mu^2} \tag{7}$$
Finally, we have to evaluate the product of two 4-vectors here, which according to $a\cdot b = a^0 b^0 - \textbf a\cdot \textbf b$ gives us, 

$$ m_\pi^2 - 2(m_\pi E_\nu - \textbf 0\cdot \textbf p_\nu) = m_\mu^2 \tag{8} $$

$\textbf 0\cdot \textbf p_\nu = 0$ and then you can solve for the neutrino energy $E_\nu$! 
Option 2: Any frame
For the pion and the muon, $E=\sqrt{\textbf p^2+m^2}$, we will consider the neutrino later. Since we know the masses and want to know $E_\nu$, it is most convenient to subtract the neutrino momentum to the left, because if we square the equation afterwards, we don't have to deal with $E_\mu$ or $p_\mu$, since the right-hand side will only be $p_\mu^2 = m_\mu$ and we know the mass. 
$$ \begin{pmatrix} E_\pi \\\textbf p_\pi \end{pmatrix} - \begin{pmatrix} E_\nu \\\textbf p_\nu \end{pmatrix} = \begin{pmatrix} E_\mu \\\textbf p_\mu \end{pmatrix} \quad\leftrightarrow\quad p_\pi^\mu - p_\nu^\mu = p_\mu^\mu \tag{9} $$
Now, we square the equation: 
$$ (p_\pi^\mu - p_\nu^\mu)^2 = p_\mu^2 \tag{10}$$
This gives us 
$$ \underbrace{p_\pi^2}_{m_\pi^2} - 2p_\pi \cdot p_\nu + \underbrace{p_\nu^2}_{m_\nu^2 = 0} = \underbrace{p_\mu^2}_{m_\mu^2} \tag{11}$$
Finally, we have to evaluate the product of two 4-vectors here, which according to $a\cdot b = a^0 b^0 - \textbf a\cdot \textbf b$ gives us, 
$$ m_\pi^2 - 2(E_\pi E_\nu - \textbf p_\pi\cdot \textbf p_\nu) = m_\mu^2 \tag{12} $$
$\textbf p_\pi\cdot \textbf p_\nu = |\textbf p_\pi||\textbf p_\nu|\cos\theta$. Since the neutrino is massless, $p_\nu^2=E_\nu^2-\textbf p_\nu^2=E_\nu^2-|\textbf p_\nu|^2=0$, the length of the neutrino 3-momentum vector is equal to $E_\nu$. 

$$ m_\pi^2 - 2 E_\pi E_\nu + 2|\textbf p_\pi|\underbrace{|\textbf p_\nu|}_{E_\nu}\cos\theta = m_\mu^2 \tag{13}$$

Finally, we can solve for the neutrino energy $E_\nu$! 
