Verifing symbolic equality in MATLAB

1 次查看(过去 30 天)
Hello everyone. How can I verify a symbolic equality? For example:
(a+b)*(a-b)=a^2-b^2
Thank you for your help.

采纳的回答

Steven Lord
Steven Lord 2017-8-18
>> syms a b
>> X = (a+b)*(a-b);
>> Y = a^2-b^2;
>> isAlways(X == Y)
ans =
logical
1

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by