I am trying to perform integrals of the kind $\int dx\frac{x^2-q^2}{z-x+i\eta}$. Mathematica, however, gives back different results whenever I replace the parameter $z$ by $w$, for instance, as follows

Integrate[$\frac{x^2-q^2}{z-x+i \eta}$,$x$]//FullSimplify=$-\frac{1}{2}(x-z-i\eta)(x+3z+3i\eta)+(q^2-(z+i\eta)^2)\log{\left(-x+z+i\eta\right)}$ and

Integrate[$\frac{x^2-q^2}{w-x+i \eta}$,$x$]//FullSimplify=$\frac{1}{2}\left(-x\left(2w+x+2i\eta\right)+\left(q-w-i\eta\right)\left(q+w+i\eta\right)\left(2i\arctan{\left(\frac{\eta}{w-x}\right)}+\log{\left(\left(w-x\right)^2+\eta^2\right)}\right)\right)$

The results do not only have a different form, but taking the limit $\eta\rightarrow0$ after performing the integral yields different results. Note that the only difference between the integrals is the name of the parameter $z$. Can anyone tell me what's going on here and what the correct result would be. Thanks!


Integrate[(x^2 - q^2)/(z - x + I η), x] // FullSimplify

-(1/2) (x - z - I η) (x + 3 z + 3 I η) + (q^2 - (z + I η)^2) Log[-x + z + I η]

Integrate[(x^2 - q^2)/(w - x + I η), x] // FullSimplify

1/2 (-x (2 w + x + 2 I η) + (q - w - I η) (q + w + I η) (2 I ArcTan[η/(w - x)] + Log[(w - x)^2 + η^2]))

  • $\begingroup$ Is not it diverging in any case? $\endgroup$ – yarchik Aug 17 '16 at 17:10
  • $\begingroup$ I was not able to reproduce your error. It's hard to tell what might be wrong since your code isn't inserted as valid Mathematica code. My suspicion is that you omitted the space between i and n in the denominator of the first form. $\endgroup$ – user16054 Aug 17 '16 at 17:11
  • $\begingroup$ The imaginary part is added the the denominator so that it would not diverge. To make sure this doesn't happen, I also used the assumptions the all parameters are reals and positive(whereas the latter doesn't matter). $\endgroup$ – Richard van Dongen Aug 17 '16 at 17:21
  • $\begingroup$ Hehe, my bad. First post on this site. I suppose you want to see the code like this: Integrate[(x^2 - q^2)/(z - x + I [Eta]), x] and Integrate[(x^2 - q^2)/(w - x + I [Eta]), x]. The space isn't omitted in any case. I just copy pasted the expression and changed the $z$ into a $w$. $\endgroup$ – Richard van Dongen Aug 17 '16 at 17:23
  • 1
    $\begingroup$ @RichardvanDongen No problem! I've submitted an edit to your post (that should appear pending peer review) that demonstrates how to your insert code into a question like this $\endgroup$ – user16054 Aug 17 '16 at 18:08

(*  "11.0.0 for Mac OS X x86 (64-bit) (July 28, 2016)"  *)

expr = (x^2 - q^2)/(z - x + I η);

i1 = Integrate [expr, x] // FullSimplify

(*  -(1/2) (x - z - I η) (x + 3 z + 
    3 I η) + (q^2 - (z + I η)^2) Log[-x + z + I η]  *)

Change of z to w

i2 = Integrate [expr /. z -> w, x] // FullSimplify

(*  1/2 (-x (2 w + x + 2 I η) + (q - w - I η) (q + w + 
      I η) (2 I ArcTan[η/(w - x)] + Log[(w - x)^2 + η^2]))  *)

Indefinite integrals can differ by an arbitrary (complex) constant of integration. The canonical order of the variables involved can affect the choice of this arbitrary constant. However, differentiation of either result returns the original expression.

expr == D[i1, x] == (D[i2, x] /. w -> z) // Simplify

(*  True  *)
  • $\begingroup$ It is interesting (and unexpected, as far as I am concerned) that the results depends on the name of the variable whch fall into two classes Class 1: names starting with a..w. class 2: names starting with x,y,z (and also with greek letters). Class 1 gives ArcTan and Log, class 2 gives just Log. This seems to hold also for capital letters. $\endgroup$ – Dr. Wolfgang Hintze Aug 17 '16 at 22:35
  • $\begingroup$ @Dr.WolfgangHintze - I don't understand your comment. I believe that the difference occurs because z follows x canonically whereas w precedes x canonically. $\endgroup$ – Bob Hanlon Aug 17 '16 at 22:36
  • $\begingroup$ I think you are right. I have checked this with other integration variables.It even works if we write I z instead of z. $\endgroup$ – Dr. Wolfgang Hintze Aug 17 '16 at 22:42
  • $\begingroup$ sorry, the editor does not allow me to address you like (at)Bob Hanlon $\endgroup$ – Dr. Wolfgang Hintze Aug 17 '16 at 22:43
  • $\begingroup$ Thanks! Eventhough I do not fully understand why different constants would arise, this solves my question, since the constant will vanish when I make it a definite integral. $\endgroup$ – Richard van Dongen Aug 19 '16 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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