Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The legitimity of the simplifications of poers depend on the values of the argiments and of the exponents.

This well explained in the subparagraph Powers of the sympy's simplify documentation.

As pointed out by @tolga, the canonicalize_radical method of symbolic expressions does some simplifications that full_simplify doesn't. I am not sure that they are always legitimate.

BTW, from x.canonicalize_radical :

Warning:

 As shown in the examples below, a canonical form is not always
 returned, i.e., two mathematically identical expressions might be
 converted to different expressions.Assumptions are not taken into
 account during the transformation. This may result in a branch
 choice inconsistent with your assumptions.

Being a wrapper for Maxima's radcan, canonicalize_radical may use Sage's assumptions. However, in your case, it proceeds to simplifications without assumptions :

sage: ( (exp(p*x - q*x)/q)^(1/(p-q)) ).canonicalize_radical()
e^x/q^(1/(p - q))

HTH,

The legitimity of the simplifications of poers depend on the values of the argiments and of the exponents.

This well explained in the subparagraph Powers of the sympy's simplify documentation.

As pointed out by @tolga, the canonicalize_radical method of symbolic expressions does some simplifications that full_simplify doesn't. I am not sure that they are always legitimate.

BTW, from x.canonicalize_radical :

Warning:

 As shown in the examples below, a canonical form is not always
 returned, i.e., two mathematically identical expressions might be
 converted to different expressions.Assumptions are not taken into
 account during the transformation. This may result in a branch
 choice inconsistent with your assumptions.

Being a wrapper for Maxima's radcan, canonicalize_radical may use Sage's assumptions. However, in your case, it proceeds to simplifications without assumptions :

sage: ( (exp(p*x - q*x)/q)^(1/(p-q)) ).canonicalize_radical()
e^x/q^(1/(p - q))

EDIT : Sympy is more cautious :

sage: ( (exp(p*x - q*x)/q)^(1/(p-q)) )._sympy_().simplify()._sage_()
(e^((p - q)*x)/q)^(1/(p - q))

HTH,

The legitimity of the simplifications of poers depend on the values of the argiments and of the exponents.

This well explained in the subparagraph Powers of the sympy's simplify documentation.

As pointed out by @tolga, the canonicalize_radical method of symbolic expressions does some simplifications that full_simplify doesn't. I am not sure that they are always legitimate.

BTW, from x.canonicalize_radical :

Warning:

 As shown in the examples below, a canonical form is not always
 returned, i.e., two mathematically identical expressions might be
 converted to different expressions.Assumptions are not taken into
 account during the transformation. This may result in a branch
 choice inconsistent with your assumptions.

Being a wrapper for Maxima's radcan, canonicalize_radical may use Sage's assumptions. However, in your case, it proceeds to simplifications without assumptions :

sage: ( (exp(p*x - q*x)/q)^(1/(p-q)) ).canonicalize_radical()
e^x/q^(1/(p - q))

EDIT : Sympy is more cautious :

sage: ( (exp(p*x - q*x)/q)^(1/(p-q)) )._sympy_().simplify()._sage_()
(e^((p - q)*x)/q)^(1/(p - q))

but does not (currently) uses Sage's assumptions :

sage: with assuming (p, q, "integer", p>q, q>0): ( (exp(p*x - q*x)/q)^(1/(p-q))
....: )._sympy_().simplify()._sage_()
(e^((p - q)*x)/q)^(1/(p - q))

HTH,