1
$\begingroup$

I would like Mathematica to be able to simplify the expression $\left(x^{1/y}\right)^y$ to $x$. However, running

Simplify[(x^(1/y))^y]

does not accomplish the desired simplification. I have tried including assumptions that $y$ is both real and non-zero in order to avoid any potential pathological cases, but neither seem to do the trick. Are there additional assumptions required in order to get this to work?

$\endgroup$
1
  • $\begingroup$ PowerExpand[(x^(1/y))^y] does what you want. Assumes everything is real and positive. Assumptions would do the trick too. $\endgroup$
    – Bill Watts
    May 14, 2019 at 23:48

1 Answer 1

8
$\begingroup$

You probably meant:

Simplify[(x^(1/y))^y]

(x^(1/y))^y

which still doesn't simplify without assumptions. You can provide assumptions:

Simplify[(x^(1/y))^y, Assumptions->x>0 && y>0]

x

or you can use PowerExpand:

PowerExpand[(x^(1/y))^y]

x

Alternatively, you can give PowerExpand the option Assumptions->True to find out under what conditions the above expansion is valid:

PowerExpand[(x^(1/y))^y, Assumptions->True]

E^(2 I π y Floor[1/2 - Im[Log[x]/y]/(2 π)]) x

$\endgroup$
3
  • $\begingroup$ Thanks! This works, but I don't understand why $x$ has to be positive. Naively taking the case $x=-1$, $y=2$ doesn't seem to give any problem, and I can't think of any situation with negative $x$ that would give the problem. $\endgroup$ May 15, 2019 at 2:37
  • $\begingroup$ @HenryShackleton Try $x=-1$ and $y=1/2$ Basically, if $y$ is not an integer, than problems arise. $\endgroup$
    – Carl Woll
    May 15, 2019 at 2:42
  • $\begingroup$ I see, thank you for the clarification! Including the assumption that $y$ is an integer is also sufficient for the simplification to go through. $\endgroup$ May 15, 2019 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.