```python
import sympy as sy
from sympy import pi, cos, sin, tan
from IPython.display import display
from sympy.printing.pycode import pycode


a,b,c,d,e = sy.symbols("a,b,c,d,e")

#x = sy.Symbol("x")

def f(x):
    return a*x**4 + b*x**3 + c*x**2 + d*x + e

def df(x):
    return 4*a*x**3 + 3*b*x**2 + 2*c*x + d


p1, p2, p3 = sy.symbols("p1, p2, p3")
x1, x2, x3 = sy.symbols("x1, x2, x3")


sol = sy.solve(
    [
        df(x1),
        df(x2),
        f(x1) - p1,
        f(x2) - p2,
        f(x3), - p3,
    ],
    [a, b, c, d, e]
    )

```


```python
import sympy as sy
from sympy import pi, cos, sin, tan
from IPython.display import display
from sympy.printing.pycode import pycode

a,b,c,d,e,f = sy.symbols("a,b,c,d,e,f")

#x = sy.Symbol("x")

def p(x):
    return a*x**5 + b*x**4 + c*x**3 + d*x**2 + e*x + f

def dp(x):
    return 5*a*x**4 + 4*b*x**3 + 3*c*x**2 + d*x + e

def ddp(x):
    return 20*a*x**3 + 12*b*x**2 + 6*c*x + d


p2 = sy.symbols("p2")
x1, x2, x3 = sy.symbols("x1, x2, x3")


sol = sy.solve(
    [
        ddp(x1),
        ddp(x2),
        ddp(x3),
        dp(0),
        p(0),
        p(x2) - p2,
    ],
    [a, b, c, d, e, f]
    )
sol
```




    {a: 3*p2/(5*x1*x2**4 - 50*x1*x2**3*x3 - 2*x2**5 + 5*x2**4*x3),
     b: (-5*p2*x1 - 5*p2*x2 - 5*p2*x3)/(5*x1*x2**4 - 50*x1*x2**3*x3 - 2*x2**5 + 5*x2**4*x3),
     c: (10*p2*x1*x2 + 10*p2*x1*x3 + 10*p2*x2*x3)/(5*x1*x2**4 - 50*x1*x2**3*x3 - 2*x2**5 + 5*x2**4*x3),
     d: -60*p2*x1*x3/(5*x1*x2**3 - 50*x1*x2**2*x3 - 2*x2**4 + 5*x2**3*x3),
     e: 0,
     f: 0}




```python
# グラフ化


```

55130684c732706fadc7d5e50e0adf7d5fbaec25
ipynb
Jupyter Notebook
misc/pot.ipynb
YoshimitsuMatsutaIe/manipulator_dynamics
587b3cedddd07c2aa09d1195289b0c312e0fc749
MIT
misc/pot.ipynb
YoshimitsuMatsutaIe/manipulator_dynamics
587b3cedddd07c2aa09d1195289b0c312e0fc749
MIT
misc/pot.ipynb
YoshimitsuMatsutaIe/manipulator_dynamics
587b3cedddd07c2aa09d1195289b0c312e0fc749
MIT
Qwen/Qwen-72B
1. YES
2. YES