# Non-Associative Commutative Algebras for Dynamical Systems


We will consider quadratic dynamical systems, and go to general quasipolynomial differential equations of the form $$\dot{x_i} = x_i\sum_{j=1}^mA_{ij}\prod_{k=1}^nx_k^{B_{jk}}$$

In one dimension we have $$\dot{x}=ax^2+bx+c$$ or in the notation above $$\dot{x}=x(ax+b+c/x)=x\sum_{j=1}^3A_{j}x^{B_j}.$$  With $A_1=a$, $A_2=b$, $A_3=c$ and $B_1=1$, $B_2=0$, $B_3=-1$.


```python
import numpy as np
import sympy as sp
```


```python
a1,a2,a3=sp.Symbol("a1"),sp.Symbol("a2"),sp.Symbol("a3")
b1,b2,b3=sp.Symbol("b1"),sp.Symbol("b2"),sp.Symbol("b3")
U1,U2,U3=sp.Symbol("U1"),sp.Symbol("U2"),sp.Symbol("U3")
A=np.matrix([a1,a2,a3])
B=np.matrix([1,0,-1])
U=np.matrix([U1,U2,U3])
```


```python
M=np.outer(B,A)
```


```python
print M
```

    [[a1 a2 a3]
     [0 0 0]
     [-a1 -a2 -a3]]



```python
U0=np.array([7.,1.,1./7])
```


```python
np.multiply(np.matrix(M),np.matrix(U0).transpose())
```




    matrix([[7.0*a1, 7.0*a2, 7.0*a3],
            [0, 0, 0],
            [-0.142857142857143*a1, -0.142857142857143*a2, -0.142857142857143*a3]], dtype=object)




```python
np.matrix(U0)*np.matrix(M)*np.matrix(U0).transpose()
```




    matrix([[48.0*a1 + 6.85714285714286*a2 + 0.979591836734694*a3]], dtype=object)




```python
U*M*U.transpose()
```




    matrix([[U1*(U1*a1 - U3*a1) + U2*(U1*a2 - U3*a2) + U3*(U1*a3 - U3*a3)]], dtype=object)




```python

```

2b9ec0aa49a9487daa748505fae944e3d1c67bd0
ipynb
Jupyter Notebook
NACA/NACA-quadratic.ipynb
nborggren/Aleph
251dad70ddda9192630d8226c1316de3c3bc0b1b
CC0-1.0
NACA/NACA-quadratic.ipynb
nborggren/Aleph
251dad70ddda9192630d8226c1316de3c3bc0b1b
CC0-1.0
NACA/NACA-quadratic.ipynb
nborggren/Aleph
251dad70ddda9192630d8226c1316de3c3bc0b1b
CC0-1.0
Qwen/Qwen-72B
1. YES
2. YES