高斯:贝塞尔函数

huangapple go评论82阅读模式
英文:

Go: Bessel functions

问题

我注意到标准Go库中定义了一阶、二阶和N阶贝塞尔函数(Y0、Y1、Yn)的函数(Y0)。我似乎无法确定这些数学函数的实际应用,以至于它们如此重要,以至于被包含在标准库中。

有人可以帮我吗?看起来贝塞尔函数(我以前没听说过)与描述[渐变?]二次曲线的形状有关,但我不确定为什么这对于一般开发来说具有特殊意义。

英文:

I noticed that there are functions for first-order, second-order, and N-order Bessel functions (Y0, Y1, Yn) defined in the standard Go library (Y0). I can't seem to determine the practical application of these mathematical functions that would make them so important as to include in the standard library.

Can someone help me out? It seems like Bessels (which I haven't heard of before) relate to describing [graduated?] shapes of quadratic curves, but I'm unsure why this is of special significance to general development.

答案1

得分: 6

我相信这个函数主要存在是因为在标准POSIX库中有一个同名(除了大小写)和行为相同的函数。你链接的页面中还有许多其他函数也是如此,比如ldexplgammanextafter

说到贝塞尔函数的用途,它们在数学模拟中偶尔会派上用场。它们与具有球对称性的拉普拉斯问题密切相关,与理想圆形鼓、氢原子的量子力学模型或FM无线电信号的边带(在此列表中都大大简化)等物理模型有关。贝塞尔函数的值是von Mises分布的分母,这是一个在圆或球上表现良好的概率分布,非常有用。还有许多其他用途,这只是我脑海中首先想到的一些想法。

谈到动机,从某种意义上说,J₀是继指数函数之后下一个行为良好的特殊函数。计算指数函数时,我们将一个加权的幂级数求和,权重是阶乘的倒数。对于J₀来说,基本上也是一样的,只是倒数阶乘变成了倒数阶乘的平方。如果对于余弦函数或误差函数有足够的理由,那么对于这个函数也是一样的。简而言之,这只是一个在数学中非常常见且足够简单的函数,而且有足够多的C语言类似语言的程序员在高性能计算方面使用它,从而在制定标准时产生了一些动力。

英文:

I believe it's there mainly because a function of the same name (except capitalisation) and behaviour is in standard POSIX library. That's also the case for many other functions in the page you link to, like ldexp or lgamma or nextafter.

Speaking of the uses of Bessel functions, they just do come in handy from time to time in mathematical simulations. They are tightly connected with Laplacian problems with spherical symmetry, which relates to physical models like that of an ideal circular drum, quantum mechanical model of hydrogen, or sidebands of a FM radio signal (all heavily simplified in this list). A value of a Bessel function is a denominator of von Mises distribution, which is a well-behaved probabilistic distribution on a circle or a sphere, that's also super useful. There are many more, these are just first ideas that came to my mind.

Speaking of motivation, in a way J₀ is the next best-behaved special function after the exponential. In calculating an exponential one sums a power series weighted by an inverse factorial. For J₀, it's basically the same with the inverse factorial squared. If there's enough justification for a cosine or for erf, there's just as much for that, too. In a few words it's just a function that's sufficiently simple to be quite ubiquitous in mathematics, and there's enough programmers of C-like languages that came there for high-performance computation to actually make some momentum in laying out the standard.

huangapple
  • 本文由 发表于 2016年11月13日 16:46:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/40572081.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定