scipy.special.besselpoly#

scipy.special.besselpoly(a, lmb, nu, out=None) = <ufunc 'besselpoly'>#

第一类贝塞尔函数的加权积分。

计算

\[\int_0^1 x^\lambda J_\nu(2 a x) \, dx\]

其中 \(J_\nu\) 是贝塞尔函数,且 \(\lambda=lmb\), \(\nu=nu\)

参数:
a类数组

贝塞尔函数内部的比例因子。

lmb类数组

x 的幂

nu类数组

贝塞尔函数的阶。

outndarray, 可选

可选的输出数组,用于存储函数结果。

返回:
标量或 ndarray

积分的值。

参考

[1]

Cephes Mathematical Functions Library, http://www.netlib.org/cephes/

示例

评估一个参数集的函数。

>>> from scipy.special import besselpoly
>>> besselpoly(1, 1, 1)
0.24449718372863877

评估不同比例因子的函数。

>>> import numpy as np
>>> factors = np.array([0., 3., 6.])
>>> besselpoly(factors, 1, 1)
array([ 0.        , -0.00549029,  0.00140174])

绘制不同幂、阶和比例的函数。

>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots()
>>> powers = np.linspace(0, 10, 100)
>>> orders = [1, 2, 3]
>>> scales = [1, 2]
>>> all_combinations = [(order, scale) for order in orders
...                     for scale in scales]
>>> for order, scale in all_combinations:
...     ax.plot(powers, besselpoly(scale, powers, order),
...             label=rf"$\nu={order}, a={scale}$")
>>> ax.legend()
>>> ax.set_xlabel(r"$\lambda$")
>>> ax.set_ylabel(r"$\int_0^1 x^{\lambda} J_{\nu}(2ax)\,dx$")
>>> plt.show()
../../_images/scipy-special-besselpoly-1.png