Learn R Programming

hawkesbow (version 1.0.3)

inc_gamma_imag: 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)

Value

The incomplete gamma function of imaginary argument (see Details)

Arguments

x

A non-negative number

alpha

A number between 0 and 1 (strictly)

Examples

Run this code
inc_gamma_imag(1.0, 0.5)

Run the code above in your browser using DataLab