How to evaluate a complex function between complex bounds

AkchurinDA
Thu, 03 Aug 2023 19:37:19 +0000
General Usage

I’m having trouble evaluating the following expression that contains an integral with a complex function with complex bounds.

In this expression, \phi() is the PDF of a standard normal distribution, \beta is a number >0, and \kappa is a vector of both negative and positive numbers of length n - 1. In a particular example that I’m studying, the following values are used for \beta and \kappa:

β = 2.4660212074327954
κ = [-0.15473970173530405, -0.03989979101500318, -8.945133695399355e-11]

I have tried to evaluate the integral using QuadGK package, using the following code:

Integral, _ = quadgk(s -> (1 / s) * exp((s + β)^2 / 2) * prod(1./sqrt.((1 .+ s .* κ))), 0 + 0 * im, 0 + Inf * im)
PoF = pdf(Normal(0, 1), β) * real(im * sqrt(2 / π) * Integral)

But I get DomainError with 0.0 + Inf*im.

I know that for the particular values of \beta and \kappa above, the whole expression should evaluate to 0.00936. I would appreciate if somebody could help me with this integral.

3 posts - 2 participants