Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: TrigExpand - Odd behavior

  • To: mathgroup at
  • Subject: [mg55434] Re: TrigExpand - Odd behavior
  • From: <wwolfe18 at>
  • Date: Wed, 23 Mar 2005 05:34:44 -0500 (EST)
  • References: <d1on7b$nda$>
  • Sender: owner-wri-mathgroup at

"Bob Stagat" <stagat at> wrote in message 
news:d1on7b$nda$1 at
> Try executing the following three lines and explain the last result...
> Cos[45 Degree]
> Cos[x+45 Degree]
> Cos[x+45 Degree]//TrigExpand
> Thanks...
> ~ BS ~

This is just Mathematica insisting on giving exact answers. Put a decimal in 

Cos[x+45. Degree]//TrigExpand gives
0.707107 Cos[x]+I (0. Cos[x]+0. Sin[x])-0.707107 Sin[x]

Note the zero imaginary part. Get rid of it with Chop:

Cos[x+45. Degree]//TrigExpand//Chop  gives
0.707107 Cos[x] - 0.707107 Sin[x]

Warren Wolfe
Evanston, Il

  • Prev by Date: Re: Complex Variables
  • Next by Date: Re: Lines in Mathematica Graphics
  • Previous by thread: Re: TrigExpand - Odd behavior
  • Next by thread: Re: TrigExpand - Odd behavior