By Claude:
For a rational integrand with a denominator x^3+e, integrate asks for the sign of e even when e is not real. With z declared complex it asks a question that makes no sense:
(%i1) declare(z, complex)$
(%i2) integrate(1/(x^3+z), x);
Is z positive or negative?
With w declared imaginary it fails:
(%i1) declare(w, imaginary)$
(%i2) integrate(1/(x^3+w), x);
sign: argument cannot be non-real; found w
-- an error. To debug this try: debugmode(true);
A question about the sign of e only makes sense for a real e, and an antiderivative exists without one. Coefficients that need not be real get the same treatment, as log(a) with Is log(a) positive or negative?.
Fixed by commit [58f3e9].
Related
Commit: [58f3e9]