scipy.special.ellipe¶
- scipy.special.ellipe(m) = <ufunc 'ellipe'>¶
第二类完全椭圆积分
此函数定义为
\[E(M)=\int_0^{\pi/2} [1 - m \sin(t)^2] ^{1/2}DT\]- 参数
- marray_like
定义椭圆积分的参数。
- 退货
- Endarray
椭圆积分的值。
注意事项
仙人掌的包装袋 [1] 例行程序 ellpe 。
为 m > 0 计算使用近似值,
\[E(M)\近似P(1-m)-(1-m)\log(1-m)q(1-m),\]哪里 \(P\) 和 \(Q\) 都是十阶多项式。为 m < 0 ,关系
\[E(M)=E(m/(m-1))\sqrt(1-m)\]是使用的。
关于以下方面的参数化 \(m\) 遵循第17.2条的规定 [2]. 关于互补参数的其他参数化 \(1 - m\) ,模数角 \(\sin^2(\alpha) = m\) ,或模数 \(k^2 = m\) ,因此请注意选择正确的参数。
参考文献
- 1
Cphes数学函数库,http://www.netlib.org/cephes/
- 2
米尔顿·阿布拉莫维茨和艾琳·A·斯特根主编。包含公式、图表和数学表的数学函数手册。纽约:多佛,1972年。
示例
此函数用于查找具有半长轴的椭圆的周长 a 和半短轴 b 。
>>> from scipy import special
>>> a = 3.5 >>> b = 2.1 >>> e_sq = 1.0 - b**2/a**2 # eccentricity squared
然后使用以下公式求出周长:
>>> C = 4*a*special.ellipe(e_sq) # circumference formula >>> C 17.868899204378693
什么时候 a 和 b 相同(即偏心率为0),则减小为圆的周长。
>>> 4*a*special.ellipe(0.0) # formula for ellipse with a = b 21.991148575128552 >>> 2*np.pi*a # formula for circle of radius a 21.991148575128552