How limit is changed while deriving $E = mc^2$? While deriving $E = mc^2$ I found following in book by Arthur Beiser :

In non relativistic physics, the kinetic energy of an object of mass m and speed v is $\mathrm{KE} = \frac {1}{2} \ mv^2$ . To find the correct relativistic formula for KE we start from the relativistic form of the second law of motion,  Eq. $(1.19)$ , which gives
$$\mathrm{KE} = \int_0^{s} \frac {d(\gamma mv)}{dt}ds = \int_0^{mv} v \ d(\gamma mv) =\int _0 ^v v \ d \left(\frac {mv}{\sqrt {1 - v^2 / c^2}}\right)$$

While looking at limits of integration I found myself clue-less how limits of integration changed and whats the reason behind them even after searching the web I found noting in this context, can you please help me to sort this out.
Thank You in advance.
 A: We start with the starting point
$$K=\int_0^s\frac{d(\gamma mv)}{dt}ds=\int_?^? vd(\gamma mv)$$
which is simply the work-energy theorem. The limits here are of distance traveled by the particle.
Now, the limit depends on the variable about which the integration is. To make things simple, Assume the point $a$ and $b$. The limit point $a$ means the value of a variable (about which the integration is) at point $a$.
We can then write
$$K=\int_a^bv\ d(\gamma mv)=\int_a^b d(\gamma mv^2)-\int_a^b\gamma mvdv $$
where we used the fact that $d(\gamma mv\times v)=vd(\gamma mv)+\gamma mv\ dv$. Now we can do the integration
$$K=\left.\gamma mv^2\right|^b_a-\left.\frac{mc^2}{\gamma}\right|^a_b$$
Now we see that at the end the variables is $v$ only. Putting $v_a=0$ and $v_b=v$, We have the required result
$$K=(\gamma-1)mc^2$$
A: We know that :

$dP=(dE/c,d\vec{p})$
$dX=(cdt,d\vec{x})$
$V=(\gamma c,\gamma\vec{ v})$

And :
$ dP.dX= dEdt-d\vec{p}.\vec{x}=0$
$dE=\frac{dxdp}{dt} $
$\Delta E= K=\int_{0}^{x} \frac{dxdp}{dt}=\int_{0}^{x} vdp \tag1$
we also have:
$ dP.dV=(dE/c) \gamma c -\gamma d\vec{p}.\vec{v}=0$
$dE=vdp$
$ \Delta E= K=\int_{0}^{p}vdp \tag2$
from $(1)$ and $(2)$ we have the equality of the integrals.
The same thing for the other egality ...
