MATLAB Answers

How to use isAlways to compare two symbolic equations ?

8 views (last 30 days)
Andrew
Andrew on 31 May 2021
Commented: Torsten on 31 May 2021
Dear forum members,
I would like to check wether or not two symbolic equations are the same, but I am not able to do this using isAlways function.
syms a b
f1 = y == abs(x);
f2 = y == sqrt(x^2);
isAlways(f1 == f2)
Warning: Unable to prove '(y == abs(x)) == (y == (x^2)^(1/2))'.
> In symengine
In sym/isAlways (line 42)
ans =
logical
0
Why do I get these warnings and this (false) answer "logical 0" ? What am I doing wrong ?
Thank you for your help.

Answers (1)

Torsten
Torsten on 31 May 2021
syms x
isAlways(sqrt(x^2)==abs(x))
  2 Comments
Torsten
Torsten on 31 May 2021
Ok. Then the symbolic toolbox is not able to proove the identity.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!