inc_gamma_imag: Incomplete gamma function of imaginary argument

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Calculates the value of

Γ_1(x, α) = \int_x^∞ t^{α-1} e^{-it} \mathrm{d}t

for 0 < α < 1 through the following relations:

\int_0^∞ t^{α-1} e^{-it} \mathrm{d}t = e^{-i\frac{π}{2}α} \int_0^∞ t^{α-1} e^{-t} \mathrm{d}t = e^{-i\frac{π}{2}α} Γ(α).

obtained by contour integration, and:

\int_0^x t^{α-1} e^{-it} \mathrm{d}t = \int_0^x t^{α-1} \mathrm{cos}(t) \mathrm{d}t - i \int_0^x t^{α-1} \mathrm{sin}(t) \mathrm{d}t = Ci(x, α) - i Si(x, α)

. 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

1
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

1
inc_gamma_imag(1.0, 0.5)

hawkesbow documentation built on April 10, 2021, 1:07 a.m.