scipy.special.elliprj#
- scipy.special.elliprj(x, y, z, p, out=None) = <ufunc 'elliprj'>#
第三类对称椭圆积分。
函数 RJ 的定义如下 [1]
\[R_{\mathrm{J}}(x, y, z, p) = \frac{3}{2} \int_0^{+\infty} [(t + x) (t + y) (t + z)]^{-1/2} (t + p)^{-1} dt\]警告
当输入不平衡时,此函数应被视为实验性。请使用另一个独立的实现来检查正确性。
- 参数:
- x, y, z, parray_like
实数或复数输入参数。x、y 或 z 是在负实轴上割开的复平面中的数(受进一步约束,请参阅注释),并且它们中最多有一个可以为零。p 必须非零。
- outndarray, optional
可选的输出数组,用于存储函数值
- 返回:
附注
该代码实现了基于倍增定理和高达7阶级数展开的 Carlson 算法。 [3] 该算法与其早期版本(如 [1] 中所示)略有不同,因为它在内循环中不再需要调用
elliprc(或atan/atanh,请参阅 [4])。当参数数量级相差很大时,使用渐近逼近。 [5]当输入参数为复数时,输入值受某些充分但不必要的约束。值得注意的是,
x、y和z必须具有非负实部,除非其中两个是非负且互为复共轭,而另一个是实数非负数。 [1] 如果输入不满足参考文献 [1] 中描述的充分条件,则会被直接拒绝,输出设置为 NaN。在
x、y和z中的一个等于p的情况下,应优先使用函数elliprd,因为它具有限制较少的域。在版本 1.8.0 中新增。
参考文献
[1] (1,2,3,4,5)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
[2]B. C. Carlson, ed., Chapter 19 in “Digital Library of Mathematical Functions,” NIST, US Dept. of Commerce. https://dlmf.nist.gov/19.20.iii
[3]B. C. Carlson, J. FitzSimmons, “Reduction Theorems for Elliptic Integrands with the Square Root of Two Quadratic Factors,” J. Comput. Appl. Math., vol. 118, nos. 1-2, pp. 71-85, 2000. https://doi.org/10.1016/S0377-0427(00)00282-X
[4]F. Johansson, “Numerical Evaluation of Elliptic Functions, Elliptic Integrals and Modular Forms,” in J. Blumlein, C. Schneider, P. Paule, eds., “Elliptic Integrals, Elliptic Functions and Modular Forms in Quantum Field Theory,” pp. 269-293, 2019 (Cham, Switzerland: Springer Nature Switzerland) https://arxiv.org/abs/1806.06725 https://doi.org/10.1007/978-3-030-04480-0
[5]B. C. Carlson, J. L. Gustafson, “Asymptotic Approximations for Symmetric Elliptic Integrals,” SIAM J. Math. Anls., vol. 25, no. 2, pp. 288-303, 1994. https://arxiv.org/abs/math/9310223 https://doi.org/10.1137/S0036141092228477
示例
基本齐次性质
>>> import numpy as np >>> from scipy.special import elliprj
>>> x = 1.2 + 3.4j >>> y = 5. >>> z = 6. >>> p = 7. >>> scale = 0.3 - 0.4j >>> elliprj(scale*x, scale*y, scale*z, scale*p) (0.10834905565679157+0.19694950747103812j)
>>> elliprj(x, y, z, p)*np.power(scale, -1.5) (0.10834905565679556+0.19694950747103854j)
简化为更简单的椭圆积分
>>> elliprj(x, y, z, z) (0.08288462362195129-0.028376809745123258j)
>>> from scipy.special import elliprd >>> elliprd(x, y, z) (0.08288462362195136-0.028376809745123296j)
所有参数重合
>>> elliprj(x, x, x, x) (-0.03986825876151896-0.14051741840449586j)
>>> np.power(x, -1.5) (-0.03986825876151894-0.14051741840449583j)