scipy.special.it2j0y0#
- scipy.special.it2j0y0(x, out=None) = <ufunc 'it2j0y0'>#
与第一类0阶贝塞尔函数相关的积分。
计算积分
\[\begin{split}\int_0^x \frac{1 - J_0(t)}{t} dt \\ \int_x^\infty \frac{Y_0(t)}{t} dt.\end{split}\]更多关于 \(J_0\) 和 \(Y_0\) 的信息,请参见
j0
和y0
。参考文献
[1]S. Zhang and J.M. Jin, “Computation of Special Functions”, Wiley 1996
示例
在一点处评估函数。
>>> from scipy.special import it2j0y0 >>> int_j, int_y = it2j0y0(1.) >>> int_j, int_y (0.12116524699506871, 0.39527290169929336)
在多个点上评估函数。
>>> import numpy as np >>> points = np.array([0.5, 1.5, 3.]) >>> int_j, int_y = it2j0y0(points) >>> int_j, int_y (array([0.03100699, 0.26227724, 0.85614669]), array([ 0.26968854, 0.29769696, -0.02987272]))
绘制从0到10的函数。
>>> import matplotlib.pyplot as plt >>> fig, ax = plt.subplots() >>> x = np.linspace(0., 10., 1000) >>> int_j, int_y = it2j0y0(x) >>> ax.plot(x, int_j, label=r"$\int_0^x \frac{1-J_0(t)}{t}\,dt$") >>> ax.plot(x, int_y, label=r"$\int_x^{\infty} \frac{Y_0(t)}{t}\,dt$") >>> ax.legend() >>> ax.set_ylim(-2.5, 2.5) >>> plt.show()