Name: Vladyslav Shtabovenko (email_not_shown)
Date: 12/09/14-12:11:14 PM Z


thanks for reporting this issue.

The problem comes from PowerExpand that is used in FeynCalc's
PowerSimplify. When PowerExpand is used without any options, the
expansion of the square root is not always correct.

The correct and universal result can be obtained by adding the option
Assumptions->True. The bug is now fixed in the development version


$Assumptions = {test > 1};
tmp = Sqrt[test - 1];
Calc[tmp (Pair[LorentzIndex[\[Beta]], LorentzIndex[\[Beta]1]]) (Pair[
     LorentzIndex[\[Beta]], LorentzIndex[\[Beta]1]])]//Simplify


4*Sqrt[-1 + test]

Apart from that, in many cases the Calc function is not the optimal way
to simplify an expression, since it tries to do a lot of things that
might not be needed at all. For example, for your expression, Contract
alone is sufficient:

Contract[tmp (Pair[LorentzIndex[\[Beta]], LorentzIndex[\[Beta]1]])
(Pair[LorentzIndex[\[Beta]], LorentzIndex[\[Beta]1]])]

P.S. Note that if you want to simplify expressions that contain a square
root of a negative real number, you have to be very careful with
Mathematica. For example,

Sqrt[-a] // PowerExpand[#, Assumptions -> True] & //
  Simplify[#, Assumptions -> {a > 0}] &

returns I Sqrt[A], i.e. Mathematica assumes that Sqrt[-a] is
Sqrt[-a+ i eps]. If however, you actually meant it to be Sqrt[-a- i
eps], the result will be wrong. For this reason it is useful to add
a small imaginary part, to prevent Mathematica from making too many
assumptions. With

Sqrt[-a + I eta] //
  Limit[#, eta -> 0, Direction -> -1, Assumptions -> {a > 0}] &

Sqrt[-a - I eta] //
  Limit[#, eta -> 0, Direction -> -1, Assumptions -> {a > 0}] &

one can get the correct results for approaching the branch cut from
above or from below.


On 09/12/14 11:21, Sun Qingfeng wrote:
> I meant A BUG in The "Calc" Function, why the word in "" can not be shown....

This archive was generated by hypermail 2b29 : 03/01/17-06:40:02 PM Z CET