High School Modules > Precalculus by Gregory A. Moore
Series - Finite & Infinite Sums
An exploration of finite and infinite series. Recommended : review sequence module .
[Directions : Execute the Code Resource section first. Although there will be no output immediately, these definitions are used later in this worksheet.]
0. Code
| > | restart; with(plots): |
Warning, the name changecoords has been redefined
| > | fade := proc( a1,a2,a3,k,n) local c; c := COLOR(RGB, a1*k/n, a2*k/n, a2*k/n); return c; end: |
| > | FadePlot := proc( f) display( [seq( plot( k*f(x), x = 1..20, filled = true, color = fade(.9,.6,.7,k,10)), k = 0..10 )] ); end proc: |
1. Series & Sigma Notation
Sequences are lists of numbers.
| > | 3*k -2 $ k = 1..20; |
| > | ((-2)^k)/ (k^2 + 1) $ k = 1..10; |
When we add up a sequence of numbers, the result is a sum or series. To express a sum in Maple, we can use the
Sum
command (with a capital S). This command writes the sum in sigma notation, but does not compute its value. There are two different ways of computing its value: using the
sum
(with a lower case s), and the
value
command immediately after the
sum
command.
| > | Sum( 3*k -2, k = 1..20): % = value(%); |
| > | Sum( 1/k^2, k = 1..20): % = value(%); |
| > | Sum( (3*k)/2^k, k = 1..20): % = value(%); |
2. Special Series
There a number of "famous" series. It's good to be familiar with these. Some are more famous, some less.
| > | `Arithmetic Series`; Sum( a*k + b, k = 1..N); |
| > | `Geometric Series`; Sum( a*r^k, k = 1..N); |
| > | `Power Series`; Sum( 1/z^k, k = 1..N); |
| > | `Alternating Series`; Sum( (-1)^k, k = 1..N); |
| > | `Harmonic Series`; Sum( 1/k, k = 1..N); |
| > | Sum( 1/k^2, k = 1..N); |
| > | Sum( 1/k!, k = 1..N); |
| > | Sum(((-1)^(k+1))/(2*k)!, k = 1..N); |
| > | Sum( 1/n - 1/(n+1), k = 1..N); |
3. Rules of Series
Here are two rules of series.
................
The Distributive Property
.................................................................................................
The distributive property for sums looks like this:
=
.
| > | DistProp := Sum( c* a[k] , k = 1..N) = c*Sum( a[k] , k = 1..N); |
We can verify that this rule is valid by computing the left and right sides of this equation, and then see that the results are the same. Let
= 4k + 9.
| > | subs( {a[k] = 4*k+9, c = 13, N = 56}, DistProp ); evalf(%); testeq( Left = Right); |
We can see for ourselves that the left and right sides are equal value, but we can ask Maple to verify that the left and right values are the same. Here are some further examples.
| > | subs( {a[k] = 1/(k^2 + 2), c = 300, N = 12}, DistProp ); evalf(%); testeq( Left = Right); |
| > | subs( {a[k] = (2*k +1)/k^3, c = -7, N = 30}, DistProp ); evalf(%); testeq( Left = Right); |
................
The Associative Property
.................................................................................................
Here is the associate property of addition, and some examples of its use.
| > | AssocProp := Sum( a[k] + b[k] , k = 1..N) = Sum( a[k] , k = 1..N) + Sum( b[k] , k = 1..N); |
| > | subs( {a[k]=5*k-7, b[k]=3-11*k, N = 125}, AssocProp); evalf(%); testeq( Left = Right); |
| > | subs( {a[k] = 8*k + 21, b[k]=13*k - 9, N = 56}, AssocProp ); evalf(%); testeq( Left = Right); |
4. Series Formulas
When adding a constant, there is a simple formula :
| > | Sum( 1, k = 1..n): % = value(%); |
| > | Sum( C, k = 1..n): % = value(%); |
| > | Sum( 17, k = 1..2000): % = value(%); |
There are formulas to compute the sum of consecutive integers, squares, cubes, etc. You can find many of these formulae in your textbook or a reference book, or let Maple find the formula for you. To get an attractive formula, we will compute the sum, simplify the result, and factor that result.
You might know this formula already. This is the sum of integers : 1 + 2 + 3 + ... + n
| > | `Sum of Integers`; Sum( k, k = 1..n): % = value(%); Formula := factor(simplify(%)); |
| > | subs( { n = 100}, Formula ); |
| > | subs( { n = 2^10}, Formula ); |
Here is a formula for the squares of the natural numbers.
| > | `Sum of Squares`; Sum( k^2, k = 1..n): % = value(%); Formula := factor(simplify(%)); |
| > | subs( { n = 100}, Formula ); |
| > | subs( { n = 2^10}, Formula ); |
Here are sums of higher powers. Each can be simplified into a simpler form.
| > | `Sum of Cubes`; Sum( k^2, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of 4th Powers`; Sum( k^2, k = 1..n): % = value(%); factor(simplify(%)); |
Maple is really wonderful at computing the formulas. Here is one for adding eighth powers of integers.
| > | `Sum of 4th Powers`; Sum( k^8, k = 1..n): % = value(%); factor(simplify(%)); |
Here are some other interesting sums... the squares of odds, cubes of negative odds, 5th powers of negative even numbers, etc. There are formulas for each of these cases!
| > | `Sum of Squares of Odd Numbers`; Sum( (2*k-1)^2, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of Cubes of Negative Odd Numbers`; Sum( (-(2*k-1))^3, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of 5th Powers of Negative Even Numbers`; Sum( (-2*k)^5, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of Squares of Odd Numbers and Cubes of Evens`; Sum( (2*k-1)^2 + (2*k)^3, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of Cubes of an Arithmetic Sequence`; Sum( (7*k + 2)^3, k = 1..n): % = value(%); factor(simplify(%)); |
| > | `Sum of Cubes of a General Arithmetic Sequence`; Sum( (a*k + b)^3, k = 1..n): % = value(%); factor(simplify(%)); |
5. Infinite Series - Convergence & Divergence
When you add up an infinite number of numbers, you are very like to get infinity as the result.
| > | Sum( 3*k - 4, k = 1..infinity); % = value(%); |
However, the result is not necessarily infinite. If the numbers get small quickly enough, the sum may be a finite number.
| > | Sum( (4/5)^k, k = 1..infinity); % = value(%); |
Another strange thing that can occur is a sum that oscillates infinitely.
| > | Sum( (-1)^k, k = 1..4): % = value(%); Sum( (-1)^k, k = 1..5): % = value(%); Sum( (-1)^k, k = 1..400): % = value(%); Sum( (-1)^k, k = 1..401): % = value(%); |
When a sum adds up to infinity, negative infinity or oscillates, we say it
diverges
. If it gets closer and closer to a particular number we say it
converges
. Surprisingly, there are many convergent infinite series.
| > | Sum( 1/k^2, k = 1..infinity): % = evalf(value(%)); |
| > | Sum( 1/k!, k = 0..infinity): % = evalf(value(%)); |
| > | Sum( 1/exp(k), k = 1..infinity): % = evalf(value(%)); |
| > | Sum( ((-2)^j)/j!, j = 0..infinity): % = evalf(value(%)); |
| > | Sum( sin(j)/j!, j = 0..infinity): % = evalf(value(%)); |
Sometimes it's hard to tell at first. Even if we add 10,000 member of this series, we still have a number less than 10!
| > | Sum( 1/k, k = 1..100); % = evalf(value(%)); |
| > | Sum( 1/k, k = 1..1000); % = evalf(value(%)); |
| > | Sum( 1/k, k = 1..10000); % = evalf(value(%)); |
However, looks can be decieving. This series actually diverges to infinity.
| > | Sum( 1/k, k = 1..infinity); % = evalf(value(%)); |
6. Graphs of Series
We can also visualize a series. The orange line shows the sum, while the blue line shows the value of sequence. In this case, being an arithmetic sequence, the sum is getting larger and larger... to infinity.
| > | a := k -> 3*k - 2; |
| > | plot( [a(floor(x)), sum( a(j), j = 1..floor(x))] , x = 1..10, thickness=2, linestyle = [3,1], color = [blue,coral] ); |
| > | plot( [a(floor(x)), sum( a(j), j = 1..floor(x))] , x = 1..30, thickness=2, linestyle = [3,1], color = [blue,coral] ); |
Now let's look at a geometric series ... which converges. We can see that the series gets larger and larger, but it seems to be leveling out - because the sequence is getting very small, very fast.
| > | a := k -> (2/3)^k; |
| > | plot( [a(floor(x)), sum( a(j), j = 1..floor(x))] , x = 1..10, thickness=2, linestyle = [3,1], color = [blue,coral] ); |
| > | plot( [a(floor(x)), sum( a(j), j = 1..floor(x))] , x = 1..30, thickness=2, linestyle = [3,1], color = [blue,coral] ); |
Here are some other convergent sequences.
| > | a := k -> 1/k^2; |
| > | a := k -> 10*(7/8)^k; |
| > | a := k -> ((-1)^(k+1))/k^(9/8); |
Here are some divergent sequences.
| > | a := k -> (5 + (-k)*(-1) ); SumPlot(a); |
| > | a := k -> (8/7)^k ; SumPlot(a); |
| > | a := k -> (-1)^k ; SumPlot(a); |
7. Double Sums
A more complicated situation is the double sum - where there is a sum within a sum.
| > | S := Sum( Sum(i^2, i = 1..N), j = 1..M); SF := factor( simplify( value(%))); |
| > | subs( {N = 2, M = 3 }, S = SF); |
| > | subs( {N = 5, M = 10}, S = SF); |
| > | subs( {N = 50, M = 100}, S = SF); |
Notice that if we interchanged the two sums, we get different results.
| > | S := Sum( Sum(j^2, j = 1..M), i = 1..N); SF := factor( simplify( value(%))); |
| > | subs( {N = 2, M = 3 }, S = SF); |
| > | subs( {N = 5, M = 10}, S = SF); |
It can also get more complicated if the limit of the inner sum depends on the index of the outer sum. You should try these by hand.
| > | S := Sum( Sum(k^2, k = 1..m), m = 1..M); SF := factor( simplify( value(%))); |
| > | subs( {N = 2, M = 3}, S = SF); |
| > | subs( {N = 5, M = 10}, S = SF); |
© 2002 Waterloo Maple Inc