All the non-trivial solutions ( i.e. $x(t)\not\equiv 0$ ) of $$\frac{d^2x}{dt^2} = f(x)$$ has the same period, independent of the initial condition. Without loss of generality, set $$f(0)=0$$Does it imply that $$ f = -kx$$?
If not, what assumptions should be made to reach this conclusion?

update: What if $f$ is restricted to be an odd smooth (or at least continuous) function, in which case, we want to determine the continuous diffenrentiable function $F$ such that $$ \int\_0^{x\_0}\frac{1}{\sqrt{F(x\_0)-F(s)}}\mathrm{d}s $$ is a constant, and let $f(x) = - F'(x)$.