Show that “whenever $v \ne 0$”, $m\frac{dv}{dt} = -kx$

calculusderivativesimplicit-differentiation

A particle of constant mass m moves along the $x$-axis. Its velocity $v$ and position $x$ satisfy the equation: $\frac{m}{2}(v^2 – v_0^2) = \frac{k}{2}(x_0^2 – x^2)$ where $K$, $Y_0$, and $X_0$ are constants. Show that whenever $v \ne 0$, $m\frac{dv}{dt} = -kx$.

My reasoning is this: we can treat the $x$ as $S$ and it's a function of $t$. Then the $v$ becomes a function of $x$. If we differentiate both sides of the equation according to the implicit differentiation rules, we'll get:
$$
\frac{m}{2}(2vv') = \frac{k}{2}(-2x) \\
mvv' = -kx
$$

If this is correct, the only case where $m\frac{dv}{dt} = -kx$ is when $V=1$, not "whenever $v \ne 0$". So I'm stuck here. Could, please, someone explain what is wrong here?

Best Answer

You forgot the chain rule on the right-hand side. You should have $x' = v$ there. Remember that you should be differentiating with respect to $t$, not with respect to $x$ (despite your comment to the contrary). — Remember that they're talking about $dv/dt$, NOT $dv/dx$; that's the clue.