```
from sympy import init_printing, var, simplify, collect, solve
```


```
var("k a b")
```




    (k, a, b)




```
init_printing()
```


```
f= k**2*(-a-1) + k*(-a*b - 2*a - 1) + (b**2 + b)
```


```
fsimp = simplify(solve(f, k))
```


```
import sympy
```


```
fsimp
```


```
f
```


```
fsimp
```


```
fsimp[0].subs(a, 1).subs(b, 1)
```


```
fsimp[1].subs(a, 1).subs(b, 1)
```


```
fsimp[0].subs(a, 0).subs(b, 0)
```


```
fsimp[1].subs(a, 0).subs(b, 0)
```


```
infty
```


```
import control
```


```
var("s")
```


```
num = [0, 1, -2, 1]
den = [1, 2, 1, 0]
```


```
funcion = control.tf(num, den)
```


```
roots([1, 2.6, 1-1.2, .6])
```




    array([-2.75190589+0.j        ,  0.07595294+0.46071885j,
            0.07595294-0.46071885j])




```
x,y = control.rlocus(funcion, linspace(-20, 20, 10000))
```


```
x = linspace(0, 10, 100)
y = sin(x)
```


```
plot(x, y)
```


```
figsize(15, 3)
```


```

```

011e66dc378a6b26456f2bd5dc7f5178141d54df
ipynb
Jupyter Notebook
IPythonNotebooks/Propedeutico/Varios.ipynb
chelizalde/DCA
34fd4d500117a9c0a75b979b8b0f121c1992b9dc
MIT
IPythonNotebooks/Propedeutico/Varios.ipynb
chelizalde/DCA
34fd4d500117a9c0a75b979b8b0f121c1992b9dc
MIT
IPythonNotebooks/Propedeutico/Varios.ipynb
chelizalde/DCA
34fd4d500117a9c0a75b979b8b0f121c1992b9dc
MIT
2021-03-20T12:44:13.000Z
2021-03-20T12:44:13.000Z
Qwen/Qwen-72B
1. YES
2. YES