# Generate conditions seems to not work [closed]

I am trying to compute the following integral

Integrate[E^(I*k*Omega*t), {t,0,T}, GenerateConditions->True]


for which Mathematica returns

((-I)*(-1+E^(I*k*Omega*T)))/(k*Omega)


apparently not recognizing that k can be 0. Why GenerateConditions doesn't work as expected?

-

## closed as off-topic by m_goldberg, bobthechemist, Sjoerd C. de Vries, Öskå, ubpdqnJul 3 '14 at 13:25

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Limit[((-I)*(-1+E^(IkOmegaT)))/(kOmega), k -> 0] gives the right answer:T. – Apple Jul 2 '14 at 13:59
Assuming[k == 0, Integrate[E^(IkOmega*t), {t, 0, T}]] also gives T. – Bob Hanlon Jul 2 '14 at 14:16
Thank you for your replies, but here the point is to automatically generate the conditions for which the result changes. The reason is that in the real case I have several k-variables, and I expect that there will be lots of conditions. – Jommy Jul 2 '14 at 18:05
(1) Integrate will not catch conditions that are discrete. (2) As was pointed out already in comments, the result is correct anyway; the singularity is removable (e.g. via Limit). – Daniel Lichtblau Jul 2 '14 at 18:20
This question appears to be off-topic because its asker simply does not understand that the result he contests is actually correct. – m_goldberg Jul 3 '14 at 1:56

(1) Integrate will not catch conditions that are discrete. (2) As was pointed out already in comments, the result is correct anyway; the singularity is removable (e.g. via Limit).
Edit: I might add that GenerateConditions might yield a ConditionalExpression but not a piecewise function, which is what the complete specification of the OP's integral would require. ConditionalExpression[expr, condition] implies that the answer is Undefined when the condition is not met.
It seems that @Daniel Lichtblau is right, since I've tried Integrate[x^n, x, GenerateConditions -> True], and the result fails by setting n to -1. However for this case also the Limit is not correct. – Jommy Jul 5 '14 at 10:23
@Jommy Limit does not work because the integral is indefinite. It works on Integrate[x^n, {x, a, b}, Assumptions -> 0 < a < b]. I believe GenerateConditions defaults to True for single integrals. See mathematica.stackexchange.com/a/13458 and mathematica.stackexchange.com/a/46492. – Michael E2 Jul 5 '14 at 15:43
@Jommy Here's an example where Limit fails: Integrate[Sin[a/x]/x, {x, 0, 1}]. The answer (or its limit) does not agree with the actual integral for a == 0 + t I, for any real value for t. – Michael E2 Jul 5 '14 at 18:05