PHYS 306: Computational Physics Lab
Winter 2009
Homework #1
(Due: February 10, 2009)
- Do in-class exercise 3.1. Turn
in your programs, as well as all requested output and graphs.
- Write a program to generate
points
distributed according to the (unnormalized) distribution
for
. Draw a properly normalized histogram of
the points
with binning interval 0.05, and compare
it to the normalized
by plotting it on the same graph.
- Use Monte-Carlo integration to estimate the volume contained
within a sphere of radius 1 (
) that also lies
below the plane
(i.e.
) and
above the plane
. Perform your calculations with
random points in the volume under consideration, for
, and
. Turn in your
program and the results of the integration (i.e. your estimate
of the volume), along with an error estimate, for each value
of
.
- Click here for a Postscript version of this document.
Steve McMillan
2010-04-22