MATH 257H Calculus III								Week of March 31, 2003
Lab 1: Warming up with Sequences
Name 1
Name 2
Section:

The purpose of this lab is to get used to dealing with sequences in Mathematica.  We'll practice 
	(1) defining sequences, 
	(2) graphing them, and 
	(3) using Mathematica to compare rates of growth of some classic sequences.

The Rules:  	• You'll work in PAIRS, handing in one assignment for the both of you.  
		• At the end you'll "hand in" a Mathematica notebook for your lab report.  You'll do this by uploading
		  it into Blackboard's Digital Drop Box for this course.  


Here we go now...

First, Who Are You?

Question 1: Have each person in your group tell me a little something about yourselves.  You might find it easier to type sentences and such in Mathematica by selecting the text-block handle over there on the right, and going to the menu Format-> Style and choosing Text.
	What should you tell me?  What year are you?  What's your major?  How do you like math?  Does Mathematica give you the heebie-jeebies or does it totally rock?  (Or both?)  Or tell me anything else that will help me remember who you are.
	(Write your response to this question in the below text block.)

Defining and Graphing Sequences
Suppose we want to examine the sequence (Subscript[a, n]) = ((3  (n^2))/(Sin[n] +  (n^2))).  You do this in Mathematica by actually defining a function a[k_].  Type in and excucute the following

\(\(\(
\)\(a[n_] := \(3*n^2\)\/\(Sin[n] + n^2\)\)\)\)

Now you can get Mathematica to tell you what a[1] is or a[2], or whatever.  Try it!

a[2]

Notice that this isn't very useful.  If you want Mathematica to give you a decimal answer, use the numerical N[ ] command:

N[a[2]]

or

a[2] // N

But that's not much fun.  It's much more interesting to make Mathematica plot the values of a[n] for you.  Try this:

ListPlot[Table[a[n],  {n, 1, 20}]]

ListPlot and Table are great commands to use for visualizing the values of a sequence.  Go ahead and try plotting (Subscript[a, k]) from 1 to 50 or higher to see what happens.

Question 2:  From this graph, what do you think the sequence (Subscript[a, n]) converges to?  Why?  Explain your reasoning in a complete sentence.

Other things to try:  
	• Notice how ListPlot sometimes ignores the first few terms of the sequence.  It does this
	  because it tries to make the plot look pretty.  You can force it to show all the proper values
	  by adding PlotRange->{{xmin, xmax},{ymin, ymax}} at the end of the ListPlot command.
	  (For example, ListPlot[ blah blah  , PlotRange->{{0,20},{0,4}}] or something like that.
	  
	• You can also see what sequences do using the Limit command.  Like, you can try 
	  Limit[a[n], n->Infinity]   which should make Mathematica try to figure out what this limit is.

Question 3:  Define the sequence (Subscript[b, n])=(((-1)^n * n)/(n^3  -  Log[n]))  .  Graph it using ListPlot.  What does it go to as n-> Infinity?

Comparing Sequence Rates of Growth
This is where we ask the question, "which grows faster, ln(n) or n?" and stuff like that.

Logarithmic Growth versus Polynomial Growth: Try entering the following into Mathematica:

Clear[a, b]
a[n_] := Log[n]
b[n_] := n
ListPlot[Table[ a[n]/b[n] , {n, 1, 100}], 
      AspectRatio -> 1]
ListPlot[Table[ a[n]/b[n], {n, 100, 200}], 
      AspectRatio -> 1]

Question 4: Describe, in your own words, what these graphs are showing you.  From n=100 to n=200, how much does a[n] increase (roughly)?  How much does b[n] increase?  Try other ranges, like n=500 to 600 or n=1000 to 1100.  What does this say about the rate of growth of a[n] compared to b[n]?

\(
\)

Polynomial Growth versus Exponential Growth: Now try comparing (Subscript[a, n])=(n^5) and (Subscript[b, n]) = (2^n) :

Clear[a, b]
a[n_] := n^5
b[n_] := 2^n
ListPlot[Table[a[n]/b[n], {n, 1, 50}],  
      AspectRatio -> 1]

Question 5: How come this sequence isn't monotonic?  Explain why.  Try other ranges of n, like in the previous problem.  Based on what you see, compare ploynomial growth to exponential growth.

\(
\)

Exponential Growth versus Factorial Growth: 
Now try comparing (Subscript[a, n]) = (5^n) and (Subscript[b, n]) = n!   You do the Mathematica code yerself this time.

Question 6: Make some graphs and explain, in words, how you compare exponential growth to factorial growth.

\(
\)

Factorial Growth versus Super-Exponential Growth: 
This time let (Subscript[a, n]) = n! and (Subscript[b, n]) = (n^n).

Question 7: How do you compare factorial growth with super-exponential growth?

\(
\)

Super-Exponential Growth versus Quadratic Exponential Growth: 
Heh heh.  Let (Subscript[a, k]) = (k^k) and (Subscript[b, k]) = ((((2^k)))^2).

Question 8: Who wins this time?

\(
\)

Lastly, do you know how to do Series in Mathematica?
Question 9: See if you can compute \(TraditionalForm\`∑\+\(n = 1\)\%∞ n\^2\/\((\ 2\^n)\)\^2\) using the Sum[] command!  (If you don't know the Sum[] command, just type ?Sum and evaluate it.)

Question 10: In Question 3 we defined a sequence (Subscript[b, n]) = (((-1)^n * n)/(n^3  -  Log[n])).  Let S[n] = the nth partial sum of (∑_(n = 1)^∞) (Subscript[b, n]). Make a ListPlot for S[n].  What does S[n] converge to?  Could the Sum command have done this for us?

Now that you're done, 
	(1) 	Clean up your work by deleting everything that's not needed.  
		There should only be the title, your names, section number, and the answers to your questions
		(with any needed explanations, graphs, etc.).
	(2) 	Save this to your disk.
	(3)	Go back to Blackboard and upload your final lab report to the Digital Drop Box, located
		in the User Tools area.