bundles / scipy 1.17.1 / scipy / special / _basic / y0_zeros
function
scipy.special._basic:y0_zeros
source: /scipy/special/_basic.py :572
Signature
def y0_zeros ( nt , complex = False ) Summary
Compute nt zeros of Bessel function Y0(z), and derivative at each zero.
Extended Summary
The derivatives are given by Y0'(z0) = -Y1(z0) at each zero z0.
Parameters
nt: intNumber of zeros to return
complex: bool, default FalseSet to False to return only the real zeros; set to True to return only the complex zeros with negative real part and positive imaginary part. Note that the complex conjugates of the latter are also zeros of the function, but are not returned by this routine.
Returns
z0n: ndarrayLocation of nth zero of Y0(z)
y0pz0n: ndarrayValue of derivative Y0'(z0) for nth zero
Examples
Compute the first 4 real roots and the derivatives at the roots of :math:`Y_0`:import numpy as np from scipy.special import y0_zeros zeros, grads = y0_zeros(4) with np.printoptions(precision=5): print(f"Roots: {zeros}") print(f"Gradients: {grads}")✓
import matplotlib.pyplot as plt from scipy.special import y0 xmin = 0 xmax = 11 x = np.linspace(xmin, xmax, 500) fig, ax = plt.subplots()✓
ax.hlines(0, xmin, xmax, color='k') ax.plot(x, y0(x), label=r'$Y_0$')✗
zeros, grads = y0_zeros(4)
✓ax.scatter(zeros.real, np.zeros((4, )), s=30, c='r', label=r'$Y_0$_zeros', zorder=5) ax.set_ylim(-0.5, 0.6) ax.set_xlim(xmin, xmax) plt.legend(ncol=2)✗
plt.show()
✓
y0_zeros(4, True)
✗Aliases
-
scipy.special.y0_zeros