Re: [R] coefficient of polynomial expansion

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 08 Aug 2005 - 23:51:45 EST

On 8/8/05, Peter Yang <peterwyang@gmail.com> wrote:
> Hi,
>
> I would like to get the coefficient of polynomial expansion. For example,
>
> (1+ x)^2 = 1 + 2x + x^2, and the coefficients are 1, 2 and 1.
> (1 + x + x^2)^3 = 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6, and
> the coefficients are 1, 3, 6, 7, 6, 3, and 1.
>

Use symbolic differentiation as in:

https://stat.ethz.ch/pipermail/r-help/2004-December/060797.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Aug 09 00:03:10 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:09:39 EST