scipy.special.ellipe#
- scipy.special.ellipe(m, out=None) = <ufunc 'ellipe'>#
第二類完全橢圓積分
此函數定義為
\[E(m) = \int_0^{\pi/2} [1 - m \sin(t)^2]^{1/2} dt\]- 參數:
- marray_like
定義橢圓積分的參數。
- outndarray, optional
函數值的選用性輸出陣列
- 返回:
- E純量或 ndarray
橢圓積分的值。
參見
註解
Cephes [1] 常式 ellpe 的包裝函式。
對於
m > 0
,計算使用近似值,\[E(m) \approx 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\) 表示的參數化遵循 [2] 中第 17.2 節。其他以互補參數 \(1 - m\)、模角 \(\sin^2(\alpha) = m\) 或模數 \(k^2 = m\) 表示的參數化也被使用,因此請小心選擇正確的參數。
Legendre E 積分以多種方式與 Carlson 的對稱 R_D 或 R_G 函數相關 [3]。例如,
\[E(m) = 2 R_G(0, 1-k^2, 1) .\]參考文獻
[1]Cephes Mathematical Functions Library, http://www.netlib.org/cephes/
[2]Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972.
[3]NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/, Release 1.0.28 of 2020-09-15. See Sec. 19.25(i) https://dlmf.nist.gov/19.25#i
範例
此函數用於尋找半長軸為 a 和半短軸為 b 的橢圓周長。
>>> import numpy as np >>> 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