本文簡要介紹 python 語言中 scipy.special.yvp
的用法。
用法:
scipy.special.yvp(v, z, n=1)#
計算第二類貝塞爾函數的導數。
計算貝塞爾函數 Yv 相對於 z 的 n 階導數。
- v: 類似浮點數的數組
貝塞爾函數的階
- z: 複雜的
評估導數的參數
- n: 整數,默認 1
導數的順序。對於 0,返回 BEssel 函數
yv
- 標量或 ndarray
貝塞爾函數的 n 階導數。
參數 ::
返回 ::
注意:
使用關係 DLFM 10.6.7 [2] 計算導數。
參考:
[1]張善傑和金建明。 “特殊函數的計算”,John Wiley and Sons,1996 年,第 5 章。https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
[2]NIST 數學函數數字 Library 。 https://dlmf.nist.gov/10.6.E7
例子:
計算第二類 0 階貝塞爾函數及其在 1 處的前兩個導數。
>>> from scipy.special import yvp >>> yvp(0, 1, 0), yvp(0, 1, 1), yvp(0, 1, 2) (0.088256964215677, 0.7812128213002889, -0.8694697855159659)
通過提供 v 的數組,計算 1 處多個階數的第二類貝塞爾函數的一階導數。
>>> yvp([0, 1, 2], 1, 1) array([0.78121282, 0.86946979, 2.52015239])
通過提供 z 的數組,計算第二類 0 階貝塞爾函數在多個點的一階導數。
>>> import numpy as np >>> points = np.array([0.5, 1.5, 3.]) >>> yvp(0, points, 1) array([ 1.47147239, 0.41230863, -0.32467442])
繪製第二類 1 階貝塞爾函數及其前三階導數。
>>> import matplotlib.pyplot as plt >>> x = np.linspace(0, 5, 1000) >>> x[0] += 1e-15 >>> fig, ax = plt.subplots() >>> ax.plot(x, yvp(1, x, 0), label=r"$Y_1$") >>> ax.plot(x, yvp(1, x, 1), label=r"$Y_1'$") >>> ax.plot(x, yvp(1, x, 2), label=r"$Y_1''$") >>> ax.plot(x, yvp(1, x, 3), label=r"$Y_1'''$") >>> ax.set_ylim(-10, 10) >>> plt.legend() >>> plt.show()
相關用法
- Python SciPy special.yve用法及代碼示例
- Python SciPy special.yv用法及代碼示例
- Python SciPy special.yn_zeros用法及代碼示例
- Python SciPy special.ynp_zeros用法及代碼示例
- Python SciPy special.y1p_zeros用法及代碼示例
- Python SciPy special.y0用法及代碼示例
- Python SciPy special.y1用法及代碼示例
- Python SciPy special.yn用法及代碼示例
- Python SciPy special.y0_zeros用法及代碼示例
- Python SciPy special.y1_zeros用法及代碼示例
- Python SciPy special.geterr用法及代碼示例
- Python SciPy special.seterr用法及代碼示例
- Python SciPy special.errstate用法及代碼示例
- Python SciPy special.airy用法及代碼示例
- Python SciPy special.airye用法及代碼示例
- Python SciPy special.ai_zeros用法及代碼示例
- Python SciPy special.bi_zeros用法及代碼示例
- Python SciPy special.ellipj用法及代碼示例
- Python SciPy special.ellipe用法及代碼示例
- Python SciPy special.elliprg用法及代碼示例
- Python SciPy special.jve用法及代碼示例
- Python SciPy special.kn用法及代碼示例
- Python SciPy special.kv用法及代碼示例
- Python SciPy special.kve用法及代碼示例
- Python SciPy special.ive用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.special.yvp。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。