A mass $m$ is moving along the $x$-axis under the influence of a force $F(x)$ according to Newton’s Second Law, i.e., $F = ma$ . Note that $F(x)$ depends only on $x$, so that it is a conservative force, i.e. there exists a potential energy function $U(x)$ such that $F(x) = -U'(x)$ . Prove that the total energy $E(t)$ , i.e. the sum of the kinetic energy and the potential energy, is constant.
So far,I've defined $V(x)$ as velocity and said the $V'(x) = a$. From there kinetic energy $K(x) = (1/2)m V(x)^2$. The derivative of $K(x)$ is $mV'(x)$ or $ma$ which is equal to $F(x)$. For $E(t)$ to be constant, its derivative must be 0. I used the equation $E(t) = K(x) + U(x)$ and found the first derivative: $K'(x) - (-U'(x))$ which is equal to $F(x) - F(x) = 0$. Therefore, the total energy is constant.
Is this a valid solution?