Ask Your Question
1

why won't simplify square roots?

asked 2016-11-24 07:42:57 +0100

danny gravatar image

updated 2016-11-24 07:50:27 +0100

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 11:07:38 +0100

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 07:42:57 +0100

Seen: 408 times

Last updated: Nov 24 '16