0

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!

icurays1
  • 135
  • 5

1 Answers1

0

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}]]
icurays1
  • 135
  • 5
  • 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