scipy.special.elliprf#
- scipy.special.elliprf(x, y, z, out=None) = <ufunc 'elliprf'>#
第一類完全對稱橢圓積分。
函數 RF 定義如下 [1]
\[R_{\mathrm{F}}(x, y, z) = \frac{1}{2} \int_0^{+\infty} [(t + x) (t + y) (t + z)]^{-1/2} dt\]- 參數:
- x, y, zarray_like
實數或複數輸入參數。x、y 或 z 可以是複數平面上沿負實軸切割的任何數字,但最多只能有一個為零。
- outndarray,選填
用於函數值的選填輸出陣列
- 回傳值:
- R純量或 ndarray
積分值。如果 x、y 和 z 均為實數,則回傳值為實數。否則,回傳值為複數。
註解
此程式碼實作了基於重複定理和級數展開至 7 階的 Carlson 演算法(參見:https://dlmf.nist.gov/19.36.i)以及用於完整積分的 AGM 演算法。[2]
在 1.8.0 版本中新增。
參考文獻
[1]B. C. Carlson, ed., Chapter 19 in “Digital Library of Mathematical Functions,” NIST, US Dept. of Commerce. https://dlmf.nist.gov/19.16.E1
[2]B. C. Carlson, “Numerical computation of real or complex elliptic integrals,” Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995. https://arxiv.org/abs/math/9409227 https://doi.org/10.1007/BF02198293
範例
基本齊次性性質
>>> import numpy as np >>> from scipy.special import elliprf
>>> x = 1.2 + 3.4j >>> y = 5. >>> z = 6. >>> scale = 0.3 + 0.4j >>> elliprf(scale*x, scale*y, scale*z) (0.5328051227278146-0.4008623567957094j)
>>> elliprf(x, y, z)/np.sqrt(scale) (0.5328051227278147-0.4008623567957095j)
所有三個引數重合
>>> x = 1.2 + 3.4j >>> elliprf(x, x, x) (0.42991731206146316-0.30417298187455954j)
>>> 1/np.sqrt(x) (0.4299173120614631-0.30417298187455954j)
所謂的「第一勒姆尼斯科常數」
>>> elliprf(0, 1, 2) 1.3110287771460598
>>> from scipy.special import gamma >>> gamma(0.25)**2/(4*np.sqrt(2*np.pi)) 1.3110287771460598