bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / special / _basic / yn_zeros
function
scipy.special._basic:yn_zeros
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_basic.py:448
Signature
def yn_zeros(n, nt)Summary
Compute zeros of integer-order Bessel function 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 function.
Examples
Compute the first four roots of :math:`Y_2`.from scipy.special import yn_zeros
✓yn_zeros(2, 4)
✗array([ 3.38424, 6.79381, 10.02348, 13.20999])Plot :math:`Y_2` and its first four roots.
import numpy as np import matplotlib.pyplot as plt from scipy.special import yn, yn_zeros xmin = 2 xmax = 15 x = np.linspace(xmin, xmax, 500) fig, ax = plt.subplots()✓
ax.hlines(0, xmin, xmax, color='k') ax.plot(x, yn(2, x), label=r'$Y_2$') ax.scatter(yn_zeros(2, 4), np.zeros((4, )), s=30, c='r', label='Roots', zorder=5) ax.set_ylim(-0.4, 0.4) ax.set_xlim(xmin, xmax) plt.legend()✗
<matplotlib.legend.Legend object at 0x7f3f58a892b0>
plt.show()
✓
See also
Aliases
scipy.special.yn_zeros