Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, R. M. Feb 14 '14 at 16:53

This question was marked as an exact duplicate of an existing 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

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.