Re: TrigExpand - Odd behavior
- To: mathgroup at smc.vnet.net
- Subject: [mg55441] Re: TrigExpand - Odd behavior
- From: stagat at linkline.com
- Date: Wed, 23 Mar 2005 05:34:52 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Thanks for all your comments.
Yes, I realize that the lengthy expression provided by Mathematica is correct.
Perhaps a better example of the result I'd hoped to see is given by the
following comparison...
Cos[45 Degree]
Sin[45 Degree]
Cos[x+y]//TrigExpand
%/.y->45 Degree
Cos[x+y]/.y->45 Degree
%//TrigExpand
In the first three examples, Mathematica recognizes that Cos[45 Degree] and Sin[45
Degree] both have the exact value 1/Sqrt[2].
In the fourth example it appears that Mathematica recognizes that (45 Degree) is
('an integer' Times 'something') and then tries to be (too) clever about
expanding that before replacing the 'something' with Degree. This is further
illustrated in the following example...
Cos[x+45 z]
%//TrigExpand
So it's not that I thought the result was incorrect, I just thought that it
is frustratingly complex for something that can be written so simply and
which Mathematica will, in fact, obtain if you tickle it in just the right way.
~ BS ~
- Follow-Ups:
- Re: Re: TrigExpand - Odd behavior
- From: DrBob <drbob@bigfoot.com>
- Re: Re: TrigExpand - Odd behavior