Maybe to be more precise, you could compute the terms of degree less than or
equal to k, and subtract those terms of degree less than or equal to k-1,
giving terms of degree exactly k.
Something like this..
ratweight(x[1],1)$ ratweight(x[2],1)$ etc. do in a loop.
ratwtlvl:k$
terms_k: rat( expression)$
ratwtlvl:k-1$
terms_km1: rat(expression)$
ratwtlvl:k$
ratexpand (terms - terms_km1);
RJF