06 Summations

19
1 Summations

description

Summation notes for beginners

Transcript of 06 Summations

Page 1: 06 Summations

1

Summations

Page 2: 06 Summations

2

Summation Notation

Given a series {Given a series {aann}, an integer }, an integer lower bound lower bound (or(or limitlimit) ) jj≥≥0, and an integer 0, and an integer upper bound upper bound kk≥≥jj, then the , then the summation of summation of {{aann} } from j to kfrom j to kis written and defined as follows:is written and defined as follows:

Here, Here, ii is called the is called the index of summationindex of summation.

kjj

k

jii aaaa +++≡ +

=∑ ...: 1

.

Page 3: 06 Summations

3

Generalized Summations

For an infinite series, we may write:For an infinite series, we may write:

To sum a function over all members of a set To sum a function over all members of a set XX={={xx11,, xx22, , ……}:}:Or, if Or, if XX={={xx||PP((xx)}, we may just write:)}, we may just write:

...)()(:)( 21 ++≡∑∈

xfxfxfXx

...)()(:)( 21)(

++≡∑ xfxfxfxP

...: 1 ++≡ +

=∑ jj

jii aaa

Page 4: 06 Summations

4

Simple Summation Example

3217105

)116()19()14(

)14()13()12(1 2224

2

2

=++=

+++++=

+++++=+∑=i

i

Page 5: 06 Summations

5

More Summation Examples

An infinite series with a finite sum:An infinite series with a finite sum:

Using a predicate to define a set of elements Using a predicate to define a set of elements to sum over:to sum over:

874925947532 2222

10 prime) is (

2 =+++=+++=∑<

∧x

xx

2...1...222 41

2110

0=+++=++= −

=

−∑i

i

Page 6: 06 Summations

6

Summation Manipulations

Some handy identities for summations:Some handy identities for summations:

∑∑

∑ ∑∑

∑∑

+

+==

−=

+⎟⎠

⎞⎜⎝

⎛=+

=

nk

nji

k

ji

x xx

xx

nifif

xgxfxgxf

xfcxcf

)()(

)()()()(

)()( (Distributive law.)

(Applicationof commut-

ativity.)

(Index shifting.)

Page 7: 06 Summations

7

More Summation Manipulations

Other identities that are sometimes useful:Other identities that are sometimes useful:

∑∑

∑∑

∑∑∑

==

==

+===

++=

−=

<≤+⎟⎟⎠

⎞⎜⎜⎝

⎛=

k

i

k

i

jk

i

k

ji

k

mi

m

ji

k

ji

ififif

ikfif

kmjififif

0

2

0

0

1

)12()2()(

)()(

if )()()(

(Grouping.)

(Order reversal.)

(Series splitting.)

Page 8: 06 Summations

8

Example: Impress Your Friends

Boast, Boast, ““II’’m so smart; give me any 2m so smart; give me any 2--digit digit numbernumber nn, and I, and I’’ll add all the numbers from ll add all the numbers from 1 to 1 to nn in my head in just a few seconds.in my head in just a few seconds.””I.e.I.e., Evaluate the summation:, Evaluate the summation:

There is a simple closedThere is a simple closed--form formula for form formula for the result, discovered by Euler at age 12! the result, discovered by Euler at age 12!

∑=

n

ii

1

LeonhardEuler

(1707-1783)

Page 9: 06 Summations

9

Euler’s Trick, Illustrated

Consider the sum:Consider the sum:1+2+1+2+……+(+(nn/2)+((/2)+((nn/2)+1)+/2)+1)+……+(+(nn--1)+1)+nn

nn/2 pairs of elements, each pair summing to /2 pairs of elements, each pair summing to nn+1, for a total of (+1, for a total of (nn/2)(n+1)./2)(n+1).

n+1n+1

n+1

Page 10: 06 Summations

10

Symbolic Derivation of Trick

... )1()1(

))1(()(

))1()))1(((

))1((

1111

11

)1(

01

)1(

01

)1(

0111

2

11

=−++⎟⎠

⎞⎜⎝

⎛=−++⎟

⎞⎜⎝

⎛=

−−+⎟⎠

⎞⎜⎝

⎛=−+⎟

⎞⎜⎝

⎛=

++−+−+⎟⎠

⎞⎜⎝

⎛=

+++⎟⎠

⎞⎜⎝

⎛=+⎟

⎞⎜⎝

⎛==

∑∑∑∑

∑∑∑∑

∑∑

∑∑∑∑∑∑

==

==

==

+−

==

+−

==

+−

==+====

k

i

k

i

kn

i

k

i

kn

i

k

i

kn

i

k

i

kn

i

k

i

kn

i

k

i

n

ki

k

i

k

i

n

i

iniini

iniini

kikni

kiiiiii

Page 11: 06 Summations

11

Concluding Euler’s Derivation

So, you only have to do 1 easy So, you only have to do 1 easy multiplication in your head, then cut in half.multiplication in your head, then cut in half.Also works for odd Also works for odd nn (prove this at home).(prove this at home).

2/)1(

)1()1()1(

)1( )1(

21

1111

+=

+=+=+=

−++=−++⎟⎠

⎞⎜⎝

⎛=

∑∑∑∑

=

====

nn

nnkn

iniinii

nk

i

k

i

k

i

k

i

n

i

Page 12: 06 Summations

12

Example: Geometric Progression

A A geometric progression geometric progression is a series of the is a series of the form form aa, , arar, , arar22, , arar33, , ……, , ararkk, , where where a,ra,r∈∈RR..The sum of such a series is given by:The sum of such a series is given by:

We can reduce this to We can reduce this to closed formclosed form via via clever manipulation of summations... clever manipulation of summations...

∑=

=k

i

iarS0

Page 13: 06 Summations

13

Geometric Sum Derivation

HereHerewewego...go...

...1

1

1

11

1

1

1

1

)1(1

0

1

0

1

000

0

=+⎟⎠

⎞⎜⎝

⎛=+⎟

⎞⎜⎝

⎛=

===

====

=

+

=

+

+==

+

=

+

=

−+

=

+

====

=

∑∑∑

∑∑∑

∑∑∑∑

nn

i

in

ni

in

i

i

n

i

in

i

in

i

i

n

i

in

i

in

i

in

i

i

n

i

i

arararar

ararar

rararrrararrrS

arS

Page 14: 06 Summations

14

Derivation example cont...

)1()1(

)(

11

0

1

1

0

0

01

1

0

1

1

001

1

−+=−+⎟⎠

⎞⎜⎝

⎛=

−+⎟⎠

⎞⎜⎝

⎛+⎟⎠

⎞⎜⎝

⎛=

−+⎟⎠

⎞⎜⎝

⎛+=

+⎟⎠

⎞⎜⎝

⎛+−=+⎟

⎞⎜⎝

⎛=

++

=

+

==

+

=

+

=

+

=

∑∑

∑∑

nnn

i

i

nn

i

i

i

i

nn

i

i

nn

i

inn

i

i

raSraar

aararar

arararar

ararararararrS

Page 15: 06 Summations

15

Concluding long derivation...

anaaarSr

rr

raS

rarSraSrS

raSrS

n

i

n

i

in

i

i

n

n

n

n

)1(11 ,1When

1en wh1

1

)1()1()1(

)1(

000

1

1

1

1

+=⋅====

≠⎟⎟⎠

⎞⎜⎜⎝

⎛−−

=

−=−

−=−

−+=

∑∑∑===

+

+

+

+

Page 16: 06 Summations

16

Nested Summations

These have the meaning youThese have the meaning you’’d expect.d expect.

Note issues of free vs. bound variables, just Note issues of free vs. bound variables, just like in quantified expressions, integrals, etc.like in quantified expressions, integrals, etc.

( )

60106

)4321(666

321

4

1

4

1

4

1

4

1

3

1

4

1

3

1

4

1

3

1

=⋅=

+++===

++=⎟⎟⎠

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

⎛=

∑∑

∑∑ ∑∑ ∑∑∑

==

== == == =

ii

ii ji ji j

ii

ijiijij

Page 17: 06 Summations

17

Some Shortcut Expressions

4/)1(

6/)12)(1(

2/)1(

1),1/()1(

22

1

3

1

2

1

1

0

+=

++=

+=

≠−−=

=

=

=

+

=

nnk

nnnk

nnk

rrraar

n

k

n

k

n

k

nn

k

kGeometric series.

Euler’s trick.

Quadratic series.

Cubic series.

Page 18: 06 Summations

18

Using the Shortcuts

Example: Evaluate .Example: Evaluate .–– Use series splitting.Use series splitting.–– Solve for desiredSolve for desired

summation.summation.–– Apply quadraticApply quadratic

series rule.series rule.–– Evaluate.Evaluate.

∑=

100

50

2

kk

.925,297425,40350,338

6995049

6201101100

49

1

2100

1

2100

50

2

100

50

249

1

2100

1

2

=−=

⋅⋅−

⋅⋅=

−⎟⎠

⎞⎜⎝

⎛=

+⎟⎠

⎞⎜⎝

⎛=

∑∑∑

∑∑∑

===

===

kkk

kkk

kkk

kkk

Page 19: 06 Summations

19

Summations: Conclusion

You need to know:You need to know:–– How to read, write & evaluate summation How to read, write & evaluate summation

expressions like:expressions like:

–– Summation manipulation laws we covered.Summation manipulation laws we covered.–– Shortcut closedShortcut closed--form formulas, form formulas,

& how to use them.& how to use them.

∑∈Xx

xf )( ∑)(

)(xP

xf∑=

k

jiia ∑

= jiia