Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Module « scipy.special »

Fonction jnp_zeros - module scipy.special

Signature de la fonction jnp_zeros

def jnp_zeros(n, nt) 

Description

help(scipy.special.jnp_zeros)

Compute zeros of integer-order Bessel function derivatives Jn'.

Compute `nt` zeros of the functions :math:`J_n'(x)` on the
interval :math:`(0, \infty)`. The zeros are returned in ascending
order. Note that this interval excludes the zero at :math:`x = 0`
that exists for :math:`n > 1`.

Parameters
----------
n : int
    Order of Bessel function
nt : int
    Number of zeros to return

Returns
-------
ndarray
    First `nt` zeros of the Bessel function.

See Also
--------
jvp: Derivatives of integer-order Bessel functions of the first kind
jv: Float-order Bessel functions of the first kind

References
----------
.. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
       Functions", John Wiley and Sons, 1996, chapter 5.
       https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html

Examples
--------
Compute the first four roots of :math:`J_2'`.

>>> from scipy.special import jnp_zeros
>>> jnp_zeros(2, 4)
array([ 3.05423693,  6.70613319,  9.96946782, 13.17037086])

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()
>>> plt.show()


Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé