EC 313 Spring 2000 Problem Set 1

Christopher F. Baum

Due Thursday 17 February 2000 at classtime

Produce a Mathematica notebook containing the answers to these questions, label it with your name, and email it (as an email attachment) to baum@bc.edu to submit your problem set. Where you are asked to say something about the results, put your comments in a cell of type "text" (that is, on the Format menu, select Style->Text). If you have any questions, please send me email.

1. a. Plot the sine(x) function over the range {-2 Pi, 2 Pi}.

b. The function Nest[] allows a function to be embedded within itself to an arbitrary depth. Plot the sine(x) function, nested 5 times, over the same interval.

c. Plot the sine(x) function, nested 100 times and 1000 times, over the same interval. What is happening to the function in terms of both shape and amplitude?

2. a. Define a function f[x_], equal to 1/(1+x). The function NestList[] allows a function to be embedded within itself to an arbitrary depth, but returns a list of the successive evaluations. Apply NestList[] to your function f[] 6 times, using x as the expression to which the function should be applied.

b. Apply NestList to your function 20 times, using the number 1 as the starting expression. What pattern is evident in the numerators and denominators of the resulting fractions?

c. Apply NestList to your function 50 times, using the number 1 as the starting expression, and get the numerical evaluation of the result (using the N[] function). Does the sequence converge? How do these results relate to the so-called "golden ratio"? (hint: ask Mathematica about GoldenRatio).

3. a. Use the Table[] function to produce a table of x raised to the power i for i = 0 through 9.

b. Use Table[] and TableForm[] to produce a nicely formatted table of the product of (x-j) for i = 0 through 5 and j = 0 through i.

c. A Vandermonde matrix V(i,j) has elements defined as x(i)^j. Display a 5 by 5 Vandermonde matrix for x, with i = 1 through 5 and j = 0 through 4.

d. Calculate the symbolic determinant of this matrix (using Det[]) and use Factor[] to make it friendlier. Is there a discernable pattern?