MathGroup Archive 2009

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

Search the Archive

Re: usage of TrigToExp?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95476] Re: [mg95431] usage of TrigToExp?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 19 Jan 2009 03:00:52 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Start from a fresh kernel.

TrigToExp[Cos[2 x]]

1/2/E^(2*I*x) + (1/2)*E^(2*I*x)

% // FullSimplify

Cos[2*x]

%% // ExpToTrig

Cos[2*x]

TrigToExp[Cos[y] Sin[x]]

(1/4)*I*(E^((-I)*x) - E^(I*x))*
   (E^((-I)*y) + E^(I*y))

% // FullSimplify

Sin[x]*Cos[y]

%% // ExpToTrig

Sin[x]*Cos[y]

Perhaps you have something in $Post or have an older version and have executed the package Miscellaneous`RealOnly`


Bob Hanlon

---- zatuch <zatuch at gmail.com> wrote: 

=============
Hello,
Results from function TrigToExp seemed weird to me. Could anyone
please give me a good explanation on its usage. Thanks a lot.

In[41]:= TrigToExp[Cos[2 x]]
During evaluation of In[41]:= Nonreal::warning: Nonreal number
encountered.
Out[41]= Nonreal

In[43]:= TrigToExp[Cos[y] Sin[x]]
Out[43]= 0

Zatuch


--

Bob Hanlon



  • Prev by Date: Re: Parallel computing with Mathematica 7?
  • Next by Date: Mathematica Calls Home
  • Previous by thread: Re: usage of TrigToExp?
  • Next by thread: Mathematica Calls Home