import sympy
x=sympy.symbols('x')
s='x**6 + x**5 + x**4 + x**3 + x**2 + x + 1'.replace(" ","")
r=sympy.solve(s,x)print(r)for i in r: print(i)结果是: -cos(pi/7) - Isin(pi/7), -cos(pi/7) + Isin(pi/7), cos(2pi/7) - Isin(2pi/7), cos(2pi/7) + Isin(2pi/7), -cos(3pi/7) - Isin(3pi/7), -cos(3pi/7) + Isin(3pi/7)]-cos(pi/7) - I*sin(pi/7)-cos(pi/7) + I*sin(pi/7)cos(2pi/7) - Isin(2*pi/7)cos(2pi/7) + Isin(2*pi/7)-cos(3pi/7) - Isin(3*pi/7)-cos(3pi/7) + Isin(3*pi/7)我该怎样判断-cos(3pi/7) + Isin(3*pi/7)是不是一个复数呢?
添加回答
举报
0/150
提交
取消