Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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$?

share|improve this question
4  
Hint: It is valid only under certain assumptions for $x,y$ and $r$. Try providing that to FullSimplify or Simplify –  rm -rf Oct 29 '13 at 16:17
add comment

2 Answers 2

up vote 12 down vote accepted

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.

share|improve this answer
    
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. –  rm -rf 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). –  rm -rf Oct 29 '13 at 18:25
add comment

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)]
share|improve this answer
8  
It should be noted that PowerExpand makes the assumptions about the reality and positivity of the variables. –  rcollyer Oct 29 '13 at 17:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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