# What's the proper interpretation of canceling infinitesimals? [duplicate]

In most textbooks of physics I've found this demonstration of work-kinetic energy theorem:

\begin{align} W &= \int_{x_{1}}^{x_{2}} F(x)\ dx \tag{1}\\ &= \int_{x_{1}}^{x_{2}} m\cdot a\ dx \tag{2}\\ &= m\int_{x_{1}}^{x_{2}} \frac{dv}{dt}\ dx \tag{3}\\ &= m\int_{x_{1}}^{x_{2}} \frac{dv}{dx} \cdot \frac{dx}{dt}\ dx \tag{4}\\ &= m\int_{x_{1}}^{x_{2}} \frac{dv}{dx} \cdot v \ dx \tag{5}\\ &= m\int_{v_{1}}^{v_{2}} v \ dv \tag{6}\\ &= \frac{1}{2}mv_{2}^{2} - \frac{1}{2}mv_{1}^{2} \tag{7} \end{align}

I don't fully understand how they go from (5) to (6). It seems that they cancel the dx as if they were algebraic elements. I know from calculus that $\int f(g(x))\cdot g'(x)\ dx = F(g(x))$, where $f(x)=F'(x)$ because we are applying the chain rule reversed. And in order to do so, Leibniz's notation can help us. If we define $u=g(x)$ and the "differential" $du=g'(x)dx$ the former integral turns in $\int f(u)\ du = F(u)$. But du and dx doesn't exist, they are just a notation we use to realize more easily that we can find the antiderivatives applying the chain rule reversed. So, what are the true mathematical operation they are doing between (5) and (6)?

I do not know how to deal with non-canonical interpretation of mathematical symbols in integrations, but in this case the proof is straightforward, first changing to $t$ the integration variable $x$ and next using $\frac{df}{dt} f = \frac{1}{2}\frac{df^2}{dt}$.
The position $x$ is parametrized by time $t$, so: $$W= \int_{x_1}^{x_2} F dx =\int_{x(t_2)}^{x(t_2)} F \frac{dx}{dt} dt = \int_{x(t_1)}^{x(t_2)} m\frac{d^2x}{dt^2} \frac{dx}{dt} dt = \int_{x(t_1)}^{x(t_2)} m\frac{dv}{dt} v dt$$ $$=\frac{m}{2} \int_{x(t_2)}^{x(t_2)} \frac{d v^2}{dt} dt= \frac{m v(t_2)^2}{2} - \frac{m v(t_1)^2}{2}$$