Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

I'd like to compute an integral that depends on a parameter, but I'd like to exclude an interval from the computation. For concreteness, say I want to compute


but I would like to specify that z is a complex number not in the real interval [-a,a]. Any thoughts? If I let the integral run, I get a conditional expression that I think is correct, but I'd like to specify the exclusion ahead of time if possible.


share|improve this question

marked as duplicate by Artes, rm -rf Feb 14 '14 at 16:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

z<-a || a<z is the way to express this if z is real. Do you only want to exclude this interval for reals, but not for any z value where Im[z] != 0? –  Szabolcs Feb 14 '14 at 16:12
The answer to your question can be found (if you read it carefully) e.g. here: How to specify assumptions before evaluation?. –  Artes Feb 14 '14 at 16:13
@Artes That answers it - thanks for the link. –  icurays1 Feb 14 '14 at 16:24

1 Answer 1

Using the suggestions found here, I was able to use

share|improve this answer
I don't think this syntax is correct for assumptions. You can't use If this way (or rather: Mathematica won't interpret it the way you think it would.) –  Szabolcs Feb 14 '14 at 16:36
It seems to work. (i.e. it gives me the same answer as my calculation by-hand, and with no conditional expressions) –  icurays1 Feb 14 '14 at 16:49

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