MATLAB: How to check if to equations are the same

equationMATLAB and Simulink Student SuitesymbolicSymbolic Math Toolbox

I'm looking for method to check if two symbolic equations are the same. e.g:
syms x1, x2, x3;
a = x1 == x2 + x3;
b = x1 - x2 == x3;
isequal(a, b)
isequal always returns false. Is there a method which can verify that the equations are the same?

Best Answer

Use the Symbolic Math Toolbox isAlways funciton:
syms x1 x2 x3
a = x1 == x2 + x3;
b = x1 - x2 == x3;
Q = isAlways(a == b)
Q =
1
Related Question