# Excluding an interval of parameters from Integrate [duplicate]

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

Integrate[f[x,z],{x,-a,a}]


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.

Thanks!

-

## marked as duplicate by Artes, The Toad♦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

Using the suggestions found here, I was able to use

Assuming[If[Element[z,Reals],(z<-b||z>b)]&&b>0,Integrate[f[x,z],{x,-b,b}]]

-
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