MATLAB: MuPad reduce roots

mupad

I find MuPad does not reduce roots for example
simplify( (z^3)^(1/3) )
to simply z as expected, instead leaving it as (z^3)^(1/3).
Is there a way to get MuPad to reduce roots like the above example?

Best Answer

MuPad and Maple don't simplify it like you expect unless you do this:
%matlab syntax
z=sym('z','positive')
simplify((z^3)^(1/3))
ans=
z
In MuPad use this syntax
assume(z, Type::Positive)
simplify((z^3)^(1/3))
In Maple use this syntax
assume(0 < z)
simplify((z^3)^(1/3))
The reason can be found by testing:
z=-1
(-1^3)^(1/3)
ans =
0.500000000000000 + 0.866025403784439i
z=1
(1^3)^(1/3)
ans =
1
Roots of negative values give results with imaginary parts while roots of positive values always return real numbers, in the case provided for all z>0 (and z=0) the simplified expression is z and for all z<0 the simplified expression remains (z^3)^(1/3)
The symbolic engine by default doesn't limit the symbolic variables (type, range of values, etc) so if it simplified the expression to just z that would be incorrect!