MathGroup Archive 2007

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

Search the Archive

Re: Simplification

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75470] Re: Simplification
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Wed, 2 May 2007 03:49:38 -0400 (EDT)
  • References: <200704300740.DAA22559@smc.vnet.net><f16pnf$72b$1@smc.vnet.net>

I must admit I don't use the other CAS so often; so I lack any serious
knowledge.

But...since you ask

for f[10] we get

Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025),
j=0..10):
 p:=value(%);
 convert(p, sin);
 simplify(%);

            Pi       2 Pi      4 Pi      8 Pi      16 Pi      32 Pi
  p := cos(----) cos(----) cos(----) cos(----) cos(-----) cos(-----)
           1023      1023      1023      1023      1023       1023

            64 Pi      128 Pi      256 Pi      511 Pi    / /
        cos(-----) cos(------) cos(------) cos(------)  /  |
            1023        1023        1023        1023   /   \

             Pi  2     2 Pi      4 Pi      8 Pi      16 Pi
        cos(----)  cos(----) cos(----) cos(----) cos(-----)
            1025       1025      1025      1025      1025

            32 Pi      64 Pi      128 Pi      256 Pi      512 Pi \
        cos(-----) cos(-----) cos(------) cos(------) cos(------)|
            1025       1025        1025        1025        1025  /


                      512 Pi      1022 Pi       Pi  2
                2 sin(------) sin(-------) sin(----)
                       1023        1023        1025
             --------------------------------------------
                  Pi       511 Pi      2 Pi      1024 Pi
             sin(----) sin(------) sin(----) sin(-------)
                 1023       1023       1025       1025


                                    Pi
                             2 sin(----)
                                   1025
                             -----------
                                  2 Pi
                              sin(----)
                                  1025

which is correct

evalf(%);
                            1.000004697

for f[17] we get

Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025),
j=0..17):
>  p:=value(%);
>  convert(p, sin);
>  simplify(%);

            Pi       2 Pi      4 Pi      8 Pi      16 Pi      32 Pi
  p := cos(----) cos(----) cos(----) cos(----) cos(-----) cos(-----)
           1023      1023      1023      1023      1023       1023

            64 Pi      128 Pi      256 Pi      511 Pi    / /
        cos(-----) cos(------) cos(------) cos(------)  /  |
            1023        1023        1023        1023   /   \

             Pi  2     2 Pi 2     4 Pi 2     8 Pi 2     16 Pi 2
        cos(----)  cos(----)  cos(----)  cos(----)  cos(-----)
            1025       1025       1025       1025       1025

            32 Pi 2     64 Pi 2     128 Pi 2     256 Pi      512 Pi \
        cos(-----)  cos(-----)  cos(------)  cos(------) cos(------)|
            1025        1025         1025         1025        1025  /


                       512 Pi      1022 Pi       Pi  2
               256 sin(------) sin(-------) sin(----)
                        1023        1023        1025
            ----------------------------------------------
                 Pi       511 Pi      256 Pi      1024 Pi
            sin(----) sin(------) sin(------) sin(-------)
                1023       1023        1025        1025


                                     Pi
                            256 sin(----)
                                    1025
                            -------------
                                 256 Pi
                             sin(------)
                                  1025

which is incorrect

> evalf(%);
                             1.110486595

So the performance is not so good as initially I thought!

Dimitris




=CF/=C7 Andrzej Kozlowski =DD=E3=F1=E1=F8=E5:
> Actually, this is a special case of a general fact:
>
> Let
>
> f[k_] := Product[Cos[(2^j*Pi)/(2^(k + 1) - 1)], {j, 0, k}]/Product[Cos
> [(2^j*Pi)/(2^(k + 1) + 1)], {j, 0, k}]
>
> then for every integer k>0, f[k]= -1. The problem that you have
> stated is showing that f[9]= -1. Mathematica can only do the simplest
> case:
>
> FullSimplify[f[1]]
> -1
>
> but fails on the next one:
>
>
> FullSimplify[f[2]]
>
> Cos[Pi/7]*Cos[(2*Pi)/7]*Cos[(4*Pi)/7]*Sec[Pi/9]*Sec[(2*Pi)/9]*Sec
> [(4*Pi)/9]
>
>
> However, one can prove a more exact theorem:
>
> Product[Cos[(2^j*Pi)/(2^(k + 1) - 1)], {j, 0, k}] == -2^(k+1) and
> Product[Cos[(2^j*Pi)/(2^(k + 1) + 1)], {j, 0, k}]  ==   2^(k+1)
>
> defining
>
> g[k_] := Product[Cos[(2^j*Pi)/(2^(k + 1) + 1)], {j, 0, k}]
>
> and
>
> h[k_] := Product[Cos[(2^j*Pi)/(2^(k + 1) - 1)], {j, 0, k}]
>
> we see that Mathematica actually performs a little better when
> dealing with g and h:
>
>
> Table[FullSimplify[g[k]], {k, 1, 3}]
>
> {1/4, 1/8, 1/16}
>
> with h, however, this happens:
>
>
> Table[FullSimplify[h[k]], {k, 1, 3}]
>
>
> {-(1/4), Cos[Pi/7]*Cos[(2*Pi)/7]*Cos[(4*Pi)/7], -(1/16)}
>
> That's as much as Mathematica seems to be able to do. It would be
> interesting to know if the other CAS can go beyond f[9], and if it
> can, whether it takes it longer to do so.
>
>
> Andrzej Kozlowski
>
>
>
>
> On 30 Apr 2007, at 16:40, dimitris wrote:
>
> > This appeared in another forum.
> >
> > (Converting to Mathematica InputForm.)
> >
> > In[2]:=
> > oo = Product[Cos[(2^j*Pi)/1023], {j, 0, 9}]/Product[Cos[(2^j*Pi)/
> > 1025], {j, 0, 9}];
> >
> > The expression can be simplified to -1.
> >
> > Indeed, adopted by someone's reply, in another CAS, we simply have
> >
> > Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025), j=
> > 0..9):
> >  p:=value(%):
> >  convert(p, sin):
> >  simplify(%);
> >                                                    -1
> >
> > However, no matter what I tried I was not able to succeed in
> > simplifying above expression
> > to -1 with Mathematica, in reasonable time. Futhermore, even the much
> > more simpler of
> > showing oo==-1 didn't work.
> >
> > So I would really appreciate if someone pointing me out:
> > 1) A way to show (in Mathematica!) that oo is simplified to -1
> > 2) That the equality oo==-1 (or oo-1==0 alternatively) can be
> > simplified
> > to True.
> >
> > Any ideas?
> >
> > BTW, I found the function convert of the other CAS, very useful.
> > Has anyone implementated a similar function in Mathematica?
> > (I ain't aware of a Mathematica built-in function, similar to convert
> > from the other CAS.)
> >
> > Dimitris
> >
> >



  • Prev by Date: Re: maximum entropy method for deconvolution
  • Next by Date: Re: Gauss-Kronrod algorithm
  • Previous by thread: Re: Simplification
  • Next by thread: Re: elimination of a real variable from a complex function