# Polynomials in SymPy & NumPy

## SymPy

### Refererences

[SymPy documentation](https://docs.sympy.org/latest/index.html)

* [Polynomial Manipulation](https://docs.sympy.org/latest/modules/polys/index.html)


```python
from sympy import *
```

Initialize the pretty-printer depending on the environment.


```python
init_printing(use_unicode=False, wrap_line=False)
```

Create some *symbols* (sympy.core.symbol.Symbol).


```python
x, y, z = symbols('x,y,z')
```

### SymPy Polynomials


```python
e1 = (x + y)*(y - 2*z)
e1
```


```python
e1.as_poly()
```


```python
e2 = (3*x/2 + y)*(z - 1)
e2
```


```python
e2.as_poly()
```


```python
e3 = (x + 2*pi)*y
e3
```


```python
e3.as_poly()
```


```python
e3.as_poly(x, y)
```


```python
e3.as_poly(domain=ZZ[pi])
```


```python
e4 = x + sqrt(2)
e4
```


```python
e4.as_poly()
```


```python
e4.as_poly(extension=True)
```


```python

```


```python

```


```python

```

862cdf0507ab9be29fe6ec21a32473ec70a54cca
ipynb
Jupyter Notebook
notebooks/Untitled.ipynb
alreich/abstract_algebra
9aca57cbc002677aeb117f542a961b7cbdfd4c29
MIT
2021-12-04T11:23:21.000Z
2021-12-04T11:23:21.000Z
notebooks/Untitled.ipynb
alreich/abstract_algebra
9aca57cbc002677aeb117f542a961b7cbdfd4c29
MIT
notebooks/Untitled.ipynb
alreich/abstract_algebra
9aca57cbc002677aeb117f542a961b7cbdfd4c29
MIT
Qwen/Qwen-72B
1. YES
2. YES