CSE541 Homework #7

Answers to programming questions
Answer to 7.2.14 (pdf)
Answer to 8.1.2 - A (pdf)
Answer to 8.1.2 - B (pdf)

Due Date: Tuesday, Mar. 6

FINALIZED


GENERAL INSTRUCTIONS


PROGRAMMING ASSIGNMENT

Write a program that will:

To get you started, here is a program and makefile that implements integration estimation by uniform sampling and prints out the result.


QUESTIONS

On the due date, at the beginning of class, hand in hardcopy of

  1. (25%) Problem 7.2.14 from the book, 5th edition [see problems (pdf)]

  2. (25%) Problem 8.1.2 from the book, 5th edition [see problems (pdf)]

  3. (50%) Include a printout of the relevant program results, as described above, and answer the following questions:

    1. For a given seed value, for each of the functions, find the number of points needed to be within 0.0001 of the correct answer (within an order of magnitude - for example, 10,000 points v. 1,000 points)

    2. For each of the functions, Try different seeds and comment on the dependence of the results on the see value.

    3. For each of the functions, compare integration using uniform sampling to integration using Monte Carlo integration for various numbers of points and comment on which is best for which function and why.

    4. For function 2, basically sin(100*pi*x), what choice for number of points could be bad for the uniform sampling estimate to the integral?

SPECIFIC INSTRUCTIONS

With respect to the lab assignment,


NOTES