Clicky

Fortran Wiki
Bessel function

Bessel functions, are canonical solutions y(x)y(x) of Bessel’s differential equation:

x 2d 2ydx 2+xdydx+(x 2α 2)y=0 x^2 \frac{d^2 y}{dx^2} + x \frac{dy}{dx} + (x^2 - \alpha^2) y = 0

for an arbitrary real or complex number α\alpha (the order of the Bessel function). The most common and important special case is where α\alpha is an integer (in which case we call it nn).

Bessel Functions of the First Kind: J αJ_\alpha

Bessel functions of the first kind, denoted J α(x)J_\alpha(x), are solutions of Bessel’s differential equation that are finite at the origin (x=0x = 0) for non-negative integer α\alpha, and diverge as x0x \to 0 for negative non-integer α\alpha. It is possible to define the function by its Taylor series expansion around x=0x = 0:

J α(x)= m=0 (1) mm!Γ(m+α+1)(x2) 2m+α J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \Gamma(m+\alpha+1)} {\left({\frac{x}{2}}\right)}^{2m+\alpha}

where Γ(z)\Gamma(z) is the gamma function, a generalization of the factorial function to non-integer values.

For evaluating Bessel functions of the first kind in Fortran, see bessel_j0, bessel_j1, and bessel_jn.

Bessel Functions of the Second Kind: Y αY_\alpha

Bessel functions of the second kind, denoted by Y α(x)Y_\alpha(x), are solutions of the Bessel differential equation. They are singular (infinite) at the origin (x=0x = 0).

For non-integer α\alpha, it is related to J α(x)J_\alpha(x) by:

Y α(x)=J α(x)cos(απ)J α(x)sin(απ). Y_\alpha(x) = \frac{J_\alpha(x) \cos(\alpha\pi) - J_{-\alpha}(x)}{\sin(\alpha\pi)}.

In the case of integer order nn, the function is defined by taking the limit as a non-integer α\alpha tends to nn:

Y n(x)=lim αnY α(x), Y_n(x) = \lim_{\alpha \to n} Y_\alpha(x),

which has the result (in integral form)

Y n(x)=1π 0 πsin(xsinθnθ)dθ1π 0 [e nt+(1) ne nt]e xsinhtdt. Y_n(x) = \frac{1}{\pi} \int_{0}^{\pi} \sin(x \sin\theta - n\theta)d\theta - \frac{1}{\pi} \int_{0}^{\infty} \left[ e^{n t} + (-1)^n e^{-n t} \right] e^{-x \sinh t} dt.

For evaluating Bessel functions of the second kind in Fortran, see bessel_y0, bessel_y1, and bessel_yn.