Solution (source code)

= Solution

Let $M_P$ and $M_D$ denote neutral atomic <rest masses> for the appropriate parent and daughter, and initially neglect electronic <binding energy> corrections and daughter excitation. The <Q values> are
$$
\boxed{Q_{\beta^-}=(M_P-M_D)c^2,\qquad
Q_{\beta^+}=(M_P-M_D-2m_e)c^2,\qquad
Q_{\mathrm{EC}}=(M_P-M_D)c^2.}
$$
For <beta-minus decay>, the daughter <nucleus> has one extra positive charge. Its neutral atom contains one more <electron> than the neutral parent, cancelling the emitted <electron>'s <rest mass> in the atomic accounting. For <beta-plus decay>, the neutral parent contains one more <electron> than the neutral daughter; together with the emitted <Positron>, this gives the $2m_e$ subtraction. Thus <beta-plus decay> requires an atomic <mass> difference exceeding $2m_ec^2$, whereas <electron capture> need not.

For <electron capture>, the captured bound <electron> is already included in $M_P$. Capture from a shell leaving an atomic hole of excitation <energy> $E_{\mathrm{hole}}$, and a nuclear excited state of <energy> $E_x$, gives approximately
$$
E_\nu=Q_{\mathrm{EC}}-E_x-E_{\mathrm{hole}}-T_{\mathrm{recoil}}.
$$
The hole's <energy> later appears as atomic radiation or <Auger electrons>. Subtract $E_x$ for either <beta decay> as well. Exact endpoints also depend on daughter ionization and small atomic <binding energy> changes; the boxed expressions are the conventional leading atomic-<mass> formulas.