Step 1: Use the force constant:
The effective spring constant is $k_{eff} = m\omega^2$ and $U = \frac12k_{eff}x^2$.
Step 2: Find k_eff:
$\omega^2 = (2\pi f)^2 = 4\pi^2\cdot\frac{Ka}{\pi m} = \frac{4\pi Ka}{m}$, so $k_{eff} = 4\pi Ka$.
Step 3: Compute U:
$U = \frac12(4\pi Ka)x^2 = 2\pi Ka\,x^2$.
Step 4: Match:
Option (C) agrees.
Step 5: Check the dimensions:
The potential energy $\frac12 m\omega^2x^2$ has the dimensions of energy. Since $\omega^2 = 4\pi Ka/m$, the result $2\pi Kax^2$ equals $\frac12 m\omega^2x^2$, so mass cancels out and the dimensions are right.
Final Answer:
$2\pi Kax^2$, option (C).
\[ \boxed{2\pi Kax^2 \text{ (C)}} \]