# How to get Coefficient List from an expression with various variables

consider following expression:

t = Subscript[α, 0]/2 + Subscript[α, 1]/2 + 2 Subscript[α, 2] + (9 Subscript[α, 3])/2 +
8 Subscript[α, 4] + (25 Subscript[α, 5])/2 + 18 Subscript[α, 6] + (49 Subscript[α, 7])/2 +
32 Subscript[α, 8] + (81 Subscript[α, 9])/2;


one can access variable list of expression above by using:

Variables[t]


but how can I get the corresponding coefficient list of variables? I've tried:

CoefficientList[t, Variables[t]]


it just doesn't work...

-
Try CoefficientArrays. –  Szabolcs May 27 '14 at 21:14

The problem with:

CoefficientList[t, Variables[t]]


is that it appears to create a matrix with all the cross terms. Since you only want to first order terms, try out:

Coefficient[t, Variables[t], 1]

{1/2, 1/2, 2, 9/2, 8, 25/2, 18, 49/2, 32, 81/2}


1 seems to be redundant. –  Kuba May 27 '14 at 21:19