{ } Raw JSON

bundles / scipy 1.17.1 / scipy / special / _basic / jn_zeros

function

scipy.special._basic:jn_zeros

source: /scipy/special/_basic.py :321

Signature

def   jn_zeros ( n nt )

Summary

Compute zeros of integer-order Bessel functions Jn.

Extended Summary

Compute nt zeros of the Bessel functions on the interval . The zeros are returned in ascending order. Note that this interval excludes the zero at that exists for .

Parameters

n : int

Order of Bessel function

nt : int

Number of zeros to return

Returns

: ndarray

First nt zeros of the Bessel function.

Examples

Compute the first four positive roots of :math:`J_3`.
from scipy.special import jn_zeros
jn_zeros(3, 4)
Plot :math:`J_3` and its first four positive roots. Note that the root located at 0 is not returned by `jn_zeros`.
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import jn, jn_zeros
j3_roots = jn_zeros(3, 4)
xmax = 18
xmin = -1
x = np.linspace(xmin, xmax, 500)
fig, ax = plt.subplots()
ax.plot(x, jn(3, x), label=r'$J_3$')
ax.scatter(j3_roots, np.zeros((4, )), s=30, c='r',
           label=r"$J_3$_Zeros", zorder=5)
ax.scatter(0, 0, s=30, c='k',
           label=r"Root at 0", zorder=5)
ax.hlines(0, 0, xmax, color='k')
ax.set_xlim(xmin, xmax)
plt.legend()
plt.show()
fig-aeab4a3ceb28a3df.png

See also

jnp_zeros

Zeros of Jn'

jv

Real-order Bessel functions of the first kind

Aliases

  • scipy.special.jn_zeros