Why I have this behaviour?
R /: Greater[R, 0] = True
R > 0
=> True
Simplify[Sqrt[R^2]]
=> Sqrt[R^2]
I expect R as last result.
Why I have this behaviour?
R /: Greater[R, 0] = True
R > 0
=> True
Simplify[Sqrt[R^2]]
=> Sqrt[R^2]
I expect R as last result.
One way to do this would be to keep a list of assumptions for your system, i.e.
assumptions = {R >= 0};
Simplify[Sqrt[R^2], Assumptions -> assumptions]
which returns R as expected.
R, so to avoid to recall the Assumptions option each time?
– enzotib
Mar 16 '13 at 15:19
Simplify[Sqrt[R^2], Assumptions :> R > 0]. – Leonid Shifrin Mar 16 '13 at 15:14Ris positive once for all? – enzotib Mar 16 '13 at 15:26$Assumptions, but if for some reason you don't want that, and want to avoidSimplify, then you could also just defineR = Abs[r]. – Jens Mar 16 '13 at 15:42