Python 非线性方程组
from scipy.optimize import fsolve
from math import cos
def f(x):
d = 140
l = 156
a = float(x[0])
r = float(x[1])
return [
cos(a) - 1 + (d*d)/(2*r*r), #方程1
l - r * a #方程2
]
result = fsolve(f, [1, 1])
print (result )