Integration by parts to derive relativistic kinetic energy I have come across a weird integration during derivation of relativistic kinetic energy. Our professor states that i can get RHS out of LHS using integration by parts: 
$$
\int\limits_0^x \! \frac{d}{d t}\Big[ mv \gamma(v)\Big]\,\, d x = v \!\cdot\! mv \gamma(v) - \int\limits_0^v \! m v \gamma(v)\, dv
$$

I know a standard formula for integration by parts which i wrote below, but I don't know how to choose $\frac{dg}{dx}$ or $f$ in my case. 
$$
\boxed{\int\! \frac{dg}{dx} f\,\, d x  = f \!\cdot\! g -\!\!  \int\! \frac{df}{dx}~g\,\, d x}
$$
How did my profesor do this? Any help will be appreciated.
 A: You set the dot $\cdot$ yourself. 
Plug in
$\text d x=\frac{\text d x}{\text d t} \text d t = v\ \text d t,$
$\text d v=\frac{\text d v}{\text d t}\text d t$
on the left and right hand side, respectively, and identify what is been differentiated with respect to $t$.
A: A little trick required here. Perform a substitution first:
\begin{equation}
mv \gamma(v) = u ,
\end{equation}
hence your integral becomes
\begin{equation}
\int \frac{du}{dt}dx ,
\end{equation}
but notice that
\begin{equation}
\frac{du}{dt} = \frac{du}{dx}\frac{dx}{dt}dx ,
\end{equation}
but $\frac{dx}{dt} = v$ - the definition of velocity! So the integral becomes:
\begin{equation}
\int \frac{du}{dt}dx = \int \frac{du}{dx}vdx .
\end{equation}
So now you can just apply your general formula with no changes! I.e.
\begin{equation}
\int \frac{du}{dx}vdx = uv - \int udv .
\end{equation}
Substituting for $u$ get
\begin{equation}
\int \frac{du}{dx}vdx = mv\gamma(v)v - \int mv\gamma(v)dv ,
\end{equation}
QED.
A: What follows is the quick and dirty way, which will be applauded by most physicists, scorned at by most mathematicians, and used wisely by us physicist-mathematicians who know what we're secretly doing when we abuse notation in this way...
Note that you have a $\mathrm{d}x$ over a $\mathrm{d}t$ on the left. Well,
$$ \frac{\mathrm{d}x}{\mathrm{d}t} = v, $$
so you can replace that. Now you have an integral of $v$ with respect to $mv\gamma$ (as opposed to the usual $f$ with respect to $x$). The right hand side follows immediately from integration by parts. Don't forget the limits are now $v(x = 0)$ (presumably equal to $0$) and $v(x)$ (written just $v$ for short). Actually the most confusing thing about this problem is using the same symbol for both the limits of integration and the dummy integration variable.
