Clear Filters
Clear Filters

MuPad reduce roots

3 views (last 30 days)
Billy
Billy on 25 Apr 2011
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?

Accepted Answer

Paulo Silva
Paulo Silva on 25 Apr 2011
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!
  2 Comments
Billy
Billy on 25 Apr 2011
Yeah, I figured it was trying to keep the answer strictly correct without making bad assumptions.
The syntax you used doesn't work in MuPad - what is the MuPad syntax?
Paulo Silva
Paulo Silva on 25 Apr 2011
assume(z, Type::Positive)
simplify((z^3)^(1/3))

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!