Using a TI-Nspire CAS, there's also a simple funtion that you can use.
polyCoeffs(Poly,[Variable]) generates a list with the coefficients.
Use the list to matrix function and you have what you're looking for.
On a non-CAS, it would be far from simple. Nelson's method would work
using nDeriv, though it would be much more cumbersome.
Another cumbersome possibility would be to generate (n+1) points of
the polynomial of degree n, then do a regression. The stat variables
would then give you the coefficients, which could be stored into a
matrix. So, I guess the simplest way would just be to generate the
matrix manually.
Marc Garneau
On Jan 16, 10:35 am, Nelson Sousa <
nso...@gmail.com> wrote:
> Take the k-th derivative when x=0. The only term that survives is x^k and
> you'll have
>
> d^n / dx^n (a_n*x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0) | x=0 = a_k k!.
>
> (Exercise: Prove this statement!)
>
> So, divide it by k! and there you have it, a nice way to extract a given
> coefficient from a polinomial.
>
> To get all of them, take the function
> seq(((1)/(k!))*D(poly,var,k)|var=0,k,n,0,-1),
>
> where:
> D means derivative, and D(poly, var, k) means the k-th derivative of poly
> with respect to var;
> poly is your polinomial;
> var is the variable;
> n is the order of the polinomial.
>
> This will return a list, where the first element is the coefficient of
> higher degree and the last one is the 0th order term.
>
> Nelson
>