Relationship between force and potential energy Consider a conservative force $\vec{F}=F_1\hat{i}+F_2\hat{j}+F_3\hat{k}   $  acting through a displacement $\vec{ds} =dx\hat{i}+dy\hat{j}+dz\hat{k}$. The work done $dw$, will be equal to $F_{1}dx +F_{2}dy +F_{3}dz$. From the work-energy theorem, this is equal to the change in kinetic energy $dK$.
However, since the force is conservative, $K+U$ is constant, so $dK=-dU$ , where $U$ is the potential energy. So we have:
$$-dU=F_{1}dx +F_{2}dy +F_{3}dz$$
From multivariable calculus, we know that $dU=\frac{\partial U}{\partial x} dx + \frac{\partial U}{\partial y} dy + \frac{\partial U}{\partial z} dz$. We thus have:
$(-F_{1})dx+(-F_{2})dy+(-F_{3})dz=\frac{\partial U}{\partial x} dx + \frac{\partial U}{\partial y} dy + \frac{\partial U}{\partial z} dz$.
Comparing , we can conclude that $F_{1}=-\frac{\partial U}{\partial x},F_{2}=-\frac{\partial U}{\partial y}$ and $F_{3}=-\frac{\partial U}{\partial z}$, which further implies,
$$\vec{F}=-\nabla{U}$$.
Question:
Now my worry is that the "comparing" step doesn't seem to be rigorous at all. Am I just being pedantic? And if it is indeed non-rigorous/wrong, how do we reach the conclusion from there?
 A: with
$$T=\frac{m}{2}(\dot x^2+\dot y^2+\dot z^2)$$
and
$$U=U(x,y,z)$$
you can obtain the equation of motion with Euler-Lagrange
$$m{\ddot x}+{\frac {\partial }{\partial x}}U \left( x,y,z \right)=0 $$
$$m{\ddot y}+{\frac {\partial }{\partial y}}U \left( x,y,z \right)=0 $$
$$m{\ddot z}+{\frac {\partial }{\partial z}}U \left( x,y,z \right)=0 $$
according to NEWTON second low
$$m\,{\ddot x}=F_x$$
$$m\,{\ddot y}=F_y$$
$$m\,{\ddot z}=F_z$$
thus
$$F_x=-{\frac {\partial }{\partial x}}U \left( x,y,z \right)$$
$$F_y=-{\frac {\partial }{\partial y}}U \left( x,y,z \right)$$
$$F_z=-{\frac {\partial }{\partial z}}U \left( x,y,z \right)$$
A: As far I can see there is no non-rigorous thing in comparing besides the proof can be made shorter.

The work is done by a conservative force $\mathbf{F}$ around a closed path is zero.
$$\oint \mathbf{F}\cdot d\mathbf{r}=0$$
Using the stokes' theorem, We conclude that
$$\nabla \times \mathbf{F}=0$$
which imply that
$$\mathbf{F}=-\nabla U$$

A: If by conservative force, it means that there is a scalar function U, such that:
$-dU =F_xdx + F_ydy + F_zdz$
the conclusion is mandatory, I see no problem.
Of course it is always possible to write:
$\Delta w = \mathbf {F.dx} =  F_xdx + F_ydy + F_zdz$ even for non conservative forces. But here $\Delta w$ is not the differential of a function, but only the result of a scalar product.
A: For any scaler differentiable function $g(\vec{r})$ $$\mathrm{d}g = \nabla g \cdot \mathrm{d}\vec{r}.$$
So $\mathrm{d} U = \nabla U \cdot \mathrm{d}\vec{r}$.
If $\mathrm{d} U = -\vec{F} \cdot \mathrm{d}\vec{r}$, for a conservative force, then $\nabla U$ must be identical to $-\vec{F}$
