如何解Python中有一个变量且具有指数函数和对数函数的方程?
How to solve an equation with one variable in Python which has exponential and log functions?
我正在尝试求解以下等式以获得 b 的值
from sympy import symbols, solve
import numpy as np
b = symbols('b')
expr = (30*np.log(b)/2.549*0.665*(1.5-math.exp(-0.4*(b-1))))-50
sol = solve(expr)
print(sol)
但是错误在第 4 行显示 'loop of ufunc does not support argument 0 of type Symbol which has no callable log method'
from sympy import symbols, solve , exp, log, power
b = symbols('b')
system = (30 * log(b)) / (2.549 * 0.665 * (1.5 - exp(-0.4 * (b - 1))) - 50)
sol = solve(system,b)
print(sol)
我正在尝试求解以下等式以获得 b 的值
from sympy import symbols, solve
import numpy as np
b = symbols('b')
expr = (30*np.log(b)/2.549*0.665*(1.5-math.exp(-0.4*(b-1))))-50
sol = solve(expr)
print(sol)
但是错误在第 4 行显示 'loop of ufunc does not support argument 0 of type Symbol which has no callable log method'
from sympy import symbols, solve , exp, log, power
b = symbols('b')
system = (30 * log(b)) / (2.549 * 0.665 * (1.5 - exp(-0.4 * (b - 1))) - 50)
sol = solve(system,b)
print(sol)