Step 1. Resolve (1−x)2(1−2x)x=1−xA+(1−x)2B+1−2xC: clearing denominators,
x=A(1−x)(1−2x)+B(1−2x)+C(1−x)2.
Step 2. Substitute x=1: 1=B(1−2)=−B ⇒ B=−1.
Step 3. Substitute x=21: 21=C(1−21)2=4C ⇒ C=2.
Step 4. Compare the coefficient of x2. LHS: 0. RHS: A(1−x)(1−2x)=A(1−3x+2x2) contributes 2A; C(1−x)2=C(1−2x+x2) contributes C; the B term contributes none. So 0=2A+C=2A+2 ⇒ A=−1.
Step 5 (check, constant term). LHS: 0. RHS: A+B+C=−1−1+2=0. Matches.
Step 6. So (1−x)2(1−2x)x=1−x−1+(1−x)2−1+1−2x2.
Step 7. Expand each term: 1−x1=∑xn; (1−x)21=∑(n+1)xn (the derivative form of the geometric series); 1−2x1=∑2nxn.
Step 8. Coefficient of xn is −1−(n+1)+2⋅2n=2n+1−n−2.
Step 9 (validity). The three series require ∣x∣<1, ∣x∣<1, ∣x∣<21 respectively; the tightest is ∣x∣<21.
Step 10 (check, n=0,1). n=0: 21−0−2=0 (correct, since f(x)=x⋅(⋯) starts at x1). n=1: 22−1−2=1, matching f(x)≈x for small x (since the bracketed factor →1 as x→0).
✓Final answer
Coefficient of xn in (1−x)2(1−2x)x is 2n+1−n−2, valid for ∣x∣<21.