Position of Cart attached to Wall by Spring/x = x0 at t = 0

Problem Definition
Let $C$ be pulled aside to $x = x_0$ and released from stationary at time $t = 0$.

Then the horizontal position of $C$ at time $t$ can be expressed as:
 * $x = x_0 \cos \alpha t$

where $\alpha = \sqrt {\dfrac k m}$.

Proof
From Position of Cart attached to Wall by Spring, the horizontal position of $C$ is given as:
 * $(1): \quad x = C_1 \cos \alpha t + C_2 \sin \alpha t$

where:
 * $C_1$ and $C_2$ depend upon the conditions of $C$ at time $t = 0$
 * $\alpha = \sqrt {\dfrac k m}$

Differentiating $(1)$ $x$ gives:
 * $(2): \quad x' = -C_1 \alpha \sin \alpha t + C_2 \alpha \cos \alpha t$

Setting the initial condition $x = x_0$ when $t = 0$ in $(1)$:

Setting the initial condition $x' = 0$ when $t = 0$ in $(1)$:

Hence:
 * $x = x_0 \cos \alpha t$

where $\alpha = \sqrt {\dfrac k m}$.