spherical_kn(n, z, derivative=False)
Defined as ,
$$k_n(z) = \sqrt{\frac{\pi}{2z}} K_{n + 1/2}(z),$$where $K_n$ is the modified Bessel function of the second kind.
The function is computed using its definitional relation to the modified cylindrical Bessel function of the second kind.
The derivative is computed using the relations ,
$$k_n' = -k_{n-1} - \frac{n + 1}{z} k_n. k_0' = -k_1$$Order of the Bessel function (n >= 0).
Argument of the Bessel function.
If True, the value of the derivative (rather than the function itself) is returned.
Modified spherical Bessel function of the second kind or its derivative.
The modified spherical Bessel functions of the second kind $k_n$ accept both real and complex second argument. They can return a complex type:
>>> from scipy.special import spherical_kn
... spherical_kn(0, 3+5j) (0.012985785614001561+0.003354691603137546j)
>>> type(spherical_kn(0, 3+5j)) <class 'numpy.complex128'>
We can verify the relation for the derivative from the Notes for $n=3$ in the interval $[1, 2]$ :
>>> from scipy.special import spherical_kn
... x = np.arange(1.0, 2.0, 0.01)
... np.allclose(spherical_kn(3, x, True),
... - 4/x * spherical_kn(3, x) - spherical_kn(2, x)) True
The first few $k_n$ with real argument:
>>> import matplotlib.pyplot as pltSee :
... from scipy.special import spherical_kn
... x = np.arange(0.0, 4.0, 0.01)
... fig, ax = plt.subplots()
... ax.set_ylim(0.0, 5.0)
... ax.set_title(r'Modified spherical Bessel functions $k_n$')
... for n in np.arange(0, 4):
... ax.plot(x, spherical_kn(n, x), label=rf'$k_{n}$')
... plt.legend(loc='best')
... plt.show()
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.special._spherical_bessel.spherical_kn
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them