Forced Vibration of Cart attached to Wall by Spring

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

Proof
Let $\mathbf F_s$ be the force on $C$ exerted by the spring $S$.

Let $\mathbf F_d$ be the damping force.

Let $\mathbf F_e$ be the external force on $C$.

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


 * $\mathbf F_s + \mathbf F_d + \mathbf F_e = 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 definition, the velocity $\mathbf v$ is defined as:
 * $\mathbf v = \dfrac {\mathrm d \mathbf x}{\mathrm d t}$

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

By definition of the damping force:
 * $\mathbf F_d = - c \mathbf v$

By definition of the external force:
 * $\mathbf F_e = \mathbf F_0 \cos \omega t$

So: