Motion of Cart attached to Wall by Spring

Theorem
Consider a cart $C$ of mass $m$ attached to a wall by means of a spring $S$.

Let $C$ be free to move along a straight line with zero friction.

Let the force constant of $S$ be $k$.

Let the displacement of $C$ at time $t$ from the equilibrium position be $\mathbf x$.

Then the motion of $C$ is described by the second order ODE:
 * $\dfrac {\mathrm d^2 \mathbf x} {\mathrm d t^2} + \dfrac k m \mathbf x = 0$

Proof

 * CartOnSpring.png

By Newton's Second Law, the force on $C$ equals its mass times its acceleration:


 * $\mathbf F = m \mathbf a$

By Acceleration is Second Derivative of Displacement with respect to Time:
 * $\mathbf a = \dfrac {\mathrm d^2 \mathbf x}{\mathrm d t^2}$

By Hooke's Law:
 * $\mathbf F = -k \mathbf x$

So: