It seems that Mathematica's processing of principal integrals fails in some corner cases. Consider these two expressions (which should give the same result):
Integrate[UnitBox[x]/(x0 - x), {x, -Infinity, Infinity},
PrincipalValue -> True, Assumptions -> {x0 > 0}] /. x0 -> 1
Integrate[UnitBox[x]/(x0 - x) /. x0 -> 1, {x, -Infinity, Infinity},
PrincipalValue -> True]
In Mathematica 7.0.0 I get
I Pi+Log[3]
Log[3]
Was this fixed in later versions? Does anyone have any ideas for a (more or less) common workaround?
EDIT: the two above expressions should calculate the same result, first calculating the general form of the integral and evaluating it with x0=1, and the second, performing the integral with x0set to 1. Since the exact meaning of Cauchy has a precise mathematical definition, Mathematica must give the same result or refuse to answer.
2: , , -1 Integral ( , -, ):
-Integrate[ UnitBox[x]/(x0 - x), {x, -Infinity, Infinity}, PrincipalValue -> True, Assumptions -> {x0 > 0}]
Integrate[-UnitBox[x]/(x0 - x), {x, -Infinity, Infinity}, PrincipalValue -> True, Assumptions -> {x0 > 0}]