# Specifying multiple assumptions in the integration

I have to calculate following integral

$$\int_{-\infty}^{\infty} \frac{d \omega}{(i \omega +(\mathbf{k}-\mathbf{p}).(\mathbf{k}-\mathbf{p}) ) (-i \omega + (\mathbf{k}+\mathbf{p}).(\mathbf{k}+\mathbf{p}) )}$$

where $\mathbf{k},\mathbf{p}$ are d-dimensional vectors. Therefore:

int = 1/((I o + (k - p).(k - p)) (-I o + (k + p).(k + p)))
Integrate[int, {\o, -\[Infinity], \[Infinity]},Assumptions -> {p > 0,k> 0}]

but it gives me

ConditionalExpression[0,Re[(k + p).(k + p)] < 0 && Re[(k - p).(k - p)] > 0]

It seems that mathematica counts (k+p).(k+p) as some different structure which has to be specified separately. I can do it by implying assumptions as

Assumptions -> {(k+p).(k+p) > 0,(k-p).(k-p)> 0}

But this gets really annoying when I have several different vectors like k,p,r,s and so on and all possible combinations of them.

How should I make it simpler?

• If you just want to get the result without the ConditionalExpression, then simply Normal[int]. Commented Oct 14, 2016 at 13:00
• Those scalar products has to be positive.... and If I do that, mathematica will choose some conditions and I wont see them. Commented Oct 14, 2016 at 13:30
• Mathematica has no idea that k and p are vectors, or what those dot products might be. I'd suggest recasting the expression using symbolic expressions for the dot products, maybe kmp2 and kpp2 (for "k - p squared" and "k plus p squared" respectively). Then put assumptions in that they are positive. Commented Oct 14, 2016 at 13:52
• Yes, that would be a good solution for this problem. But this is just a part of the whole program that I have and these forms are the most effective ones for the rest of the program. For example I can have sum of any (finite) numbers of vectors there and then I have to perform Taylor series in powers of those vectors. I know how to do that, I just don't know how to set these assumptions in the most effective way. Commented Oct 14, 2016 at 16:50

we could auto generate a condition that any vector Dot with itself is positive:

int = 1/((I o + (k - p).(k - p)) (-I o + (k + p).(k + p)));
Integrate[int, {o, -\[Infinity], \[Infinity]},
Assumptions -> (# > 0 & /@ Cases[int, Dot[a_, a_], Infinity]) ]

(2 Pi)/((k - p).(k - p) + (k + p).(k + p))

Implicitly this assumes k!=p. You could use >=0 then you get a conditional expression that basically asserts that.

I suggest you define all vectors in the first line.

$Assumptions = p > 0 && k > 0; This will make it easy to follow. • Nope. Mathematica still things that (k-p).(k-p) is something different and can consider that product to negative.... Commented Oct 14, 2016 at 13:33 • @Versor295 So, define them as they are so that Mathematica don't confuse or do unnecessary assumptions. For example,$Assumptions = p > 0 && k > 0&& p \in Reals; and so on. Define all of the vectors in detail. Commented Oct 14, 2016 at 13:48
• I did that, but I still have the same result... I basically have the same conditional expression Commented Oct 14, 2016 at 17:04
• Note the assumption is nonsense to begin with. What does it mean for a vector to be greater than zero? Commented Mar 13, 2017 at 17:12

Assume the Dot-Products to be greater 0:

int = 1/((I o + (k - p).(k - p)) (-I o + (k + p).(k + p)));

Integrate[int, {o, -\[Infinity], \[Infinity]},
Assumptions -> ((k - p).(k - p) > 0 && (k + p).(k + p) > 0)]

(*  (2 \[Pi])/((k - p).(k - p) + (k + p).(k + p))         *)