Next: Monte Carlo Integration
Up: Problem: Spontaneous Decay Simulation
Previous: Method Numeric
Write a program to simulate radioactive decay.
-
Have as input Nnuc the total number of nuclei and lambda
the decay rate.
-
Input several values of Nnuc, increasing from a small value
like 10, which should show large statistical fluctuations,
to large values like 10000, which should exhibit exponential
decay.
-
Plot the remaining number of nuclei versus the time parameter). Also plot the
natural logarithm of the number of nuclei versus time to see the approach to
exponential decay.
-
Change your program so it records the decay rate (number of decays per cycle).
How does this depend on time?
Some source code available in:
C,
FORTRAN
A plot and a
sound file showing a possible result.
Next: Monte Carlo Integration
Up: Problem: Spontaneous Decay Simulation
Previous: Method Numeric