kill(all)$
load(functs)$

To find coef. from a polynomial(examples),peter.vlasschaert@gmail.com,16/07/2016

y:a*x^3+b*x-6;
a1:coeff(y,x);

g:(x+y)^3-3*y+2*x+9;

ratsimp((a*x^3+b*x+x-6)^3-3*(a*x^3+b*x-6)+2*x+9);

coeff(%,x^3);

gg:(x+z)^5+(x-2*z)^2+x-5*z+6;

ratsimp((z+x)^5-5*z+(x-2*z)^2+x+6);

coeff(%,z^3);

ratsimp((z+x)^5-5*z+(x-2*z)^2+x+6,x);

coeff(%,x^3);

Find : coef who is constant,q0

ggg:ratsimp((z+x)^5-5*z+(x-2*z)^2+x+6,x);

q1:coeff(ggg,x);
q2:coeff(ggg,x^2);
q3:coeff(ggg,x^3);
q4:coeff(ggg,x^4);
q3:coeff(ggg,x^5);

q0:ev(ggg,x=0);