8.1 Sequences

Mathematica script by Chris Parrish,
   cparrish@sewanee.edu

Sources and references for some of these problems include
    James Stewart, "Calculus: Concepts and Contexts," Second Edition, Brooks/Cole, 2001
    Deborah Hughes-Hallett, Andrew M. Gleason, et. al., "Calculus," Second Edition, John Wiley & Sons, 1998
    Robert Fraga, ed., "Calculus Problems for a New Century," The Mathematical Association of America, 1993
    Selwyn Hollis, "CalcLabs with
Mathematica" for Stewart's "Single Variable Calculus, Concepts and Contexts, Second Edition," Brooks/Cole, 2001
    
Credits: In these examples we follow a programming style used by
Selwyn Hollis in "CalcLabs with Mathematica," Chapter 7, "Sequences and Series."

Sequences

Reference: In these examples we follow a programming style used by Selwyn Hollis in "CalcLabs with Mathematica," Chapter 7, "Sequences and Series."

The Mathematica command "Table" can be used to generate sequences whose elements are described by an explicit formula.

In[31]:=

<<Graphics`Colors`

In[32]:=

Clear[a, n, seq]  a[n_] := 1 - 1/n seq = Table[a[n], {n, 20}]  RowBox[ ... ;       , PlotLabel->"a[n] = 1 - 1/n"}], ]}], ;}]

Out[34]=

{0, 1/2, 2/3, 3/4, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10, 10/11, 11/12, 12/13, 13/14, 14/15, 15/16, 16/17, 17/18, 18/19, 19/20}

[Graphics:HTMLFiles/8.1_sequences_4.gif]

Use the "Limit" command to take the limit of a sequence.

In[36]:=

Limit[a[n], nInfinity]

Out[36]=

1

Inductive Sequences

Inductive sequences are defined by specifying a base element, and giving a rule which tells how to generate the next element in the sequence from the previous element.
The "NestList" command handles the application of the inductive formula to generate the elements of the sequence.

In[37]:=

Clear[a1, g, x, indSeq]  a1 = 1 ;  g[x_] := (x + 6)/2 indSeq = NestLis ... 2754;,  , RowBox[{{, RowBox[{RowBox[{PointSize, [, 0.02, ]}], ,, BurntSienna}], }}]}]}], ]}], ;}]

Out[40]=

{1, 7/2, 19/4, 43/8, 91/16, 187/32, 379/64, 763/128, 1531/256, 3067/512, 6139/1024, 12283/2048 ... 16384, 196603/32768, 393211/65536, 786427/131072, 1572859/262144, 3145723/524288, 6291451/1048576}

[Graphics:HTMLFiles/8.1_sequences_9.gif]

Illustrative Problems from Stewart, Section 8.1

Exercise  8.1.31

In[42]:=

Clear[a, n, seq]  a[n_] := n^3/Factorial[n]  seq = Table[a[n], {n, 20}] ᡝ ... ntSize, [, 0.02, ]}], ,, GeraniumLake}], }}]}], ,, , PlotRange {0, 3}}], ]}], ;}]

Out[44]=

{1, 4, 9/2, 8/3, 25/24, 3/10, 49/720, 4/315, 9/4480, 5/18144, 121/3628800, 1/277200, 169/47900 ... 59072, 1/5108103000, 289/20922789888000, 1/1097800704000, 361/6402373705728000, 1/304112751022080}

[Graphics:HTMLFiles/8.1_sequences_12.gif]

Exercise   8.1.35

In[46]:=

Clear[a1, g, x, indSeq]  a1 = 1 ;  g[x_] := 4 - x indSeq = NestList[g, ... 54;,  , RowBox[{{, RowBox[{RowBox[{PointSize, [, 0.02, ]}], ,, LightSeaGreen}], }}]}]}], ]}], ;}]

Out[49]=

{1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1}

[Graphics:HTMLFiles/8.1_sequences_15.gif]

In[51]:=

b1 = 2 ;  g[x_] := 4 - x indSeq = NestList[g, b1, 20]  RowBox[{RowBox[ ... 54;,  , RowBox[{{, RowBox[{RowBox[{PointSize, [, 0.02, ]}], ,, LightSeaGreen}], }}]}]}], ]}], ;}]

Out[53]=

{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}

[Graphics:HTMLFiles/8.1_sequences_18.gif]

Exercise   8.1.38

In[55]:=

Clear[a1, g, x, indSeq]  a1 = 2^(1/2) ;  g[x_] := (2 x)^(1/2)  indSeq  ... 754;,  , RowBox[{{, RowBox[{RowBox[{PointSize, [, 0.02, ]}], ,, MidnightBlue}], }}]}]}], ]}], ;}]

Out[58]=

{2^(1/2), 2^(3/4), 2^(7/8), 2^(15/16), 2^(31/32), 2^(63/64), 2^(127/128), 2^(255/256), 2^(511/ ... 2^(131071/131072), 2^(262143/262144), 2^(524287/524288), 2^(1048575/1048576), 2^(2097151/2097152)}

[Graphics:HTMLFiles/8.1_sequences_21.gif]


Created by Mathematica  (May 5, 2004)