The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem...

23
The Binomial Theorem

Transcript of The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem...

Page 1: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem

Page 2: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Introduction

You should be familiar with the following formula:

π‘₯ + 𝑦 2 = π‘₯2 + 2π‘₯𝑦 + 𝑦2

The binomial theorem explains how to get a corresponding expansion when the exponent is an arbitrary natural number.

Page 3: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Deriving the Binomial TheoremLet us ponder the expression

π‘₯ + 𝑦 𝑛 = (π‘₯ + 𝑦)(π‘₯ + 𝑦)β‹― (π‘₯ + 𝑦)𝑛 factors

To expand this into a sum, we need to multiply β€œeverything by everything”. More precisely, we need to take a sum of all products of the form

factor chosen from the first parenthesis timesfactor chosen from the second parenthesis timesfactor chosen from the third parenthesis etc… timesfactor chosen from the last parenthesis.

For example, if 𝑛 = 5, then one of these factors is π‘₯ βˆ™ π‘₯ βˆ™ 𝑦 βˆ™ π‘₯ βˆ™ 𝑦 = π‘₯3𝑦2.

Of course, we also get π‘₯3𝑦2 by selecting the three x’s and the two y’s from different parentheses. Here comes the key idea:

There are 𝐢(5,3) ways of selecting the three parentheses from which we select x. Therefore, there are as many terms π‘₯3𝑦2 in the expansion, andtherefore, 𝐢(5,3) is the coefficient of the term π‘₯3𝑦2 in the expansion.

Page 4: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem

Let’s generalize this understanding. In the expansion π‘œπ‘“ π‘₯ + 𝑦 𝑛, the coefficient of the term π‘₯π‘˜π‘¦π‘›βˆ’π‘˜ is 𝐢(𝑛, π‘˜). Therefore, since the expansion contains these (and only these) types of terms for π‘˜ = 0 to π‘˜ = 𝑛,

π‘₯ + 𝑦 𝑛 =

π‘˜=0

𝑛

𝐢(𝑛, π‘˜)π‘₯π‘˜π‘¦π‘›βˆ’π‘˜

Due to the symmetry of combinations, we can also write this formula as

π‘₯ + 𝑦 𝑛 =

π‘˜=0

𝑛

𝐢(𝑛, π‘˜)π‘₯π‘›βˆ’π‘˜π‘¦π‘˜

This form, where the powers of π‘₯ are decreasing, is more common.

It is also common to use the notation 𝐢 𝑛, π‘˜ = π‘›π‘˜

here. The fact that combinations

appear as coefficients in the binomial theorem explains why there are also known as binomial coefficients.

Page 5: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 1

π‘₯ + 𝑦 3 = 𝐢 3,0 π‘₯3𝑦0 + 𝐢 3,1 π‘₯2𝑦1 + 𝐢 3,2 π‘₯1𝑦2 + 𝐢 3,3 π‘₯0𝑦3

When we simplify these types of formulas, it is helpful to remember that 𝐢 𝑛, 0 = 𝐢 𝑛, 𝑛 = 1 for all natural numbers 𝑛, since there is exactly one way to make an unordered selection of no elements, or all elements, from n elements.

Furthermore, 𝐢 𝑛, 1 = 𝐢 𝑛, 𝑛 βˆ’ 1 = 𝑛 for all natural numbers 𝑛, since there are exactly 𝑛 ways to make an unordered selection of 1 elements, or all but one elements, from n elements.

Thereforeπ‘₯ + 𝑦 3 = π‘₯3 + 3π‘₯2𝑦 + 3π‘₯𝑦2 + 𝑦3

Page 6: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 2

By the binomial theorem, 2π‘₯ βˆ’ 3𝑦 4 equals

=4

02π‘₯ 4 +

4

12π‘₯ 3 βˆ’3𝑦 +

4

22π‘₯ 2 βˆ’3𝑦 2

+4

32π‘₯ βˆ’3𝑦 3 +

4

4βˆ’3𝑦 4.

Simplifying this, we get

16π‘₯4 + 4 βˆ™ 8π‘₯3 βˆ™ βˆ’3𝑦 + 6 βˆ™ 4π‘₯29𝑦2 + 4 βˆ™ 2π‘₯ βˆ™ βˆ’27𝑦3 + 81𝑦4.

The final simplification of this sum is

2π‘₯ βˆ’ 3𝑦 4 = 16π‘₯4 βˆ’ 96π‘₯3𝑦 + 216π‘₯2𝑦2 βˆ’ 216π‘₯𝑦3 + 81𝑦4.

Page 7: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 3Simplify

30

223 +

30

324 +β‹―+

30

30231

without the use of a calculator.

Observe that this sum has many of the ingredients of a binomial expansion- binomial coefficients and ascending powers of a quantity. We identify 𝑛 = 30 and 𝑦 = 2. There is no apparent π‘₯, which we fix by setting π‘₯ = 1. With these settings, the binomial theorem becomes

1 + 2 30 =

π‘˜=0

3030

π‘˜2π‘˜

This is almost equal to the given sum, except for the fact that the β€œk” in the powers of 2 is one bigger and therefore does not match the β€œk” in the bottom of the binomial coefficients, and the fact that the latter starts at 2, not 0.

The second problem is easily fixed by factoring out a factor of 2:

30

223 +

30

324 +β‹―+

30

30231 = 2

30

222 +

30

323 +β‹―+

30

30230 = 2

π‘˜=2

3030

π‘˜2π‘˜

Page 8: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 3, continued

The problem that π‘˜ in the given sum starts at π‘˜ = 2 is fixed by subtraction:

π‘˜=2

3030

π‘˜2π‘˜ =

π‘˜=0

3030

π‘˜2π‘˜ βˆ’

30

121 βˆ’

30

020

Simplifying this, we get

π‘˜=2

3030

π‘˜2π‘˜ = 330 βˆ’ 30 βˆ™ 2 βˆ’ 1 βˆ™ 1

Therefore, our original sum has been simplified to 2 βˆ™ (330 βˆ’ 61):

30

223 +

30

324 +β‹―+

30

30231 = 2(330 βˆ’ 61)

Page 9: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Sum of Combinations

Inspired by the previous example, we recognize that interesting special cases of the binomial theorem are obtained for special values of π‘₯ and 𝑦.

π‘₯ = 1, 𝑦 = 1:

2𝑛 =

π‘˜=0

𝑛

𝐢(𝑛, π‘˜)

This shows that all the combinations for a given 𝑛 add up to 2𝑛. This confirms our interpretation of 𝐢(𝑛, π‘˜) as the number of subsets of size π‘˜ of a set of size 𝑛. All those numbers must add up to the total number of subsets of a set of size 𝑛, which we already know to be 2𝑛.

Page 10: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Sum of Linearly Weighted Combinations

If we keep x arbitrary and only set 𝑦 = 1 in the binomial theorem, we get a function of π‘₯:

𝑓 π‘₯ = π‘₯ + 1 𝑛 =

π‘˜=0

𝑛

𝐢(𝑛, π‘˜)π‘₯π‘˜ .

𝑓 is differentiable, so we can take the derivative:

𝑓′ π‘₯ = 𝑛 π‘₯ + 1 π‘›βˆ’1 =

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜π‘₯π‘˜βˆ’1.

Now substituting π‘₯ = 1, we get the useful formula

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜ = 𝑛2π‘›βˆ’1.

Page 11: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Sum of Quadratically Weighted Combinations

We can take the derivative of 𝑓′ and get

𝑓′′ π‘₯ = 𝑛(𝑛 βˆ’ 1) π‘₯ + 1 π‘›βˆ’2=

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜(π‘˜ βˆ’ 1)π‘₯π‘˜βˆ’2.

Once again substituting π‘₯ = 1, we obtain

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜(π‘˜ βˆ’ 1) = 𝑛(𝑛 βˆ’ 1)2π‘›βˆ’2.

We can rewrite this formula as

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜2 = 𝑛(𝑛 βˆ’ 1)2π‘›βˆ’2+

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜

and substitute 𝑛2π‘›βˆ’1 for the second term. This yields

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜2 = 𝑛(𝑛 βˆ’ 1)2π‘›βˆ’2+𝑛2π‘›βˆ’1 = 𝑛(𝑛 + 1)2π‘›βˆ’2.

Page 12: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Using Distinguishable Permutations to Count Operations in the Shift-and-Add Binary Multiplication Algorithm (2)

Using the linear-weighted sum of combinations formula, we can complete the calculation we started in Permutations and Combinations. There, we showed that the average number ΰ΄€π‘Ž of additions in the shift-and-add multiplication algorithm, over all possible n bit numbers is

ΰ΄€π‘Ž =1

2𝑛

π‘˜=0

𝑛

𝐢(𝑛, π‘˜) β‹… π‘˜.

Using the binomial theorem, we find a closed form for the sigma sum:

π‘˜=0

𝑛

𝐢(𝑛, π‘˜) β‹… π‘˜ = 2π‘›βˆ’1𝑛.

This yields the formula ΰ΄€π‘Ž =𝑛

2for the average number of additions

needed for the shift-and-add binary multiplication algorithm.

Page 13: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Using Distinguishable Permutations to Count Operations in the Shift-and-Add Binary Multiplication Algorithm (3)

In practice, the real question is what the total average runtime is of our multiplication algorithm.We might be asking this question if we are programming in ahigh-level language without arbitrary-precision integerarithmetic, and we set ourselves the task of implementingfast arbitrary-precision arithmetic from scratch. Anotherscenario is that we are doing assembly programming on aCPU that does not have a native multiplication instruction.In these situations, the algorithm would be expected torequire a certain base amount 𝑃 of run time for each bit ofthe multiplier, i.e. each time its loop is executed, without theaddition, and an extra amount 𝑄 just for the addition, whena multiplier bit is 1. Thus, if the multiplier has 𝑛 bits, and π‘˜ ofthem are set, the algorithm has a total run time of 𝑛𝑃 + π‘˜π‘„.We ignore the small run time of initializing the product aszero.

Page 14: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Using Distinguishable Permutations to Count Operations in the Shift-and-Add Binary Multiplication Algorithm (7)

It follows that the average run time is is

1

2𝑛

π‘˜=0

𝑛

𝐢(𝑛, π‘˜) β‹… (𝑛𝑃 + π‘˜π‘„).

We can evaluate a sum of this type in closed form. Wefirst simply and then use our summation formulas:

𝑃𝑛

2𝑛

π‘˜=0

𝑛

𝐢 𝑛, π‘˜

=2𝑛

+𝑄

2𝑛

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ π‘˜

=𝑛2π‘›βˆ’1

= 𝑃 +1

2𝑄 𝑛.

Page 15: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 4Does the binomial expansion of 3π‘₯ +

2

π‘₯2

100contain π‘₯3, π‘₯5 and π‘₯7 terms? If yes, what are their

coefficients? Applying the binomial theorem, we get

3π‘₯ +2

π‘₯2

100

=

π‘˜=0

100

𝐢(100, π‘˜)(3π‘₯)π‘˜2

π‘₯2

100βˆ’π‘˜

.

We simplify the product of factors that contain x on the right side using the laws of exponentiation:

(3π‘₯)π‘˜2

π‘₯2

100βˆ’π‘˜

= 3π‘˜ β‹… 2100βˆ’π‘˜ β‹… π‘₯π‘˜ β‹… π‘₯βˆ’200+2π‘˜ = 3π‘˜ β‹… 2100βˆ’π‘˜ β‹… π‘₯3π‘˜βˆ’200.

This allows us to answer the first part of the question. All exponents of π‘₯ have the form 3π‘˜ βˆ’ 200with k an integer from 0 to 100. 3π‘˜ βˆ’ 200 = 3 and 3π‘˜ βˆ’ 200 = 5 have no integer solutions, and therefore, the binomial expansion contains no π‘₯3 or π‘₯5 terms. However, 3π‘˜ βˆ’ 200 = 7 has an integer solution in the range 0..100: π‘˜ = 69. The corresponding term of the binomial expansion with that k value is

𝐢 100,69 β‹… 369 β‹… 2100βˆ’69 β‹… π‘₯7.

Hence, the expansion coefficient of π‘₯7 is 𝐢 100,69 β‹… 369 β‹… 231.

Page 16: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Example 5If a positive quantity π‘Ÿ is increased by 1%, by how much does its 5th power increase?

Increasing r by 1% means multiplying it by 1.01. Therefore, its 5th power becomes

1.01π‘Ÿ 5 = 1.015π‘Ÿ5.

The quantity 1.015 is 1.05101005. . , so π‘Ÿ5 increases by about 5.101%. Using the binomial theorem, we can get this approximation without the use of a calculator, solely based on arithmetic we can do in our heads:

1.01π‘Ÿ 5 = π‘Ÿ5 β‹… 1 + 0.01 5

We now expand the factor on the right side, and ignore the higher than second powers of 0.01 since they are negligible:

1 + 0.01 5 β‰ˆ 𝐢 5,0 β‹… 15 β‹… 0.010 + 𝐢 5,1 β‹… 14 β‹… 0.011 + 𝐢 5,2 β‹… 13 β‹… 0.012

Simplifying, we get 1 + 0.01 5 β‰ˆ 1 + 5 β‹… 0.01 + 10 β‹… 0.0001 = 1.051.

We see that the increase in π‘Ÿ5 is approximately 5.1%.

Page 17: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem and the Exponential Function (1)

In some situations, we are dealing with expressions of the type 1 + β„Ž 𝑛 where the exponent 𝑛 is very large and β„Ž is near zero, i.e. the base is close to 1.

For example, the chance of winning the Powerball jackpot (with one ticket) is roughly 1 in 292 million. If 10 million people buy one ticket each for one specific drawing, what is the probability that no one will win the jackpot?

When we study probability, we will learn to draw the following conclusions: The probability p that any specific person won’t win is p= 1- 1/292,000,000. If we raise that quantity to the power of 10 million, we get the probability that no one wins. Therefore, we are seeking to evaluate the quantity

1 βˆ’1

292,000,000

10,000,000

This is 1 + β„Ž 𝑛, with β„Ž = βˆ’1/292,000,000 and 𝑛 = 10,000,000.

A TI-83 Plus evaluates this quantity as 0.9663331774. However, calculators may fail at such a task for large 𝑛. We need a better way to evaluate this kind of expression. Let us try the binomial theorem.

Page 18: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem and the Exponential Function (2)

The binomial theorem gives us the following expansion:

1 + β„Ž 𝑛 = 1 + π‘›β„Ž +𝑛(𝑛 βˆ’ 1)

2β„Ž2 +

𝑛(𝑛 βˆ’ 1)(𝑛 βˆ’ 2)

6β„Ž3 +β‹―+ β„Žπ‘›.

Since 𝑛 = 10,000,000, this binomial expansion has 10 million terms. Consider though

that β„Ž = βˆ’1

292,000,000is very small in absolute value, and its powers β„Ž2, β„Ž3, etc. are far

smaller still. Perhaps most of the terms are negligibly small and can be dropped?

This seems reasonable, but we must not be so quick. There are still the binomial coefficients attached to the powers of β„Ž, and we know that they can be quite large.

The absolute value of the k-th term of the binomial expansion of 1 + β„Ž 𝑛 is 𝐢 𝑛, π‘˜ |β„Ž|π‘˜ .Using the definition of combinations, we can rewrite this as:

𝐢 𝑛, π‘˜ |β„Ž|π‘˜ =𝑛 𝑛 βˆ’ 1 βˆ™ β‹― βˆ™ (𝑛 βˆ’ π‘˜ + 1)

π‘˜!|β„Ž|π‘˜ .

Page 19: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem and the Exponential Function (3)

Observe that each of the π‘˜ factors in the numerator is at most 𝑛:

𝐢 𝑛, π‘˜ |β„Žπ‘˜| ≀𝑛 βˆ™ 𝑛 … βˆ™ 𝑛

π‘˜!|β„Ž|π‘˜ =

𝑛|β„Ž| π‘˜

π‘˜!.

Notice that 𝑛|β„Ž| =10,000,000

292,000,000=

5

146β‰ˆ 0.345 is a small quantity. Its powers 𝑛|β„Ž| π‘˜

decrease exponentially. The denominator π‘˜! grows even faster than exponential. This means that the quantities 𝐢 𝑛, π‘˜ |β„Žπ‘˜| go to zero extremely quickly as π‘˜ grows, and that we can obtain a good approximation by keeping only a few terms of the binomial expansion. For example, with just 3 terms, we get the very good approximation

1 βˆ’1

292,000,000

10,000,000

β‰ˆ 1 βˆ’5

146+

25

42632= 0.9663398…

In Calculus 2, you learn a technique for estimating and controlling the approximation error of a alternating sums and series. This would allow us to determine precisely how many terms we need to keep to satisfy a desired approximation accuracy. Here, it suffices that the binomial theorem can be used to approximate values of 1 + β„Ž 𝑛. Notice that this method works best when 𝑛 β„Ž < 1.

Page 20: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

The Binomial Theorem and the Exponential Function (4)

There is an even simpler approximation method available, one that only requires calc 1 knowledge. The expression 1 + β„Ž 𝑛 may remind you of the limit definition of the exponential function:

𝑒π‘₯ = limπ‘›β†’βˆž

1 +π‘₯

𝑛

𝑛

.

If π‘₯ is small and 𝑛 is large, non-technically speaking, then

𝑒π‘₯ β‰ˆ 1 +π‘₯

𝑛

𝑛

.

If β„Ž is small, we can substitute π‘₯ = π‘›β„Ž and get 1 + β„Ž 𝑛 β‰ˆ π‘’π‘›β„Ž.

Applied to our lottery problem, we get

1 βˆ’1

292,000,000

10,000,000

β‰ˆ π‘’βˆ’5

146 = 0.966333… .

Page 21: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Alternating Sum of Combinations (I)

π‘₯ = 1, 𝑦 = βˆ’1:

0 =

π‘˜=0

𝑛

𝐢 𝑛, π‘˜ (βˆ’1)π‘˜

This shows that the alternating sum of the combinations for a given 𝑛 add up to 0.

Since the terms with odd k’s in this sum have negative signs in front of them, we can move them to the left side and get the following identity:

π‘˜=0,odd

𝑛

𝐢 𝑛, π‘˜ =

π‘˜=0,even

𝑛

𝐢 𝑛, π‘˜

This means that for given 𝑛, the 𝐢(𝑛, π‘˜) with odd π‘˜ add up to the same number as the 𝐢(𝑛, π‘˜) with even π‘˜.

Page 22: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Alternating Sum of Combinations (II)

Example: 𝑛 = 5

𝐢 5,1 + 𝐢 5,3 + 𝐢 5,5 = 5 + 10 + 1 = 16

𝐢 5,0 + 𝐢 5,2 + 𝐢 5,4 = 1 + 10 + 5 = 16

You may think that this is not a particularly impressive identity after all, since both sums contain the same terms, just in a different order. This is generally true if 𝑛 is odd. However, if 𝑛 is even, then the terms are different (and there are different numbers of them too), so the fact that their sum is equal is not an obvious fact. Let us take 𝑛 = 6 as a second example:

𝐢 6,1 + 𝐢 6,3 + 𝐢 6,5 = 6 + 20 + 6 = 32

𝐢 6,0 + 𝐢 6,2 + 𝐢 6,4 + 𝐢 6,6 = 1 + 15 + 15 + 1 = 32

Page 23: The Binomial Theorem - Arizona State Universityboerner/mat243/6.4 Binomial...The Binomial Theorem Let’s generalize this understanding. In the expansion + 𝑛,the coefficient of

Pascal’s Triangle

There is another interesting relationship between combinations that is usually visualized by arranging the combinations in a triangular fashion called Pascal’s Triangle.

In Pascal’s Triangle, each combination is the sum of the two combinations diagonally above it:

𝑛

π‘˜+

𝑛

π‘˜ + 1=

𝑛 + 1

π‘˜ + 1

for integers 𝑛 β‰₯ 1 and 1 ≀ π‘˜ < 𝑛.

As an exercise, you should try to prove this using the definition of combinations.

Image credit: Wikipedia public domain image.