ps7_sol - MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING 2.370/2.37 Molecular Mechanics Fall 2007 PROBLEM SET 7 Solution 1. The algorithms for all methods were given in class; this solution will focus mainly on those aspects other than implementation issues. (a) As expected from class, the convergence rate for trapezoidal integration is 1 /N 2 , as shown by the slope of − 2 on a log-log plot. Note that if more divisions were used, roundoff error would become significant, so the level of error would saturate. In my experiments, this saturation occured at an error level of about 10- 12 . (b) A convergence plot for the 4 methods is shown in figures 1 and 2. As many of you noticed while doing this problem set, figure 1 shows very noisy results for Monte Carlo integration. The expected amount of error decreases as 1 / √ N ( N is the number of samples), but the computed error fluctuates significantly, sometimes even increasing as the number of samples increases. If this figure was redone, the results would be different, oweing to the use of different random numbers. One way to get around this problem is illustrated in figure 2. For this figure, I performed the integration many times for each N (each of these runs is referred to as an ensemble). The average of these ensembles gives a much smoother result, with the correct 1 / √ N convergence rate. (c) Importance sampling is most effective when the function to be integrated ( f ( x )) is close to a constant multiple of the probability distribution p ( x ) used to generate the points. Thus, a sin distribution would be optimal. However, actually using a sinusoidal distribution is not useful for this problem. Consider a trial p ( x ) = c × sin( x ) for 0 < x < π and 0 otherwise. The constant c is determined from the constraint that p ( x ) is normalized ( R p ( x ) dx = 1)....
View Full Document

This note was uploaded on 10/06/2011 for the course MECHANICAL 2.37 taught by Professor Hadjiconstantinou during the Fall '07 term at MIT.

Page1 / 10

ps7_sol - MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online