       Re: accumulate coefficients of a polynomial

• To: mathgroup at smc.vnet.net
• Subject: [mg102832] Re: [mg102813] accumulate coefficients of a polynomial
• From: Adriano Pascoletti <adriano.pascoletti at dimi.uniud.it>
• Date: Fri, 28 Aug 2009 05:43:15 -0400 (EDT)
• References: <200908280444.AAA28832@smc.vnet.net>

```Create a list of replacement rules: Table[{Rule[z, Exp[I Pi/k]]}, {k, 1,
20}]
perform the replacements: Sum[a[k]*z^(10 - k), {k, 0, 10}] /. Table[{Rule[z,
Exp[I Pi/k]]}, {k, 1, 20}]

and take the real parts:

ComplexExpand[
Re[Sum[a[k]*z^(10 - k), {k, 0, 10}] /.
Table[{Rule[z, Exp[I Pi/k]]}, {k, 1, 20}]]]

2009/8/28 BHUPALA <bhupala at gmail.com>

> I have generated a polynomial as
>
> p[z_] = Sum[a[k]*z^(10 - k), {k, 0, 10}]
>
> to give
>
> z^10 a + z^9 a + z^8 a + z^7 a + z^6 a + z^5 a +
>  z^4 a + z^3 a + z^2 a + z a + a
>
> I want to substitute z = Exp[I Pi/k] where k varies from 1 to 20 and
> for each k retain the coefficients of the real part as a vector.
>
> I used the following command for a single iteration (e.g k=6)
>
> ComplexExpand[Re[p[Exp[I Pi/6]]]]]
>
> But how to do it in a loop?
>
> Thanks for any help.
>
> Bhupala
>
>

```

• Prev by Date: simplex representation
• Next by Date: Re: ClearAll ?? or what
• Previous by thread: accumulate coefficients of a polynomial
• Next by thread: Re: accumulate coefficients of a polynomial