```python
import sys
sys.path.append("..")
import symlc
import sympy.printing.latex as ltx
from sympy import init_printing
import sympy as sp
import matplotlib.pyplot as plt

init_printing()
```

# Van der Pol oscillator


```python
#van der Pol
%matplotlib notebook
a = symlc.dynsys([
        "x1_1-1./p1_1*(1-x1_0*x1_0/3.)*x1_0-1./p1_1*x2_0",
        "x2_1+x1_0"
])

a.equations
```


```python
numerics = {"time":[0.,120.,1000.], "initial_condition":[0.,1.]}

a.plot_slow_mf_and_simulation({'p1_1':0.05}, numerics=numerics)
```

# Rayleigh oscillator


```python
#Rayleigh
b = symlc.dynsys([
        "x1_2-p1_1*(1-x1_1*x1_1)*x1_1+p1_2*x1_0"
])

b.equations
```


```python
b.plot_slow_mf_and_simulation({'p1_1':6, 'p1_2':1}, numerics=numerics)	#Rayleigh
```

# Fitz Hugh-Nagumo system


```python
#FitzHugh-Nagumo
c = symlc.dynsys([
        "x1_1-x1_0+1./3.*x1_0*x1_0*x1_0+x2_0-p1_1",
        "p2_1*x2_1-x1_0-p2_2+p2_3*x2_0"
])

c.equations
```


```python
numerics["initial_condition"]=[0.,1.5]
c.plot_slow_mf_and_simulation({'p1_1':0.5, 'p2_1':12.5,'p2_2':0.8,'p2_3':0.7}, numerics=numerics)	
```

# Lorenz system


```python
#Lorenz system
d = symlc.dynsys([
		"x1_1+p1_1*x1_0-p1_1*x2_0",
		"x2_1+x1_0*x3_0-p2_1*x1_0+x2_0",
		"x3_1-x1_0*x2_0+p3_1*x3_0"
])

d.equations
```


```python
print("Flow curvature manifold Lorenz model")
numerics={"initial_condition":[1.,4.,1.], "time":[0.,1000.,1000]}
%matplotlib notebook
d.plot_slow_mf_and_simulation_3d({'p1_1':10.,'p2_1':28.,'p3_1':8./3.}, numerics=numerics, bbox=(-40., 40.))
```


```python
d.plot_slow_mf_and_simulation_3d({'p1_1':10.,'p2_1':28.,'p3_1':8./3.}, numerics=numerics, bbox=(-40., 40.))
```

# Stuart Landau equation


```python
#Stuart Landau (fromulation as real second order system from https://arxiv.org/pdf/1403.2907.pdf )
e = symlc.dynsys([
    "x1_1-(1-x1_0**2-x2_0**2)*x1_0-p1_1*x2_0",
    "x2_1+(1-x1_0**2-x2_0**2)*x2_0+p1_1*x1_0"
])

e.equations
```


```python
print("Flow curvature manifold Stuart Landau model")
numerics["initial_condition"] = [0.,1.]
e.plot_slow_mf_and_simulation({'p1_1':1}, numerics=numerics)
```


```python

```

b10cdc1fd5c472323ad0d8f99b7ac13905ee397f
ipynb
Jupyter Notebook
examples/example_notebook.ipynb
thomoseidler/symlc
85548e7ad925f5d24836ed08d8b6c43d251b9c4e
MIT
2020-08-26T08:47:33.000Z
2020-08-26T08:47:33.000Z
examples/example_notebook.ipynb
thomoseidler/symlc
85548e7ad925f5d24836ed08d8b6c43d251b9c4e
MIT
2020-10-27T10:24:16.000Z
2020-10-27T10:24:16.000Z
examples/example_notebook.ipynb
thomoseidler/symlc
85548e7ad925f5d24836ed08d8b6c43d251b9c4e
MIT
Qwen/Qwen-72B
1. YES
2. YES