Ask Your Question
1

why won't simplify square roots?

asked 2016-11-24 00:42:57 -0500

danny gravatar image

updated 2016-11-24 00:50:27 -0500

sage: assume(x>2)

sage: sqrt(x^2 - 2*x + 1).simplify_full()

sqrt(x^2 - 2*x + 1)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-11-24 04:07:38 -0500

tmonteil gravatar image

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?
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-24 00:42:57 -0500

Seen: 50 times

Last updated: Nov 24 '16