# Urgent Help! state-variables and differential equations

#### Eng_Bandar

Joined Feb 27, 2010
46
How can I solve the following differential equations to get the state-space equation?

my'' = -km' - gm

x1 = y $$\rightarrow$$ x1' = x2
x2 = y' $$\rightarrow$$ x2' = y''
x3 = m
u = m'

Eq1 x1' = x2
Eq2 x3 x2'' = - kx3' - gx3

The problem that I face with Eq2 specifically x3.x2''
I know X' = Ax + Bu and I know how I get it if it is only like this x2'' = ....
but there there is another variable times x2

Any suggestions!

#### CircuitZord

Joined Oct 8, 2012
59
Kind of hard to see what you're doing there, but I was under the impression that each successive x: x1, x2, x3, etc. is assigned the next derivative.