Ask Your Question
1

why won't simplify square roots?

asked 8 years ago

danny gravatar image

updated 8 years ago

sage: assume(x>2)

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

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

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?
Preview: (hide)
link

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: 8 years ago

Seen: 411 times

Last updated: Nov 24 '16