Ask Your Question
1

Canonicalize radical not simplifying expression

asked 2024-09-03 22:59:30 +0100

relma2 gravatar image

updated 2024-09-03 23:00:24 +0100

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2024-09-05 10:29:12 +0100

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,

edit flag offensive delete link more

Comments

An alternative to invoke giac's simplification:

sage: simplify(s, algorithm='giac')
35/816
eric_g gravatar imageeric_g ( 2024-09-07 16:38:10 +0100 )edit
2

answered 2024-09-04 01:15:57 +0100

Max Alekseyev gravatar image

updated 2024-09-04 01:16:43 +0100

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() )
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

Stats

Asked: 2024-09-03 22:59:30 +0100

Seen: 265 times

Last updated: Sep 05