【问题标题】:Solving a Tricky Integral on Python在 Python 上解决一个棘手的积分问题
【发布时间】:2015-03-24 12:59:51
【问题描述】:

我目前正在为我的物理项目解决立体角计算。我的 python 技能是基本的,我需要一些提示/技巧来解决我从研究论文中获得的这个方程 - (http://ac.els-cdn.com/S0969804306002090/1-s2.0-S0969804306002090-main.pdf?_tid=7b61d61e-d162-11e4-9032-00000aab0f6c&acdnat=1427118343_91eaa37dbd9242927e86c41952074750) 上的方程 9b

积分是:

arccos[p^2 + r^2 + h^2 * tan(x) / 2 p h tan(x)] * sin(x)dx

h = 68,r = 24.8 和 p = 40.2

从 x = 12.76 度到 x = 43.71 度。

任何帮助将不胜感激,谢谢。

【问题讨论】:

  • 这不是堆栈溢出的问题,试试Math.SE

标签: python integration trigonometry


【解决方案1】:

有一个内置函数 math 应该像这样导入:

>>> import math

math.acos() 是 arcos,** 是求幂。还有 math.tan()math.sin()。您可以使用 dir(math) 在数学模块中查找更多函数。使用 help() 函数查看其用途. 试着继续做下去。会很有趣的。

【讨论】:

  • 谢谢,但我在 Math.SE 的帮助下整理好了
  • @Pete 如果你能说出你是如何解决它的,那将非常有帮助
  • 我会将您链接到 felipeh 在 math.se 页面上的答案:math.stackexchange.com/questions/1204247/solid-angle-integrals/…
  • @PeteThanks.Numpy 总是比普通的 Python 计算更快。Mark Lutz 在他的书《学习 Python》中谈到了这一点
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-10-25
  • 1970-01-01
  • 2023-04-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多