bundles / scipy latest / scipy / special / _basic / ynp_zeros
function
scipy.special._basic:ynp_zeros
source: /scipy/special/_basic.py :505
Signature
def ynp_zeros ( n , nt ) Summary
Compute zeros of integer-order Bessel function derivatives Yn'(x).
Extended Summary
Compute nt zeros of the functions on the interval . The zeros are returned in ascending order.
Parameters
n: intOrder of Bessel function
nt: intNumber of zeros to return
Returns
: ndarrayFirst
ntzeros of the Bessel derivative function.
Examples
Compute the first four roots of the first derivative of the Bessel function of second kind for order 0 :math:`Y_0'`.from scipy.special import ynp_zeros
✓ynp_zeros(0, 4)
✗import numpy as np import matplotlib.pyplot as plt from scipy.special import yn, ynp_zeros, yvp zeros = ynp_zeros(0, 4) xmax = 13 x = np.linspace(0, xmax, 500) fig, ax = plt.subplots()✓
ax.plot(x, yn(0, x), label=r'$Y_0$') ax.plot(x, yvp(0, x, 1), label=r"$Y_0'$") ax.scatter(zeros, np.zeros((4, )), s=30, c='r', label=r"Roots of $Y_0'$", zorder=5) for root in zeros: y0_extremum = yn(0, root) lower = min(0, y0_extremum) upper = max(0, y0_extremum) ax.vlines(root, lower, upper, color='r') ax.hlines(0, 0, xmax, color='k') ax.set_ylim(-0.6, 0.6) ax.set_xlim(0, xmax) plt.legend()✗
plt.show()
✓
See also
Aliases
-
scipy.special.ynp_zeros