Change of variable in a line integral. A more formal proof. First, clarify that this is not a question about physics itself, but about mathematics.
I was looking at some physics proof on the wikipedia and found the following change of variable in a line integral (the vectors are represented in bold and the scalars in non-bold):
$$W_{1 \rightarrow 2} = \int_{r_1}^{r_2} \textbf{F} \cdot d\textbf{r} = \int_{r_1}^{r_2} m\textbf{a} \cdot d\textbf{r} = \int_{r_1}^{r_2} m\frac{d\textbf{v}}{dt} \cdot d \textbf{r} = m \int_{v_1}^{v_2} \textbf{v} \cdot d\textbf{v}$$
In this case, m is a constant and can be taken out of the integral. Also, I understand the intuition behind the change of variable, that is: $\frac{d\textbf{v}}{dt}\cdot d\textbf{r} = d\textbf{v} \frac{d\textbf{r}}{dt} = d\textbf{v}\cdot\textbf{v}$. Simply, the $dt$ was placed beneath the $d\textbf{r}$, and the integral bounds were changed from $r_1$ to $v_1$, and from $r_2$ to $v_2$ due to the change of variable. Also, $\frac{dr}{dt}$ turns out to be $\textbf{v}$ in our context. However, I don't fully understand why this change of variable works. Could somebody give me a more detailed or formal process showing how this change of variable is performed? Thanks.
 A: The following should work: First make a substitution to change your integration variable to $t$, which gives $\mathrm{d}\mathbf{r}=\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}\mathrm{d}t$, i.e.
$$
\int_{r_1}^{r_2} m\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\mathrm{d}\mathbf{r}=\int_{t_1}^{t_2} m\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}\mathrm{d} t.
$$
Now do the same operation backwards, but just with $\mathbf{v}$ instead of $\mathbf{r}$, i.e. substitute and make $\mathbf{v}$ the integration variable; this gives $\mathrm{d}\mathbf{v}=\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\mathrm{d}t$ and therefore
$$
\int_{t_1}^{t_2} m\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\mathrm{d} t=\int_{v_1}^{v_2} m\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}\mathrm{d}\mathbf{v}.
$$
Finally, use $\frac{\mathrm{d}\mathbf{r}}{\mathrm{d} t}=\mathbf{v}$ and you're done.
Just as well, you could do this all at once and change variables from $\mathbf{r}$ to $\mathbf{v}$ immediately. This would give $\mathrm{d}\mathbf{r}=\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}\mathbf{v}}\mathrm{d}\mathbf{v}$ and hence
$$
\int_{r_1}^{r_2} m\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\mathrm{d}\mathbf{r}=\int_{v_1}^{v_2} m\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}\mathbf{v}}\mathrm{d}\mathbf{v}
$$
But, according to the chain rule, $\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}\mathbf{v}}=\frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}$ and you're finished once again.
