The following command gives 0 in Mathematica 9.0.1.

f[a_, b_] := Exp[I*(a*x^3 + b*x^2)];
Integrate[f[a, b], {x, -Infinity, Infinity}, Assumptions -> {a > 0, Element[b,Reals]}]

This seems to be wrong, see the following article:

Is this really a bug and if yes, is it known (is it perhaps even some instance of a bigger problem)?

  • 5
    $\begingroup$ I get the same, but a simple rescaling gives a sensible result : int[p_, c_] = p Integrate[Exp[I*( x^3 + c*x^2)], {x, -Infinity, Infinity}, Assumptions -> {c \[Element] Reals}]. For instance, int[1/a^(1/3), b/a^(2/3)] /. {a -> 1/3, b -> 1} // N checks with the result in the link. $\endgroup$ Jul 31, 2013 at 14:39
  • 2
    $\begingroup$ Please don't use the bugs tag initially; it is meant to be added only once a consensus has been reached or a bug is recognized by WRI. $\endgroup$
    – Mr.Wizard
    Jul 31, 2013 at 15:58
  • 1
    $\begingroup$ No problem. :-) $\endgroup$
    – Mr.Wizard
    Jul 31, 2013 at 16:00
  • 2
    $\begingroup$ Looks like a clear bug to me. $\endgroup$
    – Jens
    Jul 31, 2013 at 17:50
  • 4
    $\begingroup$ Have put in place a provisional fix. Now hoping nothing breaks as a result of that-- would be nice for the fix to survive until the next release. $\endgroup$ Aug 1, 2013 at 2:50

2 Answers 2


It appears that you can work around this problem by using ExpToTrig to rewrite your expression. That is, this produces a result that seems to check out:

f[a_, b_] := Exp[I*(a*x^3 + b*x^2)];
result = Integrate[ExpToTrig[f[a, b]], {x, -Infinity, Infinity}, 
Assumptions -> {a > 0, b  \[Element] Reals}]

Evaluating this returns:

(2 E^((2 I b^3)/(27 a^2)) \[Pi] Abs[b] (BesselJ[-(1/3), (2 Abs[b]^3)/(27 a^2)] + BesselJ[1/3, (2 Abs[b]^3)/(27 a^2)]))/(9 a)

Let's check the result at one spot in the parameter space:

result /. {a -> 21, b -> 1/3} // N

0.560793 + 3.48872*10^-6 I

This seems to check out:

NIntegrate[f[21, 1/3], {x, -Infinity, Infinity}]

0.560793 + 3.48872*10^-6 I

Given the above results, I think that is is pretty clear that the original result from Integrate (without TrigToExp) is not correct.

  • 3
    $\begingroup$ Moreover the complex exponential route has trouble in Slater convolution when it hits things like Exp[2*Log[Ia]], which it cannot discern from Exp[2*Log[-Ia]] (both show up because we integrate from -infinity to zero by negating and going 0 to infinity). An effort is made to unravel such things, but apparently this is not always getting it correct. $\endgroup$ Aug 1, 2013 at 2:54

It looks like a bug to me because the zero result implies the integral is identically zero under the assumptions, but

With[{a = 1, b = 1}, Integrate[f[a, b], {x, -Infinity, Infinity}]]

which clearly satisfies the assumptions, gives

(2 E^((2 I)/27) \[Pi] AiryAi[-(1/(3 3^(1/3)))])/3^(1/3)

and has the numerical value of

1.79889 + 0.133495 I


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.