Skip to contents

Computes the spherical Bessel function of the second kind (\(y_\nu(z)\)), also known as the spherical Neumann function, and its k-th derivatives.

Usage

ys(l, n)

ysdk(l, n, k)

Arguments

l

Numeric. The order of the spherical Bessel function. Can be integer or fractional.

n

Numeric or matrix. The argument (\(z\)) at which to evaluate the function. If a matrix is provided, the function is applied column-wise.

k

Non-negative integer. The order of the derivative for ysdk.

Value

A numeric vector or matrix (matching the input structure) containing:

  • ys: \(y_\nu(z)\)

  • ysd: \(y^{(k)'}_l(z)\) (k-th derivative)

Details

The spherical Bessel function of the second kind is related to the cylindrical Bessel function by:

$$y_\nu(z) = \sqrt{\frac{\pi}{2z}} Y_{\nu+1/2}(z)$$

where \(Y_\nu(z)\) is the cylindrical Bessel function of the second kind.

The spherical Bessel functions satisfy the same differential equation as \(j_\nu(z)\): $$ z^2 \frac{d^2 y_\nu}{dz^2} + 2z \frac{dy_\nu}{dz} + [z^2 - \nu(\nu+1)] y_\nu = 0 $$

Special cases:

  • \(y_\nu(0) = -\infty\) (singularity at the origin).

  • \(y_0(z) = -\frac{\cos(z)}{z}\)

  • \(y_1(z) = -\frac{\cos(z)}{z^2} - \frac{\sin(z)}{z}\)

Derivatives:

  • First derivative: \( y'_\nu(z) = \frac{\nu}{z} y_\nu(z) - y_{\nu+1}(z) \)

  • Second derivative: \(y''_\nu(z) = -\frac{\nu}{z^2} y_\nu(z) + \frac{\nu}{z} y'_\nu(z) - y'_{\nu+1}(z)\)

References

Abramowitz, M. and Stegun, I.A. (Eds.). (1964). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. National Bureau of Standards, Applied Mathematics Series 55. Chapter 10.

NIST Digital Library of Mathematical Functions. https://dlmf.nist.gov/

See also

yc for cylindrical Bessel functions of the second kind, js for spherical Bessel functions of the first kind, hs for spherical Hankel functions.

Examples

# Spherical Bessel function of the second kind
ys(0, 1)
#> [1] -0.5403023
ys(1, 2.5)
#> [1] -0.1112059

# Fractional order
ys(0.5, 3)
#> [1] 0.3299975

# Vector input
ys(0, c(1, 2, 3))
#> [1] -0.5403023  0.2080734  0.3299975

# Singularity at origin
ys(0, 0) # Returns -Inf
#> [1] -Inf

# First derivative
ysdk(1, 2, 1)
#> [1] 0.5586854

# Second derivative
ysdk(1, 2, 2)
#> [1] -0.3833794

# 3rd derivative
ysdk(1, 1, 3)
#> [1] 23.85335

# 4th derivative
ysdk(1, 1, 4)
#> [1] -120.1082