Can I check if factored and expanded polynomial forms are equal?
Show older comments
>> syms w k
>> isequal((w^2-k^2),(w+k)*(w-k))
ans =
logical
0
Is there a way to tell that w^2-k^2 and (w+k)*(w-k) are equal?
Also tried isequal(expand(),expand()) method but expand() may order two polynomials that are the same differently and in these instances isequal() returns logical = 0.
Accepted Answer
More Answers (1)
Steven Lord
on 1 Feb 2020
>> syms w k
>> x1 = (w^2-k^2);
>> x2 = (w+k)*(w-k);
>> isAlways(x1 == x2)
ans =
logical
1
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!