Problem 28			Due 4/23/01

	In this problem we use Monte Carlo integration to study the 
internal energy of a gas.  Consider a box which is 10 Angstroms 
on a side (1e-9m).  We place inside this box three molecules of 
methane.  The internal energy of the molecules depends on 
their relative configuration.  If they are closer together, they 
have a higher energy than if they are further apart.  We may 
calculate the average internal energy of the molecules by 
integrating over configuration space, the space of all possible 
configurations.  In this case, because we have three particles (and 
three directions) this is a nine-dimensional integral.  It is thus 
very well suited to the Monte Carlo integration approach.

	We shall take the molecules as points, and approximate the 
energy of interaction with the Lennard-Jones 6-12 potential.  The 
potential energy between each pair of molecules a-b is thus:

Uab = A/r^12 - B/r^6

where r is the distance between molecule a and molecule b.

The quantites A and B are given by:

A = 4 eps * sigma^12

B = 4 eps * sigma^6

For methane the quantities sigma and eps are given by:

eps = 147.95 deg K * k   (k is Boltzman's constant)

sigma = 3.73 Angstroms

The total internal energy of the configuration is the sum of the 
energy of each interaction (ab, ac, bc).

The probability of a particular configuration occuring is 
proportional to exp(- beta U) where U is the total internal energy, 
and beta is 1/(kT) where T is the absolute temperature.

The average internal energy is thus just the ratio:

ave U = integral ( U * exp (-beta*U)) / integral ( exp (-beta*U))

This is three times the average internal energy of each molecule.  
The integral is over all possible configurations of the three 
particles.

	So now we come to the problem:  Calculate, using Monte 
Carlo integration, the average internal energy of each methane 
molecule at T = 273K to an accuracy of 1%.  This means you will 
need to compute both the average and the standard deviation of 
your result.

	The easiest way to solve this is to write a program which
calculates the internal energy and the error for a set number of
points in the integration.  Then using this information, you can
determine how many points are required for the desired accuracy.
I found that about 10^3 was a good number for the initial estimate,
with the final number required being somewhat higher than this
amount.

	As a final note, remember the covariance between the 
numerator and the denominator in the ratio used in calculating the
internal energy!  This significantly reduces the error in the 
calculation!