# Integral with complex parameter

Can I obtain an analytic expression for the following integral?

$$I = \int_{-\infty}^{\infty} d\nu \, \frac{e^{-\frac{(\nu -iX)^2}{2\sigma^2}}}{1+ \frac{\nu^2}{\sigma^4}}$$

Here $$\sigma>0$$, and $$X \in \mathbb{C}$$.

I tried using the below command but it returned the same expression. Any help will be great in this regard.

Integrate[E^(-(ν - I X)^2/(2 σ^2))/(ν^2/σ^4 + 1), {ν,-∞, ∞}, Assumptions -> σ > 0]

• I think no chance for an analytical expression of that integral. Apr 27 at 3:19

Looks like:

$$\int_{-\infty }^{\infty } \frac{e^{-\frac{(\nu -i X)^2}{2 \sigma ^2}}}{\frac{\nu ^2}{\sigma ^4}+1} \, d\nu =-\frac{1}{2} e^{\frac{\left(X-\sigma ^2\right)^2}{2 \sigma ^2}} \pi \sigma ^2 \left(-2+\text{erfc}\left(\frac{X-\sigma ^2}{\sqrt{2} \sigma }\right)-e^{2 X} \text{erfc}\left(\frac{X+\sigma ^2}{\sqrt{2} \sigma }\right)\right)$$

 N[With[{X = 3 + 4 I, \[Sigma] = 3}, -(1/2) E^((X - \[Sigma]^2)^2/(2 \[Sigma]^2)) \[Pi] \[Sigma]^2 (-2 +
Erfc[(X - \[Sigma]^2)/(Sqrt[2] \[Sigma])] -
E^(2 X) Erfc[(X + \[Sigma]^2)/(Sqrt[2] \[Sigma])])], 30]

(*6.29144555383952196652073437413 + 1.23139881428285232437943972824 I*)

With[{X = 3 + 4 I, \[Sigma] = 3}, NIntegrate[
E^(-(\[Nu] - I X)^2/(2 \[Sigma]^2))/(\[Nu]^2/\[Sigma]^4 +
1), {\[Nu], -Infinity, Infinity}, WorkingPrecision -> 31]]

(*6.291445553839521966520734374127 + 1.231398814282852324379439728238 I*)


I use FourierTransform to solve this integral:

 FourierTransform[(Exp[-(x^2/(2 \[Omega]^2)) + X^2/(
2 \[Omega]^2)]*\[Omega]^4)/(\[Omega]^4 + x^2), x, W,
Assumptions -> {\[Omega] > 0}] /. W ->  X/\[Omega]^2
(* ? *)


I waited half an hour and got no response, so I used Maple 2023 and got a response in a fraction of a second.

• Thanks for the answer. Apr 27 at 10:59
• FourierTransform[(Exp[-(x^2/(2 \[Omega]^2)) + X^2/( 2 \[Omega]^2)]*\[Omega]^4)/(\[Omega]^4 + x^2), x, W, Assumptions -> {\[Omega] > 0}] /. W -> X/\[Omega]^2 returns the input in 13.2 on Windows 10 in several hours. Apr 27 at 16:35
• @user64494 Thanks for solving. Apr 27 at 20:29

If the term I X is meant to be imaginary I * Complex, then the answer is not definitely true. Make the formal substitution

Together /@
Inactive[Integrate][
dx E^(-(x - I X)^2/(2 \[Sigma]^2))/(x^2/\[Sigma]^4 + 1),
{x, -\[Infinity], \[Infinity]}] /.
{x -> I X + \[Sigma] y , dx -> \[Sigma] dy } // FullSimplify

Inactive[Integrate][
(dy E^(-(y^2/2)) \[Sigma]^5)/
(\[Sigma]^4+(I X+y \[Sigma])^2),  -oo<  X+y \[Sigma] < oo]

ConditionalExpression[
(1/2)*dy* E^((X - \[Sigma]^2)^2/
(2*\[Sigma]^2))*\[Sigma]^2* (Pi*Erf[(X - \[Sigma]^2)/
(Sqrt[2]*\[Sigma])] - E^(2*X)*Pi*Erf[(X + \[Sigma]^2)/(Sqrt[2]*[Sigma])]
+  I*(Log[(I*\[Sigma])/(X - \[Sigma]^2)] - Log[(I*\[Sigma])/
(-X +\[Sigma]^2)] + E^(2*X)*(Log[-((I*\[Sigma])/
(X + \[Sigma]^2))] - Log[(I*\[Sigma])/(X + \[Sigma]^2)]))),
Re[X/\[Sigma]] != Re[\[Sigma]] && Re[X/\[Sigma] + \[Sigma]] != 0]


Since by inspection, the integrand has a singularity at the zeros of the denominator, the shifting of the path $$x \rightarrow i X + \sigma y$$, may change the integral. A simple check is the numerical integral over the interval of confidence for a Gaussian x by +-3 sigma

• Hi Roland, thanks for the answer. To clarify, I X in your case is I * Real, is it? Also just wondering, why is there a $dy$ in the final conditional expression, which presumably is your answer for the integral? Apr 26 at 10:01
• I take Leibniz differentials ds, dy dy/dx always for fast, error free, substitutions. They finally always evaluate to 1., Apr 26 at 10:37
• @MichaelWilliams Roland's answer does seem to agree with numerical NIntegrate when you set $dy$ to 1. I tried With[{X = 3 + 4 I, \[Sigma] = 3}, NIntegrate[ E^(-(\[Nu] - I X)^2/(2 \[Sigma]^2))/(\[Nu]^2/\[Sigma]^4 + 1), {\[Nu], -Infinity, Infinity}] ] for example, and got 6.29145 + 1.2314 I though I don't understand the method here. Apr 26 at 11:09
• A change of a variable in an improper integral is not so simple. This should be grounded in every case. That we see is empty talk. Apr 26 at 17:17
• The change of a variable in a Fourier transform like integral is always an inspection of singularities and evaluation of residues or something worse for closed loop integrals on paths through the jungle. Because today nobody is teaching or learning this art, there are tables from the golden years of applied complex analysis. Before CAS times,the table users mostly had no idea whats wrong there. I remember a first statistical check in the 1990 found 15% errors. Fortunately, errors remain over the years in the never asked part of the formula store only. May 1 at 13:56