0
$\begingroup$

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?

$\endgroup$
4
  • $\begingroup$ If you just want to get the result without the ConditionalExpression, then simply Normal[int]. $\endgroup$
    – corey979
    Oct 14, 2016 at 13:00
  • $\begingroup$ Those scalar products has to be positive.... and If I do that, mathematica will choose some conditions and I wont see them. $\endgroup$
    – user35780
    Oct 14, 2016 at 13:30
  • 1
    $\begingroup$ 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. $\endgroup$ Oct 14, 2016 at 13:52
  • $\begingroup$ 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. $\endgroup$
    – user35780
    Oct 14, 2016 at 16:50

3 Answers 3

1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

I suggest you define all vectors in the first line.

$Assumptions = p > 0 && k > 0;

This will make it easy to follow.

$\endgroup$
4
  • $\begingroup$ Nope. Mathematica still things that (k-p).(k-p) is something different and can consider that product to negative.... $\endgroup$
    – user35780
    Oct 14, 2016 at 13:33
  • $\begingroup$ @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. $\endgroup$
    – sky-light
    Oct 14, 2016 at 13:48
  • $\begingroup$ I did that, but I still have the same result... I basically have the same conditional expression $\endgroup$
    – user35780
    Oct 14, 2016 at 17:04
  • 2
    $\begingroup$ Note the assumption is nonsense to begin with. What does it mean for a vector to be greater than zero? $\endgroup$
    – george2079
    Mar 13, 2017 at 17:12
1
$\begingroup$

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))         *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.