Name: Vladyslav Shtabovenko (email_not_shown)
Date: 09/19/15-10:01:32 PM Z

The fix is now in the repository.

Essentially one can now supply Assumptions as an option to Calc
or PowerSimplify which will be then internally passed to PowerExpand
inside PowerSimplify.

Please check the Options section in

on using Assumptions with PowerExpand.

The default value in FeynCalc is "True", which means that PowerExpand
will not make any possibly wrong expansions.


Calc[Sqrt[x - 1],Assumptions->{x>1}]

returns the correct result. Please note that here the assumptions must
be supplied this way, as PowerExpand doesn't use $Assumptions, e.g.

$Assumptions = {x < 0};

still returns x, contrary to

PowerExpand[Sqrt[x^2], Assumptions -> x < 0]

that returns -x. This is standard Mathematica behavior.

Furthermore, I've also added an option to disable PowerExpand
altogether, via

Calc[Sqrt[x - 1], PowerExpand->False]


Am 16.09.2015 um 00:44 schrieb Vladyslav Shtabovenko:
> Dear all,
> sorry for the late reply, at the moment I'm a bit busy finishing one
> important calculation.
> As Rolf wrote, Calc uses PowerSimplify which uses PowerExpand. The
> latter can either assume that everything is real (default behaviour) or
> use general expansion formulas if the arguments might be complex (which
> we have now). Unfortunately, in this case PowerExpand doesn't take
> $Assumptions into account.
> I think that the simplest solution would be to make Calc and
> PowerSimplify accept the Assumptions option which will be then passed to
> PowerExpand. Then it will be up to the user to specify the assumptions.
> As a workaround for now,
> Sqrt[x - 1] // Calc // Simplify
> returns the correct result, as Simplify always honors $Assumptions.
> I'll fix this soon.
> Cheers,
> Vladyslav
> Am 14.09.2015 um 10:58 schrieb Rolf Mertig:
>> This is due to me. Sorry.
>> Somehwere internally PowerSimplify is used which assumes all variables are real. Maybe this assumption is not correct in general, of course. I mentioned this to Vladyslav and he will look into how to fix this. Sorry, but I have no time right now.

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