# 习题

- Q-1



```python
from sympy import *

x = symbols('x')
f_x = x**3 - 3 * x**2 - x - 1
g_x = 3 * x**2 - 2 * x + 1
q_x, r_x = div(f_x, g_x)
q_x.as_poly()
```


```python
r_x.as_poly()
```

- Q-2



```python
from sympy import *

x, m, p, q = symbols('x, m, p, q')
f_x = x**3 + p * x + q
g_x = x**2 + m * x - 1
q_x, r_x = div(f_x, g_x)
r_x.as_poly(x)
```

> 说明=>r_x = 0, 由此得出各项系数为 0


- Q-3



```python
from sympy import *

x = symbols('x')
f_x = x**3 - x**2 - x
g_x = x - 1 + 2 * I
q_x, r_x = div(f_x, g_x, domain='ZZ')
q_x
```


```python
r_x
```

- Q-4
- Q-4-3



```python
from sympy import *

x = symbols('x')
f_x = x**5
x0 = 1
series(f_x, x=x, x0=x0)
```

- Q-4-3



```python
from sympy import *

x = symbols('x')
f_x = x**4 + 2 * I * x**3 - (1 + I) * x**2 - 3 * x + 7 + I
series(f_x, x=x, x0=-I)
```

- Q-5



```python
from sympy import *

x = symbols('x')
f_x = x**4 - 10 * x**2 + 1
g_x = x**4 - 4 * sqrt(2) * x**3 + 6 * x**2 + 4 * sqrt(2) * x + 1
gcd(f_x.as_poly(x), g_x.as_poly(x))

```




$\displaystyle \operatorname{Poly}{\left( x^{2} -  2 \sqrt{2} x - 1, x, domain=\mathtt{\text{EX}} \right)}$



- Q-6



```python
from sympy import *

x = symbols('x')
f_x = x**4 - x**3 - 4 * x**2 + 4 * x + 1
g_x = x**2 - x - 1
gcdex(f_x, g_x)
```


```python

```

4f222c0beaadcfdd88186f4773f34e4878053238
ipynb
Jupyter Notebook
college/Linear-Algebra/theory/ch01/hw/homework.ipynb
dzylikecode/Math-Learning
0948c4fd478529f1f1bab038d4cc950c12fb394e
MIT
college/Linear-Algebra/theory/ch01/hw/homework.ipynb
dzylikecode/Math-Learning
0948c4fd478529f1f1bab038d4cc950c12fb394e
MIT
college/Linear-Algebra/theory/ch01/hw/homework.ipynb
dzylikecode/Math-Learning
0948c4fd478529f1f1bab038d4cc950c12fb394e
MIT
Qwen/Qwen-72B
1. YES
2. YES