Your simplification of (x^n)^(1/n)
to x
is correct for x>0
, but it is wrong or problematic for x<0
, or for complex x
. See what happens for x=-2
, n=2
:
With[{x=-2, n=2}, {(x^n)^(1/n), x}]
Mathematica refuses to make the simplification unless the user explicitly assumes that x
is positive. PowerExpand
instructs to ignore all those scruples.