# Mathematica : Weird Integral

• Mathematica
Gold Member
How is MM doing the integral? Is this something with a definite solution?

Limit[Integrate[(1 - 2 x)/x^2, {x, a, b}], a -> 0]
Integrate[(1 - 2 x)/x^2, {x, 0, b}]

The first one gives infinity, the second a closed solution, though technically they should be the same, right?

Which version of Mma are you using and what is the closed solution the second one gives you?

The integrand goes like 1/x^2 + 1/x as x->0 and so diverges, and as Wolfram|Alpha says, the Cauchy principle value is +Infinity.

In Mma8 the first expression returns
ConditionalExpression[Indeterminate, b >= 0]
(which seems like a mistake to me... what's b>=0 got to do with anything?)
While the second gives a warning about nonconvergence and keeps the expression unevaluated.

ConditionalExpression is new in Mma8. So Mma7 generates conditions for when the integral over {x, a, b} converges in the form of an If[] statement. I gave up waiting for it to take the limit of the resulting expression. Mma7 has the same behaviour as Mm8 for the integral over {x, 0 b}.

And yes, assuming that b is Real, both expressions should yield +Infinity

Last edited:
Dale
Mentor
2020 Award
I get Simon's results also. Essentially both methods diverge.

Gold Member
Strange, I must have had some weird assumptions. (Version 7)
So when I run it from a fresh start, I get that they both diverge. If I do some of my other code, NONE OF WHICH uses a,b, or x, I get this:

And if I change x-> something random and b-> something random, it does the SAME thing.

EDIT::

I Think I found the problem, there must be something in Feyncalc. If I do:

<< HighEnergyPhysicsFeynCalc;

just to load it, then do the integrals , it gives the weird responses... I wonder if there is something in its definitions to handle the N-dimensional divergent integrals that is messing with this.

Gold Member
Here's what I get:

Probably somewhere some assumptions have been set in FeynCalc, or the option GenerateCondtions->False has been set.

Integrate[(1 - 2 x)/x^2, {x, 0, b}, GenerateConditions -> False]

find . -exec grep -l "GenerateConditions" {} \;

and the only files that turned up in the latest version of FeynCalc was the FeynCalcBook.nb and /fctables/Integrate3.m. But it only applied to a specific PolyLog integral... So I'm not sure what's causing the problem.

You can similarly find every file that contains the string "Integrate" - but a quick look at these does not show anything obvious....

Finally, I ran the same sequence of commands you gave in your screenshots in both Mma7 and Mma8 and did not reproduce your results...
Can you load FeynCalc and run "Options[Integrate, GenerateConditions]" to see if it returns the default "GenerateConditions->Automatic"?
I assume that it must be set to False, because otherwise your Out[8] would have the same conditions attached to it as your Out[3]. Then it's just a matter of tracking down what setting you've made in you FeynCalc install that would do this. Try running the "find ..." command I gave above in your FeynCalc directory.

Last edited by a moderator:
Gold Member
yeah thats it.

In[1]:= Options[Integrate,GenerateConditions]

Out[1]= {GenerateConditions->Automatic}
In[2]:= <<HighEnergyPhysicsFeynCalc;
During evaluation of In[2]:= Set::wrsym: Symbol MonomialList is Protected. >>
During evaluation of In[2]:= DumpGet::bgbf: File C:\Program Files\Wolfram Research\Mathematica\7.0\AddOns\Applications\HighEnergyPhysics\Tarcer\tarcer25.mx cannot be loaded, it is corrupted or is written on a different machine. >>
In[3]:= Options[Integrate,GenerateConditions]

Out[3]= {GenerateConditions->False}