I need some help with this relativity question. Just some hints would be good. I have given the question and my attempt.
$D^0$ mesons can decay to $K^+$ and $π^-$ mesons. By assuming $c=1$, show that the energy $K^+$ in the rest frame of the $D^0$ meson is given by $$E_K = \frac{1}{2} \left(M_D + \frac{m^2_K-m^2_{\pi}}{M_D} \right) $$
I have tried the following:
Conserving energy overall: $M_D = m^2_{\pi} + m^2_K$ (because the momenta have to be equal and opposite).
Then I considered the energy for the pion: $E^2_{\pi} = m^2_{\pi} + p^2$
and the k meson $E^2_K = m^2_K + p^2$, but I don't know what to do from here. When I combine them, I get square roots and horrible quantities. If someone could show me how this problem is done and give some tips for how to approach such problems, that'd be really helpful!