# How can I get $(r^{1/x})^x$ to simplify to $r$?

Simplify and FullSimplify do not simplify this kind of expression: $(r^\frac{1}{x})^x$. Consider

FullSimplify[r^2+(r^(2/x))^x+(r^(2/(x+y)))^(x+y)]


Mathematica's output is the same as my input, instead of 3 r^2. Is there a way to simplify $(r^\frac{1}{x})^x$ to $r$?

-
Hint: It is valid only under certain assumptions for $x,y$ and $r$. Try providing that to FullSimplify or Simplify –  The Toad Oct 29 '13 at 16:17

To expand on rm -rf's hint, the variables need to be positive and real in order for the result you wish to see to hold. You can tell Mathematica to do this using the Assumptions option:

FullSimplify[r^2 + (r^(2/x))^x + (r^(2/(x + y)))^(x + y),
Assumptions -> {x > 0, y > 0, r > 0}]
3 r^2


To see that this is really needed, consider an example where it is violated:

r^2 + (r^(2/x))^x + (r^(2/(x + y)))^(x + y) /. {r -> -1, x -> -1/3, y -> -1}
2 - (-1)^(1/3)


which is not equal to 3 r^2. (Thanks to rm -rf for the improved example).

PowerExpand automatically assumes that the variables are real and positive, so you do not need to state it explicitly.

-
The example isn't illustrative though... the imaginary term is just due to FP math. Exact quantities will give you $3/100$, which is in fact $3r^2$. Perhaps {r -> -1, x -> -1/3, y -> -1} would be better... it gives you $2 - (-1)^{1/3}$, whose value depends on the branch of the cube root. –  The Toad Oct 29 '13 at 17:37
@rm -rf Thanks for the improved example. BTW -- I didn't mean to steal your answer -- I was assuming that you didn't want to write it up. If I'm mistaken, please let me know. –  bill s Oct 29 '13 at 17:58
Oh, there is absolutely no problem! Feel free to take such comments and convert it to an answer :) I didn't post it as an answer because I'm quite certain that this is a duplicate (perhaps of several!), but I didn't have the time to search for it. So I just provided a hint to help the OP move forward with their problem for the time being (but it looks like they are AFK). –  The Toad Oct 29 '13 at 18:25

When I want an expression like this to simplify, I'll use PowerExpand after FullSimplify

Try this:

PowerExpand[r^2+(r^(2/x))^x+(r^(2/(x+y)))^(x+y)]

-
It should be noted that PowerExpand makes the assumptions about the reality and positivity of the variables. –  rcollyer Oct 29 '13 at 17:33