Bessel function and Hankel transformation
Tche LIU, seistche@gmail.com, USTC
The document contains some MathJax formulas that GitHub can't render properly, so that it looks slightly messy. Fortunately, for Chrome or Firefox, after installing the two add-ons MathJax Plugin for GitHub (GitHub repo.) or github-mathjax-firefox (GitHub repo.) respectively, these formulas will be perfectly show up. And you can have a try 😏.
The repository includes some examples for the Hankel transformation, and involves calculations of Bessel functions of the 1st kind and 2nd kind, their derivatives of the 1st order and 2nd order, and their zeros. Next, I will show you some mathematical formulas about calculations of Bessel function's derivatives and zeros, and the Hankel transformation.
Represent
so that
And it's not difficult to reduce the 2nd derivative:
and
According to Wikipedia, the fixed point iteration to solve zeros of Bessel function is:
Based on the above formulas, these results of product are:
According to Wikipedia, the iteration of Halley's method to solve zeros of Bessel function is:
According to Wikipedia, the Hankel transformation of order
The type of the Hankel transformation of this paper is (equations 2 and 3):
where $ \lambda_i = (1/r) \cdot 10^{a + (i - 1) s} $. Besides, values of the shift factor $ a $, the sampling spacing $ s $ and the $ n $-order filter weights $ W_i^{\nu} $ are given in the paper.
The formula is only applicable for the Hankel transformation based on Bessel function of the first class and order 0 or 1.
There are some examples of standard Hankel transformation to verify our programs in this paper:
The equation number | |||
---|---|---|---|
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 |
The approximation of integrals of the Hankel transformation type of this paper is (equation 5.2):
where $ \omega_{\nu k} = Y_{\nu}(\pi \xi_{\nu |k|}) / J_{\nu + 1} (\pi \xi_{\nu |k|}) $, $ x = \pi / h \cdot \psi(t) $, $ \psi(t) = t \tanh(\pi / 2 \cdot \sinh t) $, $ t = h \xi_{\nu k} $, $ h $ is a positive constant, $ \nu $ is a real constant greater than $ -1 $, and $ \xi_{\nu k} $ is the $ |k| $-th zero (counting from the origin) of $ J_{\nu} (\pi x) $ in such a way that
Set $ x = r \lambda $, so that $ \lambda = x/r $ and $ d\lambda = 1/r \cdot dx $, and $ x = \pi/h \cdot \psi(h \xi_{\nu k}) $, we can reduce:
The formula is applicable for the Hankel transformation based on Bessel function of the first class and an arbitrary order.
example_Functions is a fortran
module including all examples in (Guptasarma and Singh, 1997) for the Hankel transformation.
Hankel_Transform is a fortran
module to implement the Hankel transformation based on (Guptasarma and Singh, 1997).
Because the source file has no main program, as an example, you can compile it by $ gfortran -c Hankel_Transform.F90
, but CAN'T run it.
Bessel_Function is a fortran
module for calculations of Bessel functions of the 1st and 2nd kind, their derivative of the 1st and 2nd order, and zeros of original functions and derivations of the 1st order. The module is mainly modified from mjyzo.f90.
There are two macros for preprocessing in this source file:
- MOREAU for using Moreau's method to calculate Bessel functions of the 1st and 2nd kind and their derivatives of the 1st order; and if not defined, using
fortran
intrinsic functions to calculate. - HALLEY for using Halley's method to solve zeros of Bessel function of the 1st and 2nd kind; and if not defined, using the fixed point iteration to solve.
Because the source file has no main program, as an example, you can compile it by $ gfortran -DHALLEY -c Bessel_Function.F90
, but CAN'T run it.
Besides, Bessel Zero Solver is an efficient and reliable matlab
function to solve zeros of Bessel function of the 1st and 2nd kind based on Halley's method.
Guptasarma_1997 is a program based on the Hankel_Transform module to implement the methodology of (Guptasarma and Singh, 1997), and includes all examples in this paper by invoking the example_Functions module.
There is a macro for preprocessing in this source file: FAST for using less sample points to faster finish the Hankel transformation; and if not defined, using more sample points to more exactly finish.
For example, you can compile the source file by $ gfortran -DFAST example_Functions.F90 Hankel_Transform.F90 Guptasarma_1997.F90 -o Guptasarma
, and run the program by $ ./Guptasarma
.
Ogata_2005 is a program based on the Bessel_Function module to apply the methodology of (Ogata, 2005) to Hankel transform, and includes all examples in (Guptasarma and Singh, 1997) by invoking the example_Functions module.
For example, you can compile the source file by $ gfortran -DHALLEY example_Functions.F90 Bessel_Function.F90 Ogata_2005.F90 -o Ogata
, and run the program by $ ./Ogata
.
- Guptasarma and Singh, 1997. New digital linear filters for Hankel J_0 and J_1 transforms. Geophysical Prospecting, 45, 745-762. https://doi.org/10.1046/j.1365-2478.1997.500292.x
- Ogata, 2005. A numerical integration formula based on the Bessel functions. Publ. RIMS, 41, 949-970. https://doi.org/10.2977/prims/1145474602