bundles / scipy latest / scipy / special / _basic / jnp_zeros
function
scipy.special._basic:jnp_zeros
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_basic.py:385
Signature
def jnp_zeros(n, nt)Summary
Compute zeros of integer-order Bessel function derivatives Jn'.
Extended Summary
Compute nt zeros of the functions on the interval . The zeros are returned in ascending order. Note that this interval excludes the zero at that exists for .
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:`J_2'`.from scipy.special import jnp_zeros
✓jnp_zeros(2, 4)
✗array([ 3.054, 6.706, 9.969, 13.17 ])As `jnp_zeros` yields the roots of :math:`J_n'`, it can be used to compute the locations of the peaks of :math:`J_n`. Plot :math:`J_2`, :math:`J_2'` and the locations of the roots of :math:`J_2'`.
import numpy as np import matplotlib.pyplot as plt from scipy.special import jn, jnp_zeros, jvp j2_roots = jnp_zeros(2, 4) xmax = 15 x = np.linspace(0, xmax, 500) fig, ax = plt.subplots()✓
ax.plot(x, jn(2, x), label=r'$J_2$') ax.plot(x, jvp(2, x, 1), label=r"$J_2'$") ax.hlines(0, 0, xmax, color='k') ax.scatter(j2_roots, np.zeros((4, )), s=30, c='r', label=r"Roots of $J_2'$", zorder=5) ax.set_ylim(-0.4, 0.8) ax.set_xlim(0, xmax) plt.legend()✗
<matplotlib.legend.Legend object at 0x7f3f685496a0>
plt.show()
✓
See also
Aliases
scipy.special.jnp_zeros