Two formulas for relativistic energy - what is the difference?

(a) As others have said, it is a matter of algebra that the equations are equivalent, if we also throw in $$\mathbf p = m \gamma \mathbf u\ \ \ \ \text {leading to}\ \ \ \ \ p^2= m^2 \gamma^2 u^2$$ and $$\gamma =(1-v^2/c^2)^{-1/2}$$

(b) The second equation that you have quoted can be written as $$E^2 - c^2 p^2 = c^4 m^2$$ This is hugely important conceptually. Regard $E$ as the time component of a 4-vector and $c^2p^2$ as the sum of the squares of the magnitudes of the three spatial components of that vector. Combined using the minus sign we get the magnitude squared of the 4-vector, and this is the frame invariant quantity $c^4m^2$, as $m$ itself is frame invariant. Note that the factors of $c^2$ and $c^4$ are conceptually relatively unimportant.


First note that

$$1 + \gamma^2 \frac {v^2}{c^2} = 1 + \frac {v^2}{c^2-v^2} = \frac {c^2}{c^2-v^2} = \gamma^2$$

so

$$\sqrt{m^2c^4 + \gamma^2 m^2 v^2 c^2} = mc^2 \sqrt{1+ \gamma^2 \frac {v^2}{c^2}}=mc^2\sqrt{\gamma^2}=\gamma mc^2$$