Subject: Re : how to handle roots of unity symbolically ?
From: Stavros Macrakis
Date: Fri, 23 Nov 2012 14:42:58 -0500
(%i2) p: x^12-1$
(%i3) factor(p);
(%o3) (x-1)*(x+1)*(x^2+1)*(x^2-x+1)*(x^2+x+1)*(x^4-x^2+1)
(%i4) tellrat(last(%));
(%o4) [x^4-x^2+1]
(%i5) rat(x^17),algebraic;
(%o5) x^3-x
(%i6) rat(x^24-1),algebraic;
(%o6) 0
(%i7) rat(x^6-1),algebraic;
(%o7) -2
(%i8) rat(x^12-1),algebraic;
(%o8) 0
On Fri, Nov 23, 2012 at 12:23 PM, Roberto Fernandez <rfz at free.fr> wrote:
> On 2012-11-23, Robert Dodier <robert.dodier <at> gmail.com> wrote:
> >On 2012-11-22, Roberto Fernandez <rfz <at> free.fr> wrote:
> >> I'm trying to simplify expressions with W being a root of unity.
> >> so that : W^n = 1
> >
> >Maybe tellrat is the function you want. I don't know much about it.
>
> thanks for your answer,
> but I've not had luck with it :(
>
> if I give it several polynomial of the save variable as input, it takes
> only the last one.
>
> (%i1) tellrat(w^6-1,w^4+w^2+1,w^3+1);
> (%o1) [w^3+1]
>
> and giving it w^n-1 as argument doesn't solve my problem
>
> (%i1) tellrat(w^6-1);
> (%o1) [w^6-1]
> (%i2) ev(ratsimp(w^6-1), algebraic);
> (%o2) 0
> (%i3) ev(ratsimp(w^5+w^4+w^3+w^2+w+1), algebraic);
> (%o3) w^5+w^4+w^3+w^2+w+1
>
> when I expected 0 for (%o3)
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>