inc_gamma_imag {hawkesbow} | R Documentation |
Incomplete gamma function of imaginary argument
Description
Calculates the value of
\Gamma_1(x, \alpha) = \int_x^\infty t^{\alpha-1} e^{-it} \mathrm{d}t
for 0 < \alpha < 1
through the following relations:
\int_0^\infty t^{\alpha-1} e^{-it} \mathrm{d}t =
e^{-i\frac{\pi}{2}\alpha} \int_0^\infty t^{\alpha-1} e^{-t} \mathrm{d}t =
e^{-i\frac{\pi}{2}\alpha} \Gamma(\alpha).
obtained by contour integration, and:
\int_0^x t^{\alpha-1} e^{-it} \mathrm{d}t =
\int_0^x t^{\alpha-1} \mathrm{cos}(t) \mathrm{d}t -
i \int_0^x t^{\alpha-1} \mathrm{sin}(t) \mathrm{d}t =
Ci(x, \alpha) - i Si(x, \alpha)
. The first integral is calculated using function "tgamma" from the library "boost::math", while the functions Ci and Si are approximated via Taylor expansions.
Usage
inc_gamma_imag(x, alpha)
Arguments
x |
A non-negative number |
alpha |
A number between 0 and 1 (strictly) |
Value
The incomplete gamma function of imaginary argument (see Details)
Examples
inc_gamma_imag(1.0, 0.5)