例2.50 求方程组的符号解
2.50.1
点击查看代码
import sympy as sp
sp.var('x1,x2')
s=sp.solve([x1**2+x2**2-1,x1-x2],[x1,x2])
print(s)
print("学号:2023310143004")
2.50.2
点击查看代码
import sympy as sp
x = sp.var('x:2') #定义符号数组
s = sp.solve([x[0]**2+x[1]**2-1,x[0]-x[1]], x)
print(s)
print("学号:2023310143004")