Homework 2: assigned Thu Feb 2, due Thu Feb 9 (11:59 pm); extended to Feb 14 ***AT 5 P.M.***

Change in policy: please submit all homework on paper -- give it to me in person or leave it under my door (WWH 429), not in my mailbox. If you cannot submit the hard copy by the deadline, you can submit an email copy to s70421g1@cs.nyu.edu by the deadline and follow it up by submitting hard copy the next day that you are on campus. The email copy and the hard copy must match.

Ground rules for homework: if necessary, you can get help from any source (friends, classmates, books, the web) but you must acknowledge the source in your submission. Penalty for not reporting your sources : grade of zero for the homework. Penalty for late homework: 20%. Homework will not be accepted more than one week late.

If you have any questions about homework, please email me, not the grader. Also, you may send questions to the class mailing list, and suggestions for trouble-shooting (but not homework solutions!) may be posted there too.

Exercises from my book: Ex 6.4, 6.8, 7.1, 7.2, 7.4, 7.5, 7.6, 7.8, 11.1, 12.1, 12.7, 13.3, 13.4. Even if the exercise does not call for this, explain why your answers make sense!

For Ex 11.1, you can modify the C program which is here, or you can rewrite it in Matlab. You don't need to include the program listing, just the results.

For Ex 13.4, use the following clarification. For part 1, you don't need to refer to Ex 12.3; instead refer to the Taylor expansion of exp(x) on the next page. For parts 2 and 3, it's easier to use Matlab instead of C and to combine these parts together. The question is whether computing f(x) by the statement "exp(x) - 1" is unstable, compared to using the function expm1 (type "help expm1"), which simply approximates the Taylor series on the next page without including the leading one. For what values of x is "exp(x) - 1" unstable? How many accurate digits does it give in specific examples, using the default double precision? You do not need to turn in Matlab code for this, just summarize your observations.

Note: the exercise numbers are from the 2004 printing. They are the same as in the 2001 printing, except 7.8 which is not in the 2001 printing. The copy of the book on the website is the 2004 printing.