# Excluding an interval of parameters from Integrate [duplicate]

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, rm -rf♦Feb 14 '14 at 16:53

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

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