Getting from $E^2 - p^2c^2 = m^2c^4$ to $E = \gamma mc^2$ What is each mathematical step (in detail) that one would take to get from:
$E^2 - p^2c^2 = m^2c^4$ 
to
$E = \gamma mc^2$,
where $\gamma$ is the relativistic dilation factor.
This is for an object in motion.
NOTE: in the answer, I would like full explanation. E.g. when explaining how to derive $x$ from $\frac{x+2}{2}=4$, rather than giving an answer of "$\frac{x+2}{2}=4$, $x+2 = 8$, $x = 6$" give one where you describe each step, like "times 2 both sides, -2 both sides" but of course still with the numbers on display. (You'd be surprised at how people would assume not to describe in this detail).

Starting with your given equation, we add $p^2 c^2$ to both sides to get
$$ E^2=m^2 c^4 + p^2 c^2$$
now using the definition of relativistic momentum $p=\gamma m v$ we substitute that in above to get
$$E^2 = m^2 c^4 +(\gamma m v)^2 c^2=m^2 c^4 +\gamma^2 m^2 v^2 c^2$$
Now, factoring out a common $m^2 c^4$ from both terms on the RHS in anticipation of the answer we get
$$E^2=m^2 c^4 (1+\frac{v^2}{c^2}\gamma^2)$$
Now using the definition of $\gamma$ as 
$$\gamma=\frac{1}{\sqrt{1-\frac{v^2}{c^2}}}$$
and substituting this in for $\gamma$ we get
$$E^2=m^2 c^4 \left(1+\frac{\frac{v^2}{c^2}}{1-\frac{v^2}{c^2}}\right)$$
and making a common denominator for the item in parenthesis we get
$$E^2=m^2 c^4 \left( \frac{1}{1-\frac{v^2}{c^2}} \right)=m^2 c^4 \gamma^2$$
Taking the square root of both sides gives
$$E=\pm \gamma mc^2$$
Hope this helps.
