python - 如何使用 Python 求解 Lambert W 函数?
问题描述
我正在研究这个名为lambert W 函数的函数。它通常在出现格式问题2^x= 5x
和属性时应用,xe^x=y
然后x=w(y)
是w
Lambert 函数。虽然 MATLAB 可以有效地解决它,但我也想看看是否可以使用 Python 获得相同质量的结果。
解决方案
您可以使用scipy
. 该函数scipy.special.lambertw
对 Lambert W 函数分支进行数值求解。
from scipy.special import lambertw
y = lambertw(2)
print(y) # (0.8526055020137254+0j)
推荐阅读
- android - Android意图在应用程序中打开特定的推特
- vue.js - 为什么 this.$router 在 App.vue 中未定义?
- php - 在 Woocommerce 打印发票和装箱单中显示订单自定义元数据
- excel - 如何在 Beyond Compare 中查看 Excel 工作簿的 xltrail 生成差异?
- javascript - 带有对象数组的待办事项列表应用程序的 handleRemove 函数
- angular - 将复选框直接绑定到 ngModel 的 id 列表
- powershell - Powershell按特定字符对字符串数组进行排序
- javascript - TypeIt.js:完成每个字符串后的空容器
- excel - 访问父级的 get 属性会给出“对象变量或带有块...”错误
- python - 我怎样才能修复这个毕达哥拉斯三胞胎程序?