<<

1-27-2019 Sums and Products

In this section, I’ll review the notation for sums and products. and are binary operations: They operate on two numbers at a time. If you want to add or multiply more than two numbers, you need to group the numbers so that you’re only adding or multiplying two at once. Addition and multiplication are associative, so it should not matter how I group the numbers when I add or multiply. Now associativity holds for three numbers at a time; for instance, for addition,

a +(b + c)=(a + b)+ c.

But why does this work for (say) two ways of grouping a sum of 100 numbers? It turns out that, using induction, it’s possible to prove that any two ways of grouping a sum or of n numbers, for n 3, give the same result. ≥ Taking this for granted, I can define the sum of a list of numbers a1,a2,...an recursively as follows. A sum of a single number is just the number: { }

1

ai = a1. i=1 X I know how to add two numbers: 2

ai = a1 + a2. i=1 X To add n numbers for n> 2, I add the first n 1 of them (which I assume I already know how to do), then add the nth: − n n−1

ai = ai + an. i=1 i=1 X X Note that this is a particular way of grouping the n summands: Make one group with the first n 1, and add it to the last term. By associativity (as noted above), this way of grouping the sum should give− the same result as any other way. Therefore, I might as well omit parentheses and write

n ai = a1 + a2 + + an. ··· i=1 X

The product of a list of numbers a1,a2,...an is defined recursively in a similar way. A product of a single number is just{ the number:}

1

ai = a1. i=1 Y I know how to multiply two numbers:

2

ai = a1 a2. · i=1 Y To multiply n numbers for n > 2, I multiply the first n 1 of them (which I assume I already know how to do), then multiply the nth: − n n−1

ai = ai an. · i=1 i=1 Y Y 1 Again, I can drop the parentheses and write n

ai = a1 a2 an. · ····· i=1 Y Remark. Some people define the sum and product of no numbers as follows: The sum of no numbers (sometimes called the is defined to be 0, and the product of no numbers (sometimes called the ) is defined to be 1. These definitions are useful when you’re taking the sum or product of numbers in a set, rather than the sum or product of numbers indexed by a range of consecutive integers. For example, suppose S = 1, 4, 9, 13 . Then to use notation to write the sum of the squares of the elements of S, you might{ write } x2 to mean 12 + 42 + 92 + 132. x∈S X Similarly, to write the product of the reciprocals of the numbers in S, you might write 1 1 1 1 1 to mean . x 1 · 4 · 9 · 13 x∈S Y If the set containing the elements of the sum or product varies in a discussion, it might happen that the containing set is empty. Using the definitions for an empty sum or an empty product allows for this case. For instance, x2 = 0. ∈∅ Xx That is, the sum of the squares of the elements of the is 0.

The following properties and those for products which are given below are fairly obvious, but careful proofs require induction.

Proposition. (Properties of sums)

n n n (a) (ai + bi)= ai + bi. i=1 i=1 i=1 X X X n n (b) c ai = c ai. · · i=1 i=1 X X n (c) c = n c. · i=1 X 1 Proof. I’ll prove (c) as an example. I’ll use induction. For n = 1, the left side is c = c and the right i=1 side is 1 c = c. The result holds for n = 1. X Assume· that the result holds for n: n c = n c. · i=1 X Then for n + 1, I have n+1 n c = c + c i=1 i=1 X X = n c + c · =(n + 1) c · 2 The first equality used the recursive definition of a sum. The second equality follows from the induction hypothesis. The final equality is just basic algebra. Properties (a) and (b) can also be proved using induction.

Example. Compute the following sums:

4 (a) i2. i=1 X 6

(b) i bi. · i=2 X 50 (c) 4. j=1 X n (d) (ai + c), where c is a constant. i=1 X (a) 4 i2 = 12 + 22 + 32 + 42 = 30. i=1 X (b) 6

i bi = 2b2 + 3b3 + 4b4 + 5b5 + 6b6. · i=2 X Note that sums need not start indexing at 1.

(c) 50 4 = 50 4 = 200. · k=1 X Note that the summation variable can be anything that you want.

(d) n n n n

(ai + c)= ai + c = ai + n c. · i=1 i=1 i=1 i=1 X X X X

50 √n + 2 √n + 1 Example. Compute the exact value of − . √ 2 n=1 n + 3n + 2 X Note that √n + 2 √n + 1 √n + 2 √n + 1 1 1 − = − = . √n2 + 3n + 2 (n + 1)(n + 2) √n + 1 − √n + 2 So p 50 50 √n + 2 √n + 1 1 1 − = . √ 2 √n − √n n=1 n + 3n + 2 n=1 + 1 + 2 X X   3 I’ll write out a few of the terms:

1 1 + √2 − √3   1 1 + √3 − √4   1 1 + √4 − √5   . . 1 1 + √50 − √51   1 1 √51 − √52  

Most of the terms cancel in pairs, with the negative term in one expression cancelling with the positive term in the next expression. Only the first term and the last term are left, and they give the value of the sum:

50 √n + 2 √n + 1 1 1 − = . √ 2 √ − √ n=1 n + 3n + 2 2 52 X

This is an example of a telescoping sum.

Proposition. (Properties of products)

n n n

(a) aibi = ai bi . i=1 i=1 ! i=1 ! Y Y Y

n n k k (b) ai = ai . i=1 i=1 ! Y Y n (c) c = cn. i=1 Y Proof. I’ll prove (a) by way of example. The proof will use induction on n. 1 1 1

For n = 1, the left side is aibi = a1b1. The right side is ai bi = a1b1. The result holds i=1 i=1 ! i=1 ! for n = 1. Y Y Y Assume that the result holds for n:

n n n

aibi = ai bi . i=1 i=1 ! i=1 ! Y Y Y 4 Then for n + 1, I have n+1 n

aibi = aibi an+1bn+1 · i=1 i=1 Y Yn n = ai bi an+1bn+1 i=1 ! i=1 ! Yn Y n

= ai an+1 bi bn+1 i=1 ! i=1 ! Y Y n+1 n+1 = ai bi i=1 ! i=1 ! Y Y The first equality follows from the recursive definition of a product. The second equality uses the induction hypothesis. The third equality comes from commutativity of multiplication. And the fourth equality is a result of the recursive definition of a product again. Properties (b) and (c) can also be proved by induction.

Example. Compute the following products:

4 (a) en. n=1 Y n 2 (b) (cai) , where c is a constant. i=1 Y 20 (c) 5. k=1 Y (a) 4 en = e e2 e3 e4 = e10. · · · n=1 Y (b) n n n n n 2 2 2 2 2 2 2n (cai) = c ai = c ai = c ai . i=1 i=1 i=1 ! i=1 ! i=1 ! Y Y Y Y Y (c) 20 5 = 520. k=1 Y

50 4 4 Example. Compute the exact value of 1+ + . n n2 n=1 Y   Note that 4 4 n2 + 4n + 4 (n + 2)2 1+ + = = . n n2 n2 n2 So 50 50 4 4 (n + 2)2 1+ + = . n n2 n2 n=1 n=1 Y   Y 5 I’ll write out a few of the terms: 32 42 52 62 502 512 522 12 · 22 · 32 · 42 ····· 482 · 492 · 502 Most of the terms in the numerators cancel with the terms in the denominators “two fractions ahead”. Only the first two denominators and the last two numerators don’t cancel, and they give the value of the product: 50 4 4 512 522 1+ + = · = 1758276. n n2 12 22 n=1 Y   · This is an example of a telescoping product.

If n is a positive integer, n! (read n-) is the product of the integers from 1 to n:

n n!= k = 1 2 n. · ····· k=1 Y For example, 5! = 1 2 3 4 5 = 120. · · · · By convention, 0! is defined to be 1. This definition agrees with the extension of using the Gamma , described below. It also is the appropriate definition when factorials come up in binomial coefficients. Note that n! = 1 2 (n 1) n =(n 1)! n. · ····· − · − · There is a way of extending the definition of factorials to positive real numbers (so that, for instance, 1 ! is defined). The Gamma function is defined by 2 ∞ Γ(x)= e−ttx−1 dt for x> 0. Z0 (Note that x here is a real number.) If n is a positive integer,

Γ(n +1) = n!.

Here’s a graph of the Gamma function:

25

20

15

10

5

1 2 3 4 5

I’ve placed dots at the points (n, (n 1)!) so you can see that the Gamma function really goes through the factorial points. Note also that Γ(1) =− 1. But if I plug n = 0 into the formula above, I get Γ(0+1) = 0!, i.e. Γ(1) = 0!. Thus, 0! = 1, which is the convention I mentioned earlier.

6 Example. Evaluate Γ(5) using the integral definition.

∞ b Γ(5) = t4e−t dt = lim t4e−t dt. b→∞ Z0 Z0 Do the antiderrivative by parts: d dt dt Z + t4 e−t 4t3 e−t − − + 12t2 e−t 24t e−t − − + 24 e−t 0 e−t − − t4e−t dt = t4e−t 4t3e−t 12t2e−t 24te−t 24e−t + c. − − − − − Z So the definite integral is

lim b4e−b 4b3e−b 12b2e−b 24be−b 24e−b + 24 = 24. b→∞ − − − − −  All the b-terms go to 0, because

lim bne−b =0 for n 0. b→∞ ≥

Note that 24 = 4!, so Γ(5) = 4!.

c 2019 by Bruce Ikenaga 7