why won't simplify square roots?
sage: assume(x>2)
sage: sqrt(x^2 - 2*x + 1).simplify_full()
sqrt(x^2 - 2*x + 1)
sage: assume(x>2)
sage: sqrt(x^2 - 2*x + 1).simplify_full()
sqrt(x^2 - 2*x + 1)
You can use the canonicalize_radical
method for that:
sage: e = sqrt(x^2 - 2*x + 1)
sage: e.canonicalize_radical()
x - 1
However, the assumptions are not taken into account, please read the warning in the doc:
sage: e.canonicalize_radical?
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2016-11-24 07:42:57 +0100
Seen: 408 times
Last updated: Nov 24 '16