Passage not understood in a Physics formula I stumbled upon the demonstration of the energy problem and saw something I don't understand.
I thought mathematicians would be happier to solve his kind of problem
$$ \int_a^b \vec F \cdot d \vec s = \int_a^b m\vec a  \cdot d\vec s = \int_a^b m {d \vec v \over dt}  \cdot d\vec s = \int_a^b m d \vec v \cdot {d\vec s \over dt} = \cdots$$
Why can I do the last passage? I think it's a kind of scalar product property mixed to some differentials propery, but I can't figure out better, and on my book it's all taken for granted. I mean, it's not like I can take that $ dt$ and pass it below everything I want, right?
Sorry if the question is too simple but I want to know everything I go through, as I go through. Tell me to delete it and I will if it's a problem. Bye!
 A: Yes you can. But if you think that is not "formal" enough, just look at it the following way: 


*

*Note that $$\frac{d}{dt}(\vec{v}\cdot\vec{v})=\frac{d}{dt}\left({\frac{d\vec{s}}{dt}\cdot\frac{d\vec{s}}{dt}}\right)=2\frac{d\vec{s}}{dt}\cdot\frac{d^2\vec{s}}{dt^2}= 2\vec{v}\cdot\frac{d\vec{v}}{dt}$$

*Look at the definition of integration along a path $$\int \vec{F}\cdot d\vec{s} \equiv \int \vec{F}\cdot \frac{d\vec{s}}{dt} dt = \int \vec{F}\cdot \vec{v} dt$$


If you combine these two facts, you'll see that the manipulations that happened are just a shortcut for this.
A: Let me fix notation before arriving at the core of the answer 


*

*Notation 


The integral you are trying to understand it defined as follows:
$$\int_s F:=\int_a^b \langle F(s(t)),\frac{ds}{dt}\rangle dt=\sum_{i=1}^3 \int_a^b F_i(s(t))s_i(t) dt $$
i.e. the integral of the vector field $F=(F_1,F_2,F_3)$ along the curve $t\mapsto s(t)=(s_1(t),s_2(t),s_3(t))$, denoting by $\frac{ds}{dt}$ the tangent vector of the curve $s$ at $s(t)$. In your notation
$$ds=(s_1(t)dt,s_2(t)dt,s_3(t)dt)$$
$$\int_s F:=\int_a^b F\cdot ds, $$
and  $F\cdot ds=\sum_{i=1}^3 F_i(s(t))s_i(t) dt$.


*

*Computation


We have 
$$\int_a^b \langle F(s(t)),\frac{ds}{dt}\rangle dt=
\int_a^b \frac{d}{dt}\left(\langle F(s(t)),s(t)\rangle\right)dt  -\int_a^b \langle \frac{dF(s(t))}{dt},s(t)\rangle dt,~~(*) $$
which follows from the definition of the scalar product $\langle\cdot,\cdot\rangle$.  In summary
$$\int_a^b \langle F(s(t)),\frac{ds}{dt}\rangle dt=
 \langle F(s(b)),s(b)\rangle-\langle F(s(a)),s(a)\rangle  -\int_a^b \langle \frac{dF(s(t))}{dt},s(t)\rangle dt. $$
Note the presence of the boundary terms for $t=a$ and $t=b$.


*

*F=m\frac{d^2s}{dt^2}


In this specific case, we have
$$\int_s F=\int_a^b \langle F(s(t)),\frac{ds}{dt}\rangle dt=
\int_a^b m \langle \frac{d^2s}{dt^2},\frac{ds}{dt}\rangle dt= \int_a^b m \sum_{i=1}^3 \frac{d^2s_i}{dt^2}\frac{ds_i}{dt}dt=(\text{first option})=
\int_a^b m \sum_{i=1}^3 \frac{d^2s_i}{dt^2}ds_i=(\text{second option})=
\int_a^b m \sum_{i=1}^3 dv_i\frac{ds_i}{dt},$$
denoting by $dv_i$ the expression
$$dv_i:=\frac{dv_i}{dt}dt.$$
