Subject: how to handle roots of unity symbolically ?
From: Stavros Macrakis
Date: Fri, 23 Nov 2012 13:29:36 -0500
I think you mean that W is a *primitive* root of unity?
On Thu, Nov 22, 2012 at 12:40 PM, Roberto Fernandez <rfz at free.fr> wrote:
> hello all,
>
> I'm trying to simplify expressions with W being a root of unity.
> so that : W^n = 1
>
> I wrote a function, but I'm not happy with it
>
> 8<---------------------------------------------
> simplifie(a,n) := block(
> local(b, decomposition, taille, premier, expression),
> b:ratsubst(1, w^n, b),
> decomposition:ifactors(n),
> taille:length(decomposition),
> for indice:1 thru taille do (
> premier:decomposition[indice][1],
> division:n/premier,
> expression : sum(w^(i*division),i,0,premier-1),
> b:ratsubst(0, expression, b)
> ), b
> );
> --------------------------------------------->8
>
> this simplifies some expressions, but fails with others, for example:
> when w^6=1 , w^2-w+1 is not simplified, when 0 was expected...
>
> does someone knows the right way to do this ?
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>