| 1 | initial version |
It would be better to try with simplification_routines(expression1-expression2)==0 instead of expression1==expression2 or simplification_routines(expression1)=simplification_routines(expression2)
The following seems alright:
var('x, y, n')
assume(n,'integer')
assume(n >= 0)
bool((((x-y)^n)-(-1)^n*(y-x)^n).expand().canonicalize_radical()==0)
| 2 | No.2 Revision |
It would be better to try with
simplification_routines(expression1-expression2)==0
instead of
expression1==expression2
or
simplification_routines(expression1)=simplification_routines(expression2)
The following code seems alright:to yield true:
var('x, y, n')
assume(n,'integer')
assume(n >= 0)
bool((((x-y)^n)-(-1)^n*(y-x)^n).expand().canonicalize_radical()==0)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.