$$\left\{ \begin{array}{lcc} \dot{x}_{1}=-x_{1}^3 + u\\ \\ \dot{x}_{2}=x_{1} \end{array} \right.$$
In [1]:
import sympy as sym
In [2]:
#Con esto las salidas van a ser en LaTeX
sym.init_printing(use_latex=True)
In [3]:
x_1, x_2 ,theta = sym.symbols('x_1 x_2 theta')
In [12]:
X = sym.Matrix([x_1, x_2])
X
Out[12]:
In [13]:
f_1 = -x_1**3 - x_2
In [14]:
f_2 = x_1
In [15]:
F = sym.Matrix([f_1,f_2])
F
Out[15]:
In [20]:
# puntos de equilibrio del sistema
pes = sym.solve([f_1,f_2])
pes
Out[20]:
In [21]:
A = F.jacobian(X)
A
Out[21]:
In [22]:
A_1 = A.subs({x_1:0,x_2:0})
A_1
Out[22]:
In [23]:
A_1.eigenvals()
Out[23]:
In [ ]: