MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Logical evaluation


On 16 Oct 2007, at 16:27, Michael Mandelberg wrote:

> I can't figure out why the following does not evaulate to TRUE:
>
> In[100]:= \[ExponentialE]^(-\[ImaginaryI] x) + \[ExponentialE]^(\
> \[ImaginaryI] x) == 2 TrigToExp[Cos[x]]
>
> Out[100]= \[ExponentialE]^(-\[ImaginaryI] x) + \[ExponentialE]^(\
> \[ImaginaryI] x) ==
>  2 (\[ExponentialE]^(-\[ImaginaryI] x)/
>     2 + \[ExponentialE]^(\[ImaginaryI] x)/2)
>
> Any ideas?
>
> Michael Mandelberg
>
>


Because Mathematica (rather naturally) does not automatically apply  
the distributive law for multiplication:

E^((-I)*x) + E^(I*x) == 2*TrigToExp[Cos[x]]
E^((-I)*x) + E^(I*x) == 2*(1/(E^(I*x)*2) + E^(I*x)/2)
Distribute /@ %
True

(You can also use ExpandAll or in Mathematica 6 just Expand)

Andrzej Kozlowski


  • Prev by Date: Palette for Units Conversion
  • Next by Date: Re: Logical evaluation
  • Previous by thread: Logical evaluation
  • Next by thread: Re: Logical evaluation