# Canonicalize radical not simplifying expression

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 close merge delete

Sort by ยป oldest newest most voted

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,

more

An alternative to invoke giac's simplification:

sage: simplify(s, algorithm='giac')
35/816

( 2024-09-07 16:38:10 +0200 )edit

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

more

## Stats

Seen: 109 times

Last updated: Sep 05