scipy.special.spherical_jn(n, z, derivative=False)[source]

Spherical Bessel function of the first kind or its derivative.

Defined as [R578],

\[j_n(z) = \sqrt{\frac{\pi}{2z}} J_{n + 1/2}(z),\]

where \(J_n\) is the Bessel function of the first kind.


n : int, array_like

Order of the Bessel function (n >= 0).

z : complex or float, array_like

Argument of the Bessel function.

derivative : bool, optional

If True, the value of the derivative (rather than the function itself) is returned.


jn : ndarray


For real arguments greater than the order, the function is computed using the ascending recurrence [R579]. For small real or complex arguments, the definitional relation to the cylindrical Bessel function of the first kind is used.

The derivative is computed using the relations [R580],

\[ \begin{align}\begin{aligned}j_n'(z) = j_{n-1}(z) - \frac{n + 1}{z} j_n(z).\\j_0'(z) = -j_1(z)\end{aligned}\end{align} \]

New in version 0.18.0.


[R578](1, 2)
[R579](1, 2)
[R580](1, 2)