First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When asked for a Boolean expression, SageMath returns False if it is not capable to evaluate the expression to either true or false (a real false). This is what is happening in the present case; SageMath does not detect the identity:

sage: (3^(2*n) - (3^2)^n).simplify_full()
-9^n + 3^(2*n)

SymPy is more clever:

sage: (3^(2*n) - (3^2)^n)._sympy_().simplify()
0

Well, SageMath can get it with canonicalize_radical():

sage: (3^(2*n) - (3^2)^n).canonicalize_radical()
0