MathGroup Archive 2006

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

Search the Archive

Re: Sin[30*Degree] vs Sin[29*Degree]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72084] Re: [mg72057] Sin[30*Degree] vs Sin[29*Degree]
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 11 Dec 2006 04:55:09 -0500 (EST)
  • Reply-to: hanlonr at cox.net

---- Steven Shippee <slshippee at comcast.net> wrote: 
> What is happening here:
> 
> Sin[30*Degree]
> Sin[31*Degree]
> Sin[29*Degree]
> which makes it appear that only the first line of input works?

You requested exact results and Mathematica gave you exact results, i.e., the last two are unevaluated until you convert to inexact numbers. For example,

Sin[30*Degree] //N
Sin[31*Degree] //N
Sin[29*Degree]//N

0.5

0.515038

0.48481

> 
> However, if I do something like:
> 
> \!\(Sin[\(29*Pi\)\/180. ]\)

You provided an inexact number (180.) so mathematica returned an inexact (machine precision) answer. 

Sin[29Pi/180] will also return unevaluated (an exact result).

The inexact equivalent for the first case would be

Sin[30.*Degree] 
Sin[31.*Degree] 
Sin[29.*Degree]

0.5

0.515038

0.48481

> 
> I get the expected result ... I'm sure it is me, what am I missing in that I 
> think I am not seeing consistent behavior?
> 

You can force an exact numeric evaluation of the trig function using FunctionExpand. For example

Sin[29 Degree]//FunctionExpand//Simplify

(1/2^(1/3))*((1/32 + I/32)*((-1 - I*Sqrt[3])^(1/3)*(-I + Sqrt[3])*
     (Sqrt[2] + Sqrt[10] - 2*I*Sqrt[5 - Sqrt[5]]) - 
    (-1 + I*Sqrt[3])^(4/3)*(Sqrt[2] + Sqrt[10] + 2*I*Sqrt[5 - Sqrt[5]])))

%//N//Chop

0.48481

However, in most cases this is not particularly useful.

> Thanks in advance,
> 
> Steven Shippee
> 
> slshippee at comcast.net
> 


--

Bob Hanlon
hanlonr at cox.net



  • Prev by Date: Re: FullSimplify and HypergeometricPFQ
  • Next by Date: Re: Re: Finding the periphery of a region
  • Previous by thread: Re: Sin[30*Degree] vs Sin[29*Degree]
  • Next by thread: Re: Sin[30*Degree] vs Sin[29*Degree]