Why does the following equation:
E^(I*theta) === Cos[theta] + I*Sin[theta]
yield false, in terms of Euler's Identity?
Why does the following equation:
E^(I*theta) === Cos[theta] + I*Sin[theta]
yield false, in terms of Euler's Identity?
Simplify[E^(I*theta) == Cos[theta] + I*Sin[theta]]
(* True *)
=== is structural identity, not mathematical. == is mathematical equality. Mathematica only does simple reductions automatically: this is a case where you need to ask it to try a little harder than usual.
Simplify[E^(I*theta) == Cos[theta] + I*Sin[theta]]. NoteSameQ(===) means identical expressions (as in, identical code). It does not test mathematical equivalence.Equal(==) can do that, but it is reluctant to try all but the simplest transformation. Hence, you often have to useSimplifyto test mathematical equality. – Michael E2 Feb 08 '20 at 18:40