```python
from sympy import *
import math
from decimal import *

```


```python
x=Symbol('x')
answer=solve(x**2-x*2+1,x)
print(answer)
```


```python
def f(x):
    return 64*x**6 - 480*x**4 + 720*x**2 - 120
def df(x):
    return 384*x**5 - 1920*x**3 + 1440*x
def dx(f,x):
    return abs(0-f(x))
def newtows(f,df,x0,e):
    delta=dx(f,x0)
    while delta>e:
        x0=x0-f(x0)/df(x0)
        delta=dx(f,x0)
    print('ROOT:%.10f'%x0)
    print('f(x):%.10f'%f(x0))
    print('Delta:%.10f'%delta)



```


```python

newtows(f,df,0.4,1e-6)

```

    ROOT:0.4360774119
    f(x):0.0000000000
    Delta:0.0000000000



```python
x=symbols("x") 
y=1/(x*x)
diff(y,x)
```




    -2/x**3




```python
import numpy.polynomial.legendre
legendre(6,x)
```




    231*x**6/16 - 315*x**4/16 + 105*x**2/16 - 5/16




```python
import numpy.polynomial.laguerre
laguerre(5,x)
```




    -x**5/120 + 5*x**4/24 - 5*x**3/3 + 5*x**2 - 5*x + 1




```python
import numpy.polynomial.hermite
hermite(6,x)
```




    64*x**6 - 480*x**4 + 720*x**2 - 120




```python

```

b8c64caf6b7e592dcd138172c1f7bb8de1fbda14
ipynb
Jupyter Notebook
2019-Spring/Computational-Method/Newton-Iteration.ipynb
Jerry-zpl/Jerry-zpl
cd1635e1d7a10d1261c9de5455fc15fa347ed1ef
Apache-2.0
2019-Spring/Computational-Method/Newton-Iteration.ipynb
Jerry-zpl/Jerry-zpl
cd1635e1d7a10d1261c9de5455fc15fa347ed1ef
Apache-2.0
2019-Spring/Computational-Method/Newton-Iteration.ipynb
Jerry-zpl/Jerry-zpl
cd1635e1d7a10d1261c9de5455fc15fa347ed1ef
Apache-2.0
Qwen/Qwen-72B
1. YES
2. YES