Is there a way to check if two expressions are mathematically equal? I expected
tg(x)cos(x) == sin(x)
to output True
, but it outputs False
. Is there a way to make such comparisons with sympy? Another example is
(a+b)**2 == a**2 + 2*a*b + b**2
which surprisingly also outputs False
.
I found some similar questions, but none covered this exact problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…