필터 지우기
필터 지우기

simplify is not realible

조회 수: 3 (최근 30일)
Michal
Michal 2023년 3월 30일
댓글: Michal 2023년 3월 31일
How to simplify the folowing very simple expression:
syms a b c
e1 = -(b*(b^2 - 4*a*c)^(1/2) - 4*a*c + b^2)/(2*a*(b^2 - 4*a*c)^(1/2))
which is equal to the
e2 = -(b + (b^2 - 4*a*c)^(1/2))/(2*a)
simplify(e1-e2)
ans =
0
>> isAlways(e1 == e2)
ans =
logical
1
but
simplify(e1)
produce only identical expression with "e1", not with "e2" as expected?!
Is there any possibility to use "simplify" command in a different way, to get expected result?
  댓글 수: 7
John D'Errico
John D'Errico 2023년 3월 31일
@Michal - Just because one (or more) tool can find a particular solution that you happen to like does not mean that all tools will do so. They are equivalent.
Michal
Michal 2023년 3월 31일
@John D'Errico Yes, of course! But your claim - "They are equivalent" is very vague or controversial, because then any simplification attempt loses sense.
I hope you understand my point. Anyone wants to see the expression, which is simplest as possible of all (infinitely) others equivalent expressions (typically, from the point of required operations number, for example).
But once again, this case is so trivial that I am just a bit surprised, why all CAS cannot find the same simplest expression.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by