# Bugs with Integrate when dealing with complex situation?

I'm trying to calculate $$\int_0^{\infty } \exp \left(t \left(-x^3+(1+i) x\right)\right) dx$$ with mathematica, and different assumptions on t give different results:

f[x_, t_] := Exp[t ((1 + I) x - x^3)];

int[1][t_] =
Assuming[t > 0, Integrate[f[x, t], {x, 0, \[Infinity]}]] //
FunctionExpand // Simplify

int[2][t_] =
Assuming[Re[t] > 0 && Im[t] < 0,
Integrate[f[x, t], {x, 0, \[Infinity]}]]

int[3][t_] =
Assuming[Re[t] > 0 && Im[t] > Re[t],
Integrate[f[x, t], {x, 0, \[Infinity]}]]

int[4][t_] =
Assuming[Re[t] > 0 && Im[t] < Re[t],
Integrate[f[x, t], {x, 0, \[Infinity]}]]



When I tried to evaluate the integral at t=1-I, the result should be provided by int[2][t]. However, int[1][t] is actually the right result:

NIntegrate[f[x, 1 - I], {x, 0, \[Infinity]}]

Table[int[i][1 - I] // N, {i, 1, 4}]


So is this a bug? My version is"14.0.0 for Mac OS X ARM (64-bit) (December 1, 2023)"

• Have you ever heard about branch cuts and related topics as Riemann surfaces? General expressions int[i] involve expressions like $t^{\frac{1}{3}},\; t^{\frac{1}{2}}$ and so you shouldn't assume these formule are valid in the whole complex plane. Documentation of special functions involve information about branch cuts and you should take care of them. Commented Jun 13 at 13:01
• @Artes: int[2][t_] = Integrate[f[x, t], {x, 0, \[Infinity]}, Assumptions -> Re[t] > 0 && Im[t] < 0, GenerateConditions -> True] // FunctionExpand // Simplify produces the same result in 14.0 on Windows 10. The result without FunctionExpand//Simplify is also incorrect. Commented Jun 13 at 13:39
• As I pointed out int[i] shouldn't be considered as well defined functions in the whole complex plane and your usage of these functions is incorrect since you jump between different branches of int[i]. Commented Jun 13 at 15:03

f[x_, t_] := Exp[t ((1 + I) x - x^3)];

((-1)^(1/12) \[Pi] AiryAi[(2^(5/6) E^((I \[Pi])/12))/3^(1/3)])/( 2^(1/6) 3^(5/6)) - ((-(1/2))^(1/6) E^(-((I \[Pi])/12)) \[Pi] AiryAi[(2^(5/6) E^((I \[Pi])/12))/3^( 1/3)])/3^( 5/6) + ((-1)^( 1/12) \[Pi] AiryBi[(2^(5/6) E^((I \[Pi])/12))/3^(1/3)])/( 3 2^(1/6) 3^(1/3)) + ((-(1/2))^(1/6) E^(-((I \[Pi])/12)) \[Pi] AiryBi[(2^(5/6) E^((I \[Pi])/12))/3^( 1/3)])/(3 3^( 1/3)) + (1/3 + I/3) HypergeometricPFQ[{1}, {4/3, 5/3}, 4/27 + (4 I)/27]
N[%]

1.8683 +1.28806 I