Ask Your Question
2

Sage cannot simplify expressions with radical functions?

asked 3 years ago

sgia gravatar image

Sage cannot seem to simplify symbolic expressions containing radical functions, even if I specify the domain and use assumptions:

var('x', domain='positive')
assume(x>1)
bool(sqrt(x-1)>0) # True
bool(sqrt((x-1)^3)-(x-1)*sqrt(x-1)==0) #True
# not true even with x>1 assumption?
bool(sqrt(x^3-x^2)-x*sqrt(x-1)==0) #False

I know there is the simplify_chain_real() function that can simplify sqrt(x^3-x^2) to sqrt(x-1)*x, but shouldn't the bool() function force a simplification? And why the behavior is different (and correct) for bool(sqrt((x-1)^3)-(x-1)*sqrt(x-1)==0)?

Thanks

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 3 years ago

tolga gravatar image

canonicalize_radical() can do the job:

bool((sqrt(x^3-x^2)-x*sqrt(x-1)).canonicalize_radical()==0)

returns True

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

Seen: 333 times

Last updated: Jan 30 '22