Step 1: Establish the potential energy formula for S.H.M. The potential energy \( PE \) is defined as \( PE = \frac{1}{2} m \omega^2 x^2 \), where \( m \) denotes the particle's mass, \( \omega \) is the angular frequency, and \( x \) represents the displacement. According to the problem statement, the potential energy is \( PE = 0.1 \pi^2 x^2 \). Equating these two expressions yields \( \frac{1}{2} m \omega^2 x^2 = 0.1 \pi^2 x^2 \). Canceling \( x^2 \) from both sides results in \( \frac{1}{2} m \omega^2 = 0.1 \pi^2 \). Substituting \( m = 20 \, \mathrm{g} = 0.02 \, \mathrm{kg} \) gives \( \frac{1}{2} (0.02) \omega^2 = 0.1 \pi^2 \). Simplifying this equation leads to \( 0.01 \omega^2 = 0.1 \pi^2 \), and subsequently \( \omega^2 = 10 \pi^2 \).
Step 2: Determine the angular frequency and frequency. Taking the square root of \( \omega^2 = 10 \pi^2 \) yields \( \omega = \sqrt{10 \pi^2} = \pi \sqrt{10} \). The relationship between frequency \( f \) and angular frequency \( \omega \) is \( f = \frac{\omega}{2 \pi} \). Substituting \( \omega = \pi \sqrt{10} \) into this formula gives \( f = \frac{\pi \sqrt{10}}{2 \pi} = \frac{\sqrt{10}}{2} \). Using the approximation \( \sqrt{10} \approx 3.162 \), the frequency is calculated as \( f = \frac{3.162}{2} = 1.581 \, \mathrm{Hz} \). Therefore, the frequency of S.H.M. is \( \mathbf{1.581 \, \mathrm{Hz}} \).