Compare of symbolic expression for trigonometric

2 views (last 30 days)
I am trying to compare symbolic expressions i.e A=2*sin(x)*cos(x),B=simplify(A)=sin(2*x)
isequal(A,B)
but it return false.
Any ways to compare symbolic expression for trigo iden

Accepted Answer

Askic V
Askic V on 20 Feb 2023
Edited: Askic V on 20 Feb 2023
Perhaps, this is the way to go with sym expressions:
isAlways(A == B)
isAlways(cond) checks if the condition cond is valid for all possible values of the symbolic variables in cond. When verifying cond, the isAlways function considers all assumptions on the variables in cond. If the condition holds, isAlways returns logical 1 (true). Otherwise it returns logical 0 (false).

More Answers (0)

Community Treasure Hunt

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

Start Hunting!