Ask Your Question
2

Sage cannot simplify expressions with radical functions?

asked 2022-01-30 02:42:05 +0200

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-01-30 09:07:37 +0200

tolga gravatar image

canonicalize_radical() can do the job:

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

returns True

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: 2022-01-30 02:42:05 +0200

Seen: 218 times

Last updated: Jan 30 '22