Login

Concepts

Read through concept notes with worked explanations and diagrams, chapter by chapter.

Concept 07 / 07Binomial Theorem

Multinomial Expansion and Coefficients in Trinomials

The multinomial theorem and its coefficients n!/(p! q! r!), the number of terms in (x1 + ... + xk)^n, finding a coefficient in (a + bx + cx^2)^n by solving for exponents, and the sum of all coefficients.

The binomial theorem generalises to any number of terms by the same counting argument. In the product of nn brackets (x1+x2+⋯+xk)(x_{1} + x_{2} + \cdots + x_{k}), a term x1p1x2p2⋯xkpkx_{1}^{p_{1}}x_{2}^{p_{2}}\cdots x_{k}^{p_{k}} (with p1+⋯+pk=np_{1} + \cdots + p_{k} = n) arises by choosing x1x_{1} from p1p_{1} of the brackets, x2x_{2} from p2p_{2} of them, and so on. The number of ways is the number of arrangements of nn objects with p1,p2,…p_{1}, p_{2}, \ldots alike: (x1+⋯+xk)n=∑p1+⋯+pk=nn!p1! p2!⋯pk!x1p1⋯xkpk(x_{1} + \cdots + x_{k})^{n} = \sum_{p_{1} + \cdots + p_{k} = n}\frac{n!}{p_{1}!\,p_{2}!\cdots p_{k}!}x_{1}^{p_{1}}\cdots x_{k}^{p_{k}}. For k=2k = 2 this is the binomial theorem, since n!r!(n−r)!=(nr)\frac{n!}{r!(n - r)!} = \binom{n}{r}. Number of terms. The distinct terms correspond to non-negative solutions of p1+⋯+pk=np_{1} + \cdots + p_{k} = n, so there are (n+k−1k−1)\binom{n + k - 1}{k - 1} terms, provided the xix_{i} are independent variables. For (a+b+c)n(a + b + c)^{n} that is (n+22)\binom{n + 2}{2}. When the terms are powers of a single variable, many exponent combinations produce the same power, and the count collapses: (1+x+x2)n(1 + x + x^{2})^{n} has only 2n+12n + 1 terms, from x0x^{0} to x2nx^{2n}. Sum of coefficients. Set every variable equal to 11. For (2x−3y+z)5(2x - 3y + z)^{5}, the sum of all coefficients is (2−3+1)5=0(2 - 3 + 1)^{5} = 0. For a polynomial P(x)=∑akxkP(x) = \sum a_{k}x^{k}, the sum of coefficients is P(1)P(1), the alternating sum is P(−1)P(-1), the sum of even-index coefficients is P(1)+P(−1)2\frac{P(1) + P(-1)}{2}, and of odd-index coefficients P(1)−P(−1)2\frac{P(1) - P(-1)}{2}. Coefficient of xmx^{m} in (a+bx+cx2)n(a + bx + cx^{2})^{n}. A general term is n!p! q! r!ap(bx)q(cx2)r\frac{n!}{p!\,q!\,r!}a^{p}(bx)^{q}(cx^{2})^{r} with p+q+r=np + q + r = n. The power of xx is q+2rq + 2r. So solve p+q+r=np + q + r = n and q+2r=mq + 2r = m in non-negative integers, and add the contributions of all solutions. List solutions by the value of rr: for each rr from 00 to ⌊m/2⌋\lfloor m/2 \rfloor, q=m−2rq = m - 2r and p=n−q−rp = n - q - r, and discard any with p<0p < 0 or q<0q < 0. Alternatives. Sometimes factoring the trinomial is faster: 1+2x+x2=(1+x)21 + 2x + x^{2} = (1 + x)^{2}, so (1+2x+x2)n=(1+x)2n(1 + 2x + x^{2})^{n} = (1 + x)^{2n}. Or 1+x+x2=1−x31−x1 + x + x^{2} = \frac{1 - x^{3}}{1 - x}, so (1+x+x2)n=(1−x3)n(1−x)−n(1 + x + x^{2})^{n} = (1 - x^{3})^{n}(1 - x)^{-n}, which turns the coefficient into a single sum. Also use symmetry: the coefficients of (1+x+x2)n(1 + x + x^{2})^{n} read the same forwards and backwards, since replacing xx by 1x\frac{1}{x} and multiplying by x2nx^{2n} returns the same polynomial. Key Takeaways: - Multinomial coefficient: n!p1!⋯pk!\frac{n!}{p_{1}!\cdots p_{k}!} with ∑pi=n\sum p_{i} = n. - Terms in (x1+⋯+xk)n(x_{1} + \cdots + x_{k})^{n}: (n+k−1k−1)\binom{n + k - 1}{k - 1}; in (1+x+x2)n(1 + x + x^{2})^{n}: 2n+12n + 1. - Sum of coefficients: put all variables =1= 1. - Even-index coefficient sum =P(1)+P(−1)2= \frac{P(1) + P(-1)}{2}. - For xmx^{m} in (a+bx+cx2)n(a + bx + cx^{2})^{n}: solve p+q+r=np + q + r = n, q+2r=mq + 2r = m, then sum. - Factor the trinomial when possible; 1+x+x2=1−x31−x1 + x + x^{2} = \frac{1 - x^{3}}{1 - x}. - Pitfall: counting terms of (1+x+x2)n(1 + x + x^{2})^{n} with the multinomial formula for independent variables. Brain-Teaser 1: Find the coefficient of x5x^{5} in (1+2x+3x2)6(1 + 2x + 3x^{2})^{6}. Solution: Terms: 6!p! q! r!1p(2x)q(3x2)r\frac{6!}{p!\,q!\,r!}1^{p}(2x)^{q}(3x^{2})^{r} with p+q+r=6p + q + r = 6 and q+2r=5q + 2r = 5. List by rr: r=0r = 0: q=5q = 5, p=1p = 1: 7201⋅120⋅1⋅25=6×32=192\frac{720}{1 \cdot 120 \cdot 1} \cdot 2^{5} = 6 \times 32 = 192. r=1r = 1: q=3q = 3, p=2p = 2: 7202⋅6⋅1⋅23⋅3=60×24=1440\frac{720}{2 \cdot 6 \cdot 1} \cdot 2^{3} \cdot 3 = 60 \times 24 = 1440. r=2r = 2: q=1q = 1, p=3p = 3: 7206⋅1⋅2⋅2⋅9=60×18=1080\frac{720}{6 \cdot 1 \cdot 2} \cdot 2 \cdot 9 = 60 \times 18 = 1080. Total: 192+1440+1080=2712192 + 1440 + 1080 = 2712. Organising by the exponent of the highest-degree term makes sure no case is missed. Brain-Teaser 2: If (1+x+x2)n=a0+a1x+⋯+a2nx2n(1 + x + x^{2})^{n} = a_{0} + a_{1}x + \cdots + a_{2n}x^{2n}, find a0+a2+a4+⋯+a2na_{0} + a_{2} + a_{4} + \cdots + a_{2n} and a0+a3+a6+⋯a_{0} + a_{3} + a_{6} + \cdots. Solution: P(1)=3nP(1) = 3^{n} and P(−1)=1n=1P(-1) = 1^{n} = 1, so the even-index sum is 3n+12\frac{3^{n} + 1}{2}. For every third coefficient, use cube roots of unity: P(ω)=(1+ω+ω2)n=0P(\omega) = (1 + \omega + \omega^{2})^{n} = 0 and P(ω2)=0P(\omega^{2}) = 0. Then a0+a3+a6+⋯=P(1)+P(ω)+P(ω2)3=3n3=3n−1a_{0} + a_{3} + a_{6} + \cdots = \frac{P(1) + P(\omega) + P(\omega^{2})}{3} = \frac{3^{n}}{3} = 3^{n-1}. The trinomial 1+x+x21 + x + x^{2} vanishes at ω\omega, which makes this filter especially clean. Brain-Teaser 3: How many terms are in the expansion of (1+2x+x2)20(1 + 2x + x^{2})^{20}, and how many in (x+y+z+w)6(x + y + z + w)^{6}? Solution: 1+2x+x2=(1+x)21 + 2x + x^{2} = (1 + x)^{2}, so the expansion is (1+x)40(1 + x)^{40} with 4141 terms. (The general bound 2n+1=412n + 1 = 41 happens to agree here.) For four independent variables with n=6n = 6: (6+33)=84\binom{6 + 3}{3} = 84 terms. Checking whether the trinomial factors, and whether the variables are independent, decides which counting rule applies.