(1+x+x2)n=a0+a1x+a2x2....+a2nx2n
Multiplying by x both sides
x(1+x+x2)n=a0x+a1x2+a2x3....+a2nx2n+1 ...(1)
Differentiating both sides w.r.t x we get
1+(1+x+x2)n+nx(1+x+x2)n−1(1+2x)=a0+2a1x+3a2x2....+(2n+1)a2nx2n ...(2)
A) Substituting x=1 in (1) we get
a0+a1+....+a2n=3n
B) Substituting x=−1 in (1) we get
a0−a1+a2−....+a2n=1
C) Substituting x=−1 in (2) , we get
a0−2a1+3a2−....+(2n+1)a2n=n+1
D) Substituting x=1 in (2) , we get
a0+2a1+3a2+....+(2n+1)a2n=(n+1)3n