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}]]]
Adriano Pascoletti
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[0] + z^9 a[1] + z^8 a[2] + z^7 a[3] + z^6 a[4] + z^5 a[5] +
> z^4 a[6] + z^3 a[7] + z^2 a[8] + z a[9] + a[10]
>
> 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
>
>
- References:
- accumulate coefficients of a polynomial
- From: BHUPALA <bhupala@gmail.com>
- accumulate coefficients of a polynomial