Example in Nuclear Physics
Problem Statement:
A radioactive substance undergoes exponential decay, which can be described by the equation:
$$
N(t) = N_0 e^{-\lambda t}
$$
- $N(t)$ is the number of undecayed nuclei at time $t$.
- $N_0$ is the initial number of nuclei.
- $\lambda$ is the decay constant.
- $t$ is time.
The half-life ($T_{1/2}$) of the substance is related to $\lambda$ by:
$$
T_{1/2} = \frac{\ln(2)}{\lambda}
$$
Task:
- Simulate radioactive decay for a sample of $1000$ nuclei over $10$ half-lives.
- Plot the number of remaining nuclei as a function of time.
- Verify that at $T_{1/2}$, half of the original nuclei remain.
Python Implementation
Below is the $Python$ code to solve and visualize the decay process.
1 | import numpy as np |
Explanation of the Code
Initialization:
- The initial number of nuclei is set to $1000$.
- The half-life is defined as $5$ arbitrary time units.
- The decay constant $\lambda$ is calculated using $\lambda = \ln(2)/T_{1/2}$.
Simulation:
- Time is generated as an array from $0$ to $10$ half-lives.
- The number of remaining nuclei is computed using the exponential decay formula.
Visualization:
- A plot is generated showing the decay curve.
- A vertical dashed line marks $T_{1/2}$.
- A horizontal dashed line marks $N_0/2$, verifying that half of the nuclei remain at $T_{1/2}$.
This provides a clear illustration of radioactive decay over time.