Deriving the work-energy theorem in three dimensions from Newton's second law of motion and justifying moving around differentials I wanted to prove the work energy theorem in three dimensions starting from Newton's second law of motion. I am having some trouble understanding differential swapping and deriving the kinetic energy formula in three dimensions. Assuming $F_c$ is the sum of all conservative force and $F_{nc}$ is a non-conservative force, for one dimension I have the following.
$$F_{c}+F_{nc}=ma$$
$$\int_{x_{1}}^{x_{2}}F_{c}\ dx\ +\ \int_{x_{1}}^{x_{2}}F_{nc}\ dx\ =m\int_{x_{1}}^{x_{2}}adx$$
$$adx=\frac{dv}{dt}dx=\frac{dx}{dt}dv=vdv \; \label{*} \tag{*}$$
$$m\int_{v\left(x_{1}\right)}^{v\left(x_{2}\right)}vdv\ =\ \frac{1}{2}mv\left(x_{2}\right)^{2}-\frac{1}{2}mv\left(x_{1}\right)^{2}=KE_f-KE_i$$
Using $\frac{dU}{dx}=-F_{c}$, and assuming integrating $F_{nc}$ gives a change in energy $ΔW_{nc}$, we have,
$$U_{i}-U_{f}\ +\ ΔW_{nc}=KE_{f}-KE_{i}.$$

In the manipulation to obtain equation $\eqref{*}$, why exactly are we allowed to swap the differentials? Is there a rigorous way to show why you're allowed to do that?

Moreover for the 3D case, assuming that an object is moving along a curve $C$,
$$\vec{F_c}+\vec{F_{nc}}=m\vec{a},$$
$$\int_C \vec{F_c}\cdot d\vec{r} +\int_C \vec{F_{nc}}\cdot d\vec{r} = m\int_C \vec{a}\cdot d\vec{r},$$
and further using,
$$\nabla U=-\vec{F_c}$$
$$\int_C \vec{F_c}\cdot d\vec{r}=-\int_C\nabla U\cdot d\vec{r} = U_i-U_f,$$we have
$$U_{i}-U_{f}\ +\ ΔW_{nc} = m\int_C (a_x \hat{i}_x + a_y \hat{i}_y + a_z \hat{i}_z) \cdot d\vec{r}.$$

How exactly do we handle the final integral on the right? I’m sort of confused since $a$ is an acceleration field now, and I’m not sure if I can do the differential swap trick from before. Is $\vec{a}$ the time derivative of a velocity field now? Also on a different note, could that integral be evaluated using the fundamental theorem of line integrals?

The final result $KE_f-KE_i$ involves computing a value at the beginning and end of the curve (similar to what FTC of line integrals does). That's why I was asking. Thanks!
 A: Thanks to the OP for posting this great question. Indeed in mathematical physics  it is more expedient to manipulate integrals and derivatives using the approach of the infinitesimal calculus or the nonstandard calculus. However, mathematical rigor can often provide clarity and avoid differentiability issues which lead to erroneous calculations.
Addressing the first part of the question requires application of the change of variables theorem. We denote the twice differentiable $C^2(\mathbb{R})$ (for convenience) scalar functions $x: t \mapsto x(t), v: t \mapsto \frac{dx}{dt}(t)$, $a: t \mapsto \frac{d^2x}{dt^2}(t)$ and $F_c + F_{nc}: x \mapsto F_c(x) + F_{nc}(x)$. The definite integral manipulation corresponding to the mathematically accurate definition of the mass normalized work ($\frac{1}{m} \int_{x_1}^{x_2} (F_c + F_{nc})(x) \; dx := \int_{t_1}^{t_2} a(x(t)) \frac{dx}{dt}(t) \; dt$), which uses the change of variable $x = x(t)$, given as
$$\frac{1}{m} \int_{x_1}^{x_2} (F_c + F_{nc})(x) \; dx = \int_{x_1}^{x_2} a(x) \; dx = \int_{t_1}^{t_2} a(x(t)) \frac{dx}{dt}(t) \; dt,$$ where $x(t_1) = x_1$ and $x(t_2) = x_2$ implies that
$$\int_{x_1}^{x_2} a(x) \; dx = \int_{t_1}^{t_2} \frac{dv}{dt}(t) v(t) \; dt,$$ while the change of variable $v = v(t)$ (applied in reverse, to state the manipulation in words) implies that
$$\int_{x_1}^{x_2} a(x) \; dx = \int_{t_1}^{t_2} \frac{dv}{dt}(t) v(t)  \; dt = \int_{t_1}^{t_2} v(v(t)) \frac{dv}{dt}(t) \; dt  = \int_{v_1}^{v_2} v(v) \; dv = {\Huge[} \frac{v^2}{2}{\Huge]}{\Huge|}_{v_1}^{v_2},$$
where $v(t_1) = v_1$ and $v(t_2) = v_2$. The work-energy theorem in the one dimensional case follows directly from this result. This completes the first part of the answer.
The vector dot product $(a_x \hat{i}_{x} + a_y \hat{i}_{y} + a_z \hat{i}_{z}) \cdot d\vec{r} = a_x d x + a_y dy + a_z dz$ so that, using the previous result, $$\int_{C} (a_x \hat{x} + a_y \hat{y} + a_z \hat{z}) \cdot d\vec{r} = \int_{(x_1,y_1,z_1)}^{(x_2,y_2,z_2)} (a_x \hat{x} + a_y \hat{y} + a_z \hat{z}) \cdot d\vec{r} \\ = \int_{x_1}^{x_2} a_x dx + \int_{y_1}^{y_2} a_y dy + \int_{z_1}^{z_2} a_z dz = \frac{1}{2}({\large[}v_x^2{\large]}{\Huge|}_{v_{x1}}^{v_{x2}} + {\large[}v_y^2{\large]}{\Huge|}_{v_{y1}}^{v_{y2}} + {\large[}v_z^2{\large]}){\Huge|}_{v_{z1}}^{v_{z2}} = \frac{1}{2} [\|\vec{v}\|^2]{\Huge|}_{\vec{v}_1}^{\vec{v}_2},$$ which completes the second part of the answer.

Finally, defining $\Delta W_{c} := \int_{x_1}^{x_2} \vec{F}_{c} \cdot d \vec{r} := \int_{x_1}^{x_2} \vec{F}_{c} \cdot \frac{d \vec{v}}{dt}(t) \; dt$, $\nabla V(\vec{r}) := - \vec{F}_c(\vec{r})$ (such a potential function $V \in C^1(\mathbb{R})$ exists due to the definition of conservative forces (which are not necessarily central forces but have a form related to the central forces) $\vec{F}_c(\vec{r}) := \|\vec{F}_c (\vec{r}) \| \frac{\vec{r}}{\|\vec{r}\|}$), $\Delta W_{nc} := \int_{x_1}^{x_2} \vec{F}_{nc} \cdot d \vec{r} := \int_{x_1}^{x_2} \vec{F}_{nc} \cdot \frac{d \vec{v}}{dt}(t) \; dt$ and $T(\vec{v}) := \frac{1}{2} m \|\vec{v}\|^2$, we can state the work-energy theorem for a material particle on which conservative and non-conservative forces act as
$$\Delta W_{c} + \Delta W_{nc} = V(\vec{r}_1) - V(\vec{r}_2) + \Delta W_{nc} = T(\vec{v}_2) - T(\vec{v}_1),$$
with the conservation form given as
$$V(\vec{r}_1) + T(\vec{v}_1) = V(\vec{r}_2) + T(\vec{v}_2) - \Delta W_{nc}.$$.
A: If you remember the definition of a differential then you'd know that you can write $dx$ as
$$dx = \frac{dx}{dt}dt$$
So that you get
$$\frac{dv}{dt}dx = \frac{dv}{dt} \frac{dx}{dt} dt$$
$$ = \left( \frac{dv}{dt} dt \right) \frac{dx}{dt}$$
$$ = \frac{dx}{dt} dv$$
As for the 3d case, you already did half the work. Write $\mathbf{dr}$ as $dx \hat{i} + dy \hat{j} + dz \hat{k}$ and finish the dot product. Then do the same thing component wise what you did in the 1d case you'll get
$$\frac{1}{2} m v_x^2 + \frac{1}{2} m v_y^2 + \frac{1}{2} m v_z^2$$
A: First of all,mechanical energy isn't conserved when $\vec{F_{nc}}$ is there in the system unless it does zero work.So the proof is coming not exactly similar to proof of work energy theorem but quite relatable to that.
Coming to swapping differentials, isn't that like this:
$$adx=\frac{dv}{dt}dx$$
Multiplying and dividing by $dt$
$$adx=\frac{dv}{dt}\frac{dx}{dt}dt$$
$$ = \left( \frac{dv}{dt} dt \right) \frac{dx}{dt}$$
$$ = \frac{dx}{dt} dv$$
Now,
$$adx=vdv$$
The last integral $\int_C (a_x \hat{i}_x + a_y \hat{i}_y + a_z \hat{i}_z) \cdot d\vec{r}$ can be carried out if $d\vec{r}$ is written as:
$$dx\hat{i}_x+dy\hat{i}_y+dz \hat{i}_z$$
Carrying out the dot product with $\vec{a}$, it will be given as:
$$a_{x}dx+a_{y}dy+a_{z}dz$$
It's easy to swap differential here as we get $a_{x}dx=v_{x}dv_{x}$, $a_{y}dy=v_{y}dv_{y}$ and $a_{z}dx=v_{z}dv_{z}$.
