Simplify x^p^(1/p) to r?



Raymond Toy <raymond.toy <at> ericsson.com> writes:

> 
> Gary O wrote:
> > Q: why doesn't this return x?
> >    ratsimp(x^p^(1/p))
> > 
> > If maxima doesn't know that x^y^z => x^(y*z), can I teach it somehow?
> 
> But what is 2^3^4?  I think ^ is right associative, so 2^3^4 is not 
> 2^12, but 2^81.

Good idea, but even if I use parens it doesn't get it:
 ratsimp((x^p)^(1/p));
returns (x^p)^(1/p), not just x.

But -- oh ho, adding assumptions makes it work!
 assume(x>=0);
 ratsimp((x^p)^(1/p));
 => x

Cool.  Not sure why it thinks this identity only holds for nonnegative x (i.e
real result), but anyway I know what to do to help it get it right now.

Thanks;

-- Gary