Skip to content
Back to formatted view

Raw Message

Message-ID: <a922041d05080806111ac4e7f7@mail.gmail.com>
Date: 2005-08-08T13:11:47Z
From: Peter Yang
Subject: coefficient of polynomial expansion

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.

I know that we can use polynom library. Is there any other way to do
it without loading a library.

Thanks a lot for your help.


Peter