$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $


```python
from sympy import *
from IPython.display import display
from sympy.printing.mathml import mathml
from IPython.display import display, Math, Latex

x, y, z = symbols('x y z')
init_printing(use_unicode=True)
```


```python
def mprint(e):
    display(Math(latex(e)))
```


```python
pprint(diff(2*x**4))
```

       3
    8⋅x 



```python
expr = simplify((x**3 + x**2 - x - 1)/(x**2 + 2*x + 1))
```


```python
expr = (x**3 + x**2 - x - 1)/(x**2 + 2*x + 1)
display(Math(latex(expr)))
expr = simplify(expr)
print(type(expr))
print(latex(expr))
display(Math(latex(expr)))
```


$$\frac{x^{3} + x^{2} - x - 1}{x^{2} + 2 x + 1}$$


    <class 'sympy.core.add.Add'>
    x - 1



$$x - 1$$



```python
from IPython.display import display, Math, Latex
display(Math('\\frac{1}{2}'))
```


$$\frac{1}{2}$$



```python
print(expr.subs(x,5))
```

    4



```python
eql = Eq(3*x+5,10)
```


```python
z = solveset(eql,x)
display(Math(latex(z)))
```


```python

```


$$\left\{\frac{5}{3}\right\}$$



```python
from sympy import *
x, y, z = symbols('x y z')
init_printing(use_unicode=True)
expr = diff(sin(x)/x**2, x)
mprint(expr)
```


$$\frac{1}{x^{2}} \cos{\left (x \right )} - \frac{2}{x^{3}} \sin{\left (x \right )}$$



```python
expr_i = integrate(expr,x)
mprint(expr_i)
```


$$\frac{1}{x^{2}} \sin{\left (x \right )}$$


365e74f40a2fbb7b701194a1ca5318ea6443baed
ipynb
Jupyter Notebook
SOA/paf-sympy/sympy-soa.ipynb
awaiswill/present
1cfbc8d1f31ade6c21e3ed1d0685c31b3a772485
Apache-2.0
2019-02-15T18:46:59.000Z
2022-03-30T14:49:05.000Z
SOA/paf-sympy/sympy-soa.ipynb
smartquark/present
21a31ab2f38474a68e5560a3330aa42d0847c9b3
Apache-2.0
2020-04-20T14:20:00.000Z
2022-03-12T00:23:35.000Z
SOA/paf-sympy/sympy-soa.ipynb
awaiswill/present
1cfbc8d1f31ade6c21e3ed1d0685c31b3a772485
Apache-2.0
2017-01-05T20:05:32.000Z
2022-03-19T23:04:00.000Z
Qwen/Qwen-72B
1. YES
2. YES