필터 지우기
필터 지우기

MuPad reduce roots

조회 수: 3 (최근 30일)
Billy
Billy 2011년 4월 25일
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?

채택된 답변

Paulo Silva
Paulo Silva 2011년 4월 25일
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
Billy
Billy 2011년 4월 25일
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 2011년 4월 25일
assume(z, Type::Positive)
simplify((z^3)^(1/3))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by