1.3. Exercises

1.3.1. Numerical Estimation of \(\pi\)

  1. How do you calculate \(\pi\) using the ratio of points that fall within the circle and square? Use a full circle for your computation. Complete either the Python or C++ Monte Carlo program to calculate \(\pi\) using this integration technique . Include the entire code within your report or attach as the code files to your submission and comment upon the lines of code that you wrote in the report.

  2. Perform the \(\pi\) estimation for 1000, 100,000 and 1,000,000 trials. Take a screenshot of these estimations and include them in your report (e.g of the python plots). What happens to the accuracy of the \(\pi\) estimation when going from 1000 to 1,000,000 trials and why?

  3. What happens if you use the same seed for the pseudo random number generator (PRNG? You can read up more details in Appendix: Random and Pseudo-random Numbers. In Python the seed is set using r.seed(), in C++ the seed is set using srand(time(NULL));.

  4. What happens to the estimation of \(\pi\) when the circle origin is changed? Why?

  5. What happens to the accuracy of the estimation when you increase the square size, or decrease the circle size? Is there an optimal ratio?

1.3.2. From Quantum to Classical Mechanics

  1. Prove the Hellmann-Feynman theorem, (1.2).

  2. Bonus: Explain the Born-Oppenheimer approximation in your own words. You do not have to use any equations (but you may if you wish).