```python
import sympy as sp
sp.init_printing()
```


```python
x = sp.symbols('x')
sp.solve(x**2 - 8*x + 25)
```


```python
x = 1 + 2*sp.I

print(f'x = {x}, Re(x) = {sp.re(x)}, Imag(x) = {sp.im(x)}, modulus is {sp.Abs(x)}, arg is {sp.arg(x)}')
```


```python
x = sp.symbols('x')
sp.integrate(sp.log(x),x)
```


```python
sp.integrate(x**3 * sp.exp(-x),(x,0,sp.oo))
```

# Matrices


```python
A = sp.Matrix([[1, 2, -3], [4, 5, 6], [7, 8, 9]])
A.inv()

```


```python
a = sp.symbols('a')
A = sp.Matrix([[a, 0, 0], [1, a, 0], [0, 1, a]])
A.inv()
```


```python
C = sp.Matrix([[1, 2],[3, 4],[5, 6]])
D = sp.Matrix([4, 2])
# C * D.transpose()
C
```


```python

```

35e383ad2e7edba2eced77f8d17f0c6a7e6773f0
ipynb
Jupyter Notebook
SympyExamples.ipynb
fcooper8472/SympyExamples
6df5b06722e9719c1631fca990439bcffc8fc46a
MIT
SympyExamples.ipynb
fcooper8472/SympyExamples
6df5b06722e9719c1631fca990439bcffc8fc46a
MIT
SympyExamples.ipynb
fcooper8472/SympyExamples
6df5b06722e9719c1631fca990439bcffc8fc46a
MIT
Qwen/Qwen-72B
1. YES
2. YES