用python求解含未知數式子出現問題
from sympy import *
t,n,k,g,w,r,a,e,b=symbols('t,n,k,g,w,r,a,e,b')
f1=(1-t)n**ake*gb-wn-rk
dn=diff(f1,n)
print("dn=",dn)
dk=diff(f1,k)
print("dk=",dk)
dn= ag**bke*na*(1 - t)/n - w
dk= eg**bke*na*(1 - t)/k - r
m=solve([dn,dk],[n,k])
print(m)
dn= ag**bke*na*(1 - t)/n - w
dk= eg**bke*na*(1 - t)/k - r
Traceback (most recent call last):
File "D:\python\venv\1.py", line 10, in
m=solve([dn,dk],[n,k])
File "D:\python\venv\lib\site-packages\sympy\solvers\solvers.py", line 1108, in solve
solution = _solve_system(f, symbols, flags)
File "D:\python\venv\lib\site-packages\sympy\solvers\solvers.py", line 1972, in _solve_system
raise NotImplementedError('could not solve %s' % eq2)
NotImplementedError: could not solve e*gbn**a(1 - t)((-n(1 - a)w/(ag**b(t - 1)))(1/e))(e - 1) - r