scipy.special.elliprd#
- scipy.special.elliprd(x, y, z, out=None) = <ufunc 'elliprd'>#
第二類對稱橢圓積分。
函數 RD 定義為 [1]
\[R_{\mathrm{D}}(x, y, z) = \frac{3}{2} \int_0^{+\infty} [(t + x) (t + y)]^{-1/2} (t + z)^{-3/2} dt\]- 參數:
- x, y, zarray_like
實數或複數輸入參數。x 或 y 可以是複數平面上沿負實軸切割的任何數字,但它們之中最多一個可以是零,而 z 必須是非零。
- outndarray,選用
函數值的選用輸出陣列
- 返回:
- R純量或 ndarray
積分值。如果 x、y 和 z 全為實數,則返回值為實數。否則,返回值為複數。
註解
RD 是橢圓積分 RJ 的退化情況:
elliprd(x, y, z) == elliprj(x, y, z, z)
。此程式碼實作了 Carlson 基於重複定理和高達 7 階級數展開的演算法。[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.E5
[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 elliprd
>>> x = 1.2 + 3.4j >>> y = 5. >>> z = 6. >>> scale = 0.3 + 0.4j >>> elliprd(scale*x, scale*y, scale*z) (-0.03703043835680379-0.24500934665683802j)
>>> elliprd(x, y, z)*np.power(scale, -1.5) (-0.0370304383568038-0.24500934665683805j)
所有三個參數一致
>>> x = 1.2 + 3.4j >>> elliprd(x, x, x) (-0.03986825876151896-0.14051741840449586j)
>>> np.power(x, -1.5) (-0.03986825876151894-0.14051741840449583j)
所謂的「第二勒姆尼卡常數」
>>> elliprd(0, 2, 1)/3 0.5990701173677961
>>> from scipy.special import gamma >>> gamma(0.75)**2/np.sqrt(2*np.pi) 0.5990701173677959