Sums of coefficients · Mathematics Class 11–12 | StemPy Lab
Course 7.2·Lesson 2 of 3
Sums of coefficients
Putting x=1 in (1+x)n
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
Put x=1: the sum of all the coefficients
Write the expansion again:
(1+x)n=nC0+nC1x+nC2x2+⋯+nCnxn.
Put x=1. The left side is 2n, and the right side is the sum of the coefficients:
nC0+nC1+⋯+nCn=2n.
Row 8 adds up to 1+8+28+56+70+56+28+8+1=256=28.
The same trick works for any polynomial. To add up all its coefficients, put x=1.
Example 1. The coefficients of (2x+3)5 add up to (2+3)5=3125.
Example 2. In (x2+3x−1)6, putting x=1 gives (1+3−1)6=36=729. We never expanded the bracket.
Put x=−1: the alternating sum
Now put x=−1 in (1+x)n. The left side is 0 when n≥1. The right side is
nC0−nC1+nC2−nC3+⋯=0.
So the coefficients with a plus sign add up to the same as those with a minus sign. The plus signs belong to the odd-placed terms, the 1st, 3rd, 5th and so on. The minus signs belong to the even-placed terms, the 2nd, 4th, 6th and so on.
Together they make 2n, and they are equal. So each is half:
nC0+nC2+nC4+⋯=nC1+nC3+nC5+⋯=2n−1.
For row 8, 1+28+70+28+1=128 and 8+56+56+8=128.
The same bar chart of row 8, with the bars at even r in blue and the bars at odd r in orange. The blue bars add up to 1 + 28 + 70 + 28 + 1 = 128. The orange bars add up to 8 + 56 + 56 + 8 = 128. Together they make 256, which is 2 to the power 8. The title says that putting x = 1 and x = minus 1 in (1 + x) to the power 8 shows the two sums are equal.
Choose any row. The two sums are always equal, and the sum of all the coefficients is a power of 2.
The same idea for a polynomial
Let f(x)=a0+a1x+a2x2+⋯ be any polynomial. Then f(1) adds all the coefficients, and f(−1) adds the even powers and subtracts the odd ones. So
Example. Take f(x)=(x+2)5. Then f(1)=35=243 and f(−1)=15=1. The coefficients of the even powers of x add up to 2243+1=122, and those of the odd powers to 2243−1=121.
Check. Expanding gives 32+80x+80x2+40x3+10x4+x5. The even powers give 32+80+10=122, and the odd powers give 80+40+1=121.
A sum with r⋅nCr
Find nC1+2nC2+3nC3+⋯+nnCn.
Step 1. Use the identity.r⋅nCr=n⋅n−1Cr−1. So the sum is
nk=0∑n−1n−1Ck.
Step 2. Add the brackets. The coefficients in the bracket belong to row n−1, so they add up to 2n−1.
Answer.
r=0∑nr⋅nCr=n⋅2n−1.
Check for n=6. The terms are 6,30,60,60,30,6, which add up to 192. The formula gives 6×25=192.
A sum with a division
Find nC0+2nC1+3nC2+⋯+n+1nCn.
Step 1. A new identity.n+1Cr+1=r+1n+1⋅nCr. So r+1nCr=n+1n+1Cr+1.
Step 2. Add. The numerators run through row n+1, except its first entry:
n+11k=1∑n+1n+1Ck=n+12n+1−1.
Check for n=5. The terms are 1,2.5,3.33…,2.5,1,0.1666…, which add up to 10.5. The formula gives 664−1=10.5.
The sum of the squares
The squares of one row add up to a coefficient in a longer row:
(nC0)2+(nC1)2+⋯+(nCn)2=2nCn.
The reason is that (1+x)n(1+x)n=(1+x)2n. The coefficient of xn on the right is 2nCn. On the left it is the sum of products nCr⋅nCn−r, and nCn−r=nCr by symmetry.
For n=4: 1+16+36+16+1=70=8C4.
Practise with new numbers
Try it in Python
The program prints, for every row from 1 to 10, the sum of all the coefficients, the two half-sums, their difference, and the sum of r⋅nCr beside n⋅2n−1.
Common mistakes
Expanding first. To add the coefficients of a polynomial, put x=1. There is no need to expand.
Forgetting that x=−1 needs n≥1. For n=0 the alternating sum is 1, not 0.
Calling the half-sum 2n. Each half is 2n−1.
Mixing up the two half-sums. The 1st, 3rd and 5th terms hold nC0, nC2 and nC4, the even values of r.
Using the identity with the wrong row. After r⋅nCr=n⋅n−1Cr−1, the new coefficients are in row n−1, so they add up to 2n−1.
Remember these
The sum of the coefficients of (1+x)n is 2n.
The sum with alternating signs is 0, so the odd-placed and the even-placed terms each add up to 2n−1.
For a polynomial f, put x=1 for the total and x=−1 for the alternating sum.
r=0∑nr⋅nCr=n⋅2n−1.
r=0∑nr+1nCr=n+12n+1−1.
r=0∑n(nCr)2=2nCn.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the sum of the coefficients in the expansion of (1+x)7.
Find the sum of the coefficients in the expansion of (3x−1)4.
Find the sum of the odd-placed coefficients in the expansion of (1+x)9.
Find the value of r=0∑5r⋅5Cr.
Find the value of (3C0)2+(3C1)2+(3C2)2+(3C3)2.
Enroll free in Properties and Applications of Binomial Coefficients
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.