state space formulation of a sinusoidal system
I make you an example about how to write state-space equations using a dynamic second order equation to let you understand the procedure.

The starting equation is: $$M a + C v + K  s = f $$ 
$C$ is damping, $K$ is stiffness and $M$ is the mass.

Then build your state vector $x =\pmatrix{s\\ v}$

Now write the equation like $ a = 1/M (f - C v - K s)$

$\dot{x} = \pmatrix{v\\ a}$ 
is the derivative of the state vector.

In the state space:

$\dot{x} = \pmatrix{0&amp; 1, \\-K/M&amp; -C/M} x + \pmatrix{0 \\ 1/M} f$

If you want the displacement as output

$y = \pmatrix{1\\ 0} x $