MathGroup Archive 2007

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

Search the Archive

Re: question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77843] Re: [mg77827] question
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Mon, 18 Jun 2007 06:56:20 -0400 (EDT)
  • References: <200706171021.GAA02852@smc.vnet.net>

On 17 Jun 2007, at 19:21, dimitris wrote:

> Two eforts in Mathematica 5.2 in order
> to simplify o below
>
> o = 2*Cos[Pi/48]*(1 - Cos[Pi/48]^2)^(1/2) + 2*Cos[Pi/48]^2 - 1;
>
> First leaving Mathematica do the job.
>
> Timing[ToRadicals[RootReduce[(FullSimplify[#1, ComplexityFunction ->
> (Count[{#1}, _Cos, Infinity] & )] & )[o]]]]
> {43.031*Second, Sqrt[(1/2)*(2 + Sqrt[2 - Sqrt[3]])]}
>
> Then help a bit Mathematica.
> I couldn't find a built in command to simplify 1 - Cos[Pi/48]^2 to
> Sin[Pi/48]^2. That's why the adding of a rule.
>
> Timing[ToRadicals[RootReduce[Simplify[o /. 1 - Cos[Pi/48]^2 ->
> Sin[Pi/
> 48]^2]]]]
> {0.25*Second, Sqrt[(1/2)*(2 + Sqrt[2 - Sqrt[3]])]}
>
> Any other suggestions will be highly appreciated.
>
> Dimitris
>
>

In Mathematica 6:

FullSimplify[FunctionExpand[2*Cos[Pi/48]*(1 - Cos[Pi/48]^2)^(1/2) +
     2*Cos[Pi/48]^2 - 1]]

(1/2)*Sqrt[4 - Sqrt[2] + Sqrt[6]]

I have not tried testing this in 5.2

Andrzej Kozlowski

P.S. Note that although FullSimplify uses FunctionExpand as one of  
the transformation fucntions, you will not get this answer without  
explicitly applying FunctionExpand. As with other situations of this  
kind, the problem reason to be that FunctionExpand greatly increases  
the (default) complexity of the original expression.

Andrzej Kozlowski




  • References:
    • question
      • From: dimitris <dimmechan@yahoo.com>
  • Prev by Date: Re: Crinkled Hyperbola (ContourPlot in Manipulate)
  • Next by Date: Re: more gripe about the new documentation center (DC) in Mathematica
  • Previous by thread: Re: question
  • Next by thread: Re: question