Hello,
If I try to simplify Sqrt[x^2] - Abs under the assumptions x>0 and x<=0 separately, it works correctly, but if I combine them into one condition it does not:
Why did it leave the expression unevaluated for (x>0) || (x<=0) case? It should evaluate to 0 like in the other two cases. What am I missing? Thank you.
Curiously, if I use Element[x,Reals] as a condition then it works:
Simplify[Sqrt[x^2]-Abs[x],Element[x,Reals]]
0
So, apparently, Element[x,Reals] and (x>0) || (x<=0) is not the same thing, oddly enough…
When Mathematica encounters the conditio (x>0) it then implies that x is a real number and when it further encounters the part “|| (x<=0)” it implies “x is a real number which is either positive or non-positive” but this is identically True. And when Simplify[] encounters an assumption which is identically True it doesn’t detect the “sub-implication” that has led to this truth (namely, the implication that x is real) and so it leaves the expression unevaluated.
So, I understand the mechanics of what is going on here, but, imho, it is not a very intuitive behaviour, i.e. perhaps Simplify[] should automatically detect any knowledge that has “come to light” as a result of evaluating the expression that goes into the assumptions part (i.e. second argument of Simplify[]).