Next: 3. Variational Monte Carlo
Up: Computational Physics 210: Homework
Previous: 1. Discrete Numerical Derivatives.
Ref.: S. E. Koonin
and D. C. Meredith, Computational Physics (1990; out of print).
Use Monte Carlo methods (random point sampling) to do the integral
 |
(5) |
in two ways.
simply and naively, with weight function w(x) = 1. Also,
accumulate the uncertainty.
with importance sampling, using the weight function
 |
(6) |
which is non-negative, is normalized properly
(average is unity) and weights smaller values
of x more heavily than larger values in the interval (0,1).
N.B. When you calculate
 |
(7) |
and invert to get x(s), be sure to choose the correct root.
Use N points for both integrals, with N = 10, 30, 100, 300, 1000, 3000,
10000. Write out the error (relative to the exact analytic value)
in columnar form to facilitate easy comparison of the accuracy of the
two methods. Write out also the statistical uncertainty
for
each calculation, and check whether the answer is within
of
the correct answer.
Next: 3. Variational Monte Carlo
Up: Computational Physics 210: Homework
Previous: 1. Discrete Numerical Derivatives.
root
2000-10-23