First time here? Check out the FAQ!

Ask Your Question
1

Canonicalize radical not simplifying expression

asked 0 years ago

relma2 gravatar image

updated 0 years ago

I have the expression 7/6528*(103*sqrt(sqrt(17) + 17)*(sqrt(17) - 17) + 252*sqrt(17)*sqrt(-sqrt(17) + 17))/(sqrt(sqrt(17) + 17)*(sqrt(17) - 17)), which I know is a rational number based on a theorem proved from a paper. In fact, it is supposed to equal 35/816. However, SageMath does not simplify this to a rational number with full_simplify() or with canonicalize_radical().

How do I force SageMath to simplify this properly?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 0 years ago

Emmanuel Charpentier gravatar image

Alternatives to @Max Alekseyev's excellent answer :

sage: s._giac_().simplify()
35/816
# Gratis-but-not-free Wolfram Engine :
sage: s._mathematica_().FullSimplify()
35/816

HTH,

Preview: (hide)
link

Comments

An alternative to invoke giac's simplification:

sage: simplify(s, algorithm='giac')
35/816
eric_g gravatar imageeric_g ( 0 years ago )
2

answered 0 years ago

Max Alekseyev gravatar image

updated 0 years ago

Converting expession to an algebraic number and computing its radical expression does the trick here:

s = 7/6528*(103*sqrt(sqrt(17) + 17)*(sqrt(17) - 17) + 252*sqrt(17)*sqrt(-sqrt(17) + 17))/(sqrt(sqrt(17) + 17)*(sqrt(17) - 17)) 
print( QQbar(s).radical_expression() )
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

Stats

Asked: 0 years ago

Seen: 320 times

Last updated: Sep 05 '24