The use of Gaussian quadrature formulae is explored for the computation of the Macdonald function (modified Bessel function) of complex orders and positive arguments. It is shown that for arguments larger than one, Gaussian quadrature applied to the integral representation of this function is a viable approach, provided the (nonclassical) weight function is suitably chosen. In combination with Gauss–Legendre quadrature the approach works also for arguments smaller than one. For very small arguments, power series can be used. A Matlab routine is provided that implements this approach.
Cite this work
Researchers should cite this work as follows:
- Gautschi, W. (2014). MCD: Matlab programs for computing the Macdonald function for complex orders. Purdue University Research Repository. doi:10.4231/R7B8562S
These serve as a companion piece to the paper "Numerical quadrature computation of the Macdonald function for complex orders," BIT 45 (2005), 593-603. (DOI: 10.1007/s10543-005-0020-5).