I couldn't manage to find substantial contents on the web explaining why U(x) = -du/dx. But in thinking about why U(x) = -du/dx, I constructed an x-y axis where the x represents the displacement and y represents the potential energy U(x). Suppose I started with an object moving down slope where m = -ve at an Θ where Θ< 90°. Then as time progress the object continues to move in the +ve x-direction while potential energy decreases. The converse holds true if the object were to move up wards where m = +ve at the same angle. Potential energy U(x) would increase as it moves in the +ve x-direction. From this, it can then be seen mathematically that U(x) = -du/dx for an object in the first case. In the second case, the negative sign in U(x) would be replaced with a positive. But what happens when the object is fell at an angle Θ = 90° to the x-axis? It is fairly obvious the the answer would be a real number/ 0 but would this scenario make any mathematical sense?