How to derive the equation of motion for $x$ in 1D from energy conservation $E=\frac{1}{2}\left(\frac{\text d x}{\text d t}\right)^2 + V(x)$? I just can't seem to find the answer to this seemingly simple question. Suppose we have a function $x$ of $t$, and we know that the following quantity is constant, i.e., independent of time:
\begin{align}
\frac{1}{2}\left(\frac{\text d x}{\text d t}(t)\right)^2 + V(x(t)) = E = \text{const.}
\end{align}
This of course reminds one of the energy of a particle (of unit mass) in a potential $V$. Now I'm sure it should be the case that 
\begin{align}
\frac{\text d^2 x}{\text d t^2}(t) = -\frac{\text d V}{\text d x}(x(t)), \tag{1}
\end{align}
but I can only prove this for those values of $t$ for which d$x/$d$t\neq 0$, in which case we simply have
\begin{align}
0 = \frac{\text d E}{\text d t} = \frac{\text d x}{\text d t}\frac{\text d^2 x}{\text d t^2} + \frac{\text d V}{\text d x}\frac{\text d x}{\text d t} = \frac{\text d x}{\text d t}\left(\frac{\text d^2 x}{\text d t^2} +\frac{\text d V}{\text d x}\right)
\end{align}
from which the result follows.
So my question is, how does one show that $(1)$ holds, even if $(\text d x/\text d t)(t_0)=0$ for some $t_0$?
 A: Taking another derivative we get (dot being a time derivative and prime a spatial derivative)
\begin{equation}
 \ddot E = 0 = \ddot x(\ddot x + V') + \dot x (\dddot x +V''\dot x) 
\end{equation}
in which the second term gives $0$ for $\dot x=0$. For $\ddot x\neq 0$ the desired equation follows. 
A: For completeness, here is the proof for those values of $t_0$ for which $\dot x(t_0)= \ddot x(t_0) = 0$, as this is the only case not mentioned by Philo in his answer. 
Since $\dot x(t_0) =0$, the constancy of $E=\frac{1}{2}\dot x^2 + V(x)$ shows that $V$ (as function of $t$) has a global maximum at $t_0$. But in fact this is also a global maximum at $x(t_0)$ of $V$ seen as function of $x$, since $V$ simply cannot get larger then $E$ because of the positivity of the term $\frac{1}{2}\dot x^2$. Since we also assume that $V$ is differentiable w.r.t. $x$ at $x(t_0)$, so that we implicitly are saying that $x(t_0)$ is an interior point of the domain of $V$, this global maximum is also a local maximum, which then implies that we have $($d$V/$d$x)(x(t_0))=0$. Since we also have $\ddot x(t_0)=0$, this yields the desired result at $t_0$.
