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
。- 參數:
- xarray_like
評估積分的值。
- outndarray 元組,可選
用於函數結果的可選輸出陣列。
- 返回:
參考文獻
[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()