Application Center - Maplesoft

App Preview:

Calculus II: Lesson 14: Introduction to Sequences

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

L14-sequences1.mws

Calculus II

Lesson 14: Introduction to Sequences

Sequences

A sequence is simply an infinite list; that is an infinite collection of objects arranged in some order. In this course, we will deal almost exclusively with sequences of numbers. For example,

1, 2, 3, 4, 5, 6, 7, ...

1, -1/3, 1/9, -1/27, 1/81, -1/243, ...

1/2, 2/3, 3/4, 4/5, 5/6, 6/7, ...

are three sequences of numbers. (Note the ... symbols, which indicate that the list continues indefinitely.)

We typically denote a sequence by a single letter; the individual terms in the sequence are denoted by the same letter, with a subscript showing the position of the term in the sequence. For example, if the last sequence above is called a , then

a_1 = 1/2 , a_2 = 2/3 , a_3 = 3/4 and so on. The general term , or n - th term , is given by the formula a_n = n/(n+1) .

Question 1

What is the general term in the second sequence above?

Solution. (-1/3)^(n+1) . (Why is the exponent n+1 and not just n ?)

One way to produce a list in Maple is to use the dollar sign, $ .

> n^2 $n=1..10;

1, 4, 9, 16, 25, 36, 49, 64, 81, 100

> n/(n+1) $n=3..7;

3/4, 4/5, 5/6, 6/7, 7/8

Note the use of the word 'list' rather than 'sequence' here; Maple is only producing a finite number of terms, not the whole sequence. This is enough, though, to let us get a picture of the sequence by plotting the general term a_n as a function of n . With the correct syntax, Maple 's plot command will do this for us. In the examples below, we first define a list of points to be plotted (the points ( n , a_n )), then pass this list to plot .

> a := [[n, n^2] $n=1..10];

a := [[1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6,...

> plot(a, x=0..12, style=point);

[Maple Plot]

This gives a nice picture of the sequence a , where a_n = n^2 . The next example is the sequence whose n -th term is n/(n+1) .

> b := [[n, n/(n+1)] $n=1..10];

b := [[1, 1/2], [2, 2/3], [3, 3/4], [4, 4/5], [5, 5...

> plot(b, x=0..12, style=point);

[Maple Plot]

Notice that the sequences a and b behave quite differently for large n : the sequence a grows without bound, while b appears to approach a finite value. We can confirm this by plotting b for more values of n .

> plot([[n, n/(n+1)] $n=1..100], x=0..100, y=0..2, style=point);

[Maple Plot]

It now seems clear that, as n becomes large, the terms b_n = n/(n+1) approach 1. (This should also be clear from algebra: when n is very large, the '+1' in the denominator makes very little difference, so the fraction should be approximately the same as n/n = 1 .)

In an example such as sequence b , where the general term approaches a fixed, finite, number L as n becomes large, we say the sequence converges to L , or has a limit of L , and we write

limit(b_n,n = infinity) = L .

Otherwise, we say that the sequence diverges , or that the limit does not exist. For example, we have seen above that

limit(n/(n+1),n = infinity) = 1 , but that limit(n^2,n = infinity) does not exist.

>

Question 2

Graph the sequences whose general terms are given by the following expressions, and determine whether or not they converge. If they do, try to find the limit. (You might try to guess the answers before drawing the graphs; they are not all obvious.)

(a) (-1)^n (b) (1+1/n)^n (c) (1+2/n)^n (d) (1-1/n)^n

(e) sqrt(n+1)-sqrt(n) (f) sqrt(n^2+n)-n (g) sin(n)

Solutions.

> plot([[n, (-1)^n] $n=1..20], x=0..20, style=point);

[Maple Plot]

Sequence (a) does not converge: the terms bounce back and forth between 1 and -1, and do not approach any fixed number.

> plot([[n, (1 + 1/n)^n] $n=1..30], x=0..30, style=point);

[Maple Plot]

Sequence (b) appears to converge to a limit which is approximately 2.7. (Actually, this sequence converges to the number e , which is approximately equal to 2.7182818285.)

> plot([[n, (1 + 2/n)^n] $n=1..30], x=0..30, style=point);

[Maple Plot]

This sequence appears to converge to a limit of approximately 7. (The exact limit is in fact e^2 .)

> plot([[n, (1 - 1/n)^n] $n=1..30], x=0..30, style=point);

[Maple Plot]

Sequence (d) again appears to converge. (This time, the exact limit is e^(-1) ; do you begin to see a pattern?)

> plot([[n, sqrt(n+1) - sqrt(n)] $n=1..30], x=0..30, style=point);

[Maple Plot]

Sequence (e) appears to converge to 0. This is an interesting example: the general term in the sequence is the difference of two large numbers (if n is large), but it is not the numbers sqrt(n+1) or sqrt(n) individually that count, but their difference; and the difference does indeed go to 0. The next example shows that it is not always obvious when such a difference will go to 0.

> plot([[n, sqrt(n^2 + n) - n] $n=1..30], x=0..30, style=point);

[Maple Plot]

In this case, we again have the difference of two large numbers. A reasonable approach to understanding this limit would be to say that if n is large, then n^2 is much bigger than n , and so we should be able to ignore the term n under the square root. This would mean that the general term (for large n ) should look like sqrt(n^2)-n = 0 . As you can see from the graph, this argument is wrong! In fact, this sequence converges to 1/2. (The explanation for this fact is in Section 10.11 of Stewart: the Binomial Series.)

> plot([[n, sin(n)] $n=1..30], x=0..30, style=point);

[Maple Plot]

This sequence is actually the hardest of all to understand rigorously, but it certainly looks from the graph as if it does not converge. (This is in fact the right answer.) There doesn't seem to be any pattern developing, however, that makes the divergence obvious. We could try plotting a few more terms of the sequence:

> plot([[n, sin(n)] $n=1..100], x=0..100, style=point);

[Maple Plot]

There are more points plotted, but still nothing obvious that will confirm the divergence. In fact, this sequence will never settle down to any "simple" behaviour, such as bouncing between two values: no matter how many points you plot, the picture will look somewhat like the ones above.

Of course, Maple can compute limits algebraically:

> limit(n/(n+1), n=infinity);

1

>

Question 3

Use the limit command to verify your results from Question 2. Use it on each sequence, even the ones you thought were divergent, so that you can see how Maple indicates that the limits do not exist.

Solutions. Here are Maple's computations of the seven limits, in order.

> limit((-1)^n, n=infinity);

-1 .. 1

We saw in Question 2 that this sequence bounces back and forth between 1 and -1, so it has no limit. Maple gives the "limit" as a range: between 1 and -1. Since Maple has not given the limit as a single number, you should conclude from this output that the limit, as defined in class, does not exist.

> limit((1 + 1/n)^n, n=infinity);

exp(1)

It appears that Maple is aware of the relation between this sequence and the number e . What about the other variations?

> limit((1 + 2/n)^n, n=infinity);

exp(2)

> limit((1 - 1/n)^n, n=infinity);

exp(-1)

Hmmm...what about the general pattern? (Just in case x was assigned a value elsewhere in the worksheet, let's unassign it first.)

> x := 'x';

x := 'x'

> limit((1 + x/n)^n, n=infinity);

exp(x)

Interesting! Apparently, the exponential function can be computed as the limit of a sequence.

> limit(sqrt(n+1) - sqrt(n), n=infinity);

0

> limit(sqrt(n^2 + n) - n, n=infinity);

1/2

These two limits are consistent with what we saw in Question 2.

> limit(sin(n), n=infinity);

-1 .. 1

As in the first sequence, Maple indicates this sequence does not converge by giving a range.

>

>

Warning: In this worksheet, we have not discussed the rigorous definition of limit, which is written in a box on page 580 of Stewart. You will be expected to know this definition, and to be able to use it to show that simple limits exist.