Practica 2 Ejercicio 1

Mostrar que cada uno de los siguientes sistemas tiene una orbita periódica:

  • a)

    $$\left{ \begin{array}{lcc}

        \dot{x}_{1}=x_{2} \\
         \\ \dot{x}_{2}=-x_{1}+x_{2}(1-3x_{1}^{2}-2x_{2}^{2})
         \end{array}
    

    \right.$$

  • b)

$$ \ddot{y}+y=\epsilon \dot{y}(1-y^{2}-(\dot{y})^{2}) \:; \epsilon > 0 $$


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 = sym.symbols('x_1 x_2')

In [4]:
X = sym.Matrix([x_1, x_2])
X


Out[4]:
$$\left[\begin{matrix}x_{1}\\x_{2}\end{matrix}\right]$$

In [5]:
f_1 = x_2

In [6]:
f_2 = -x_1 + x_2 * (1 - 3 * x_1 ** 2 - 2 * x_2 ** 2)
f_2


Out[6]:
$$- x_{1} + x_{2} \left(- 3 x_{1}^{2} - 2 x_{2}^{2} + 1\right)$$

In [7]:
F = sym.Matrix([f_1,f_2])
F


Out[7]:
$$\left[\begin{matrix}x_{2}\\- x_{1} + x_{2} \left(- 3 x_{1}^{2} - 2 x_{2}^{2} + 1\right)\end{matrix}\right]$$

In [8]:
A = F.jacobian(X)
#A.simplify()
A


Out[8]:
$$\left[\begin{matrix}0 & 1\\- 6 x_{1} x_{2} - 1 & - 3 x_{1}^{2} - 6 x_{2}^{2} + 1\end{matrix}\right]$$

In [18]:
# puntos de equilibrio del sistema
pes = sym.solve([f_1,f_2],[x_1,x_2])
pes


Out[18]:
$$\begin{bmatrix}\begin{pmatrix}0, & 0\end{pmatrix}\end{bmatrix}$$

In [20]:
A_1 = A.subs({x_1:0,x_2:0})
A_1


Out[20]:
$$\left[\begin{matrix}0 & 1\\-1 & 1\end{matrix}\right]$$

In [21]:
A_1.eigenvals()


Out[21]:
$$\begin{Bmatrix}\frac{1}{2} - \frac{\sqrt{3} i}{2} : 1, & \frac{1}{2} + \frac{\sqrt{3} i}{2} : 1\end{Bmatrix}$$

In [28]:
eq =2 * x_2 ** 2 - 6 * x_1 * x_2 ** 2 - 4 * x_2 ** 4

In [29]:
eq.factor()


Out[29]:
$$- 2 x_{2}^{2} \left(3 x_{1} + 2 x_{2}^{2} - 1\right)$$

In [27]:
sym.plot_implicit(eq)


Out[27]:
<sympy.plotting.plot.Plot at 0x7fca80f266d0>

In [ ]: