(N/A) For a particle in simple harmonic motion $(SHM)$,the displacement is given by $x = A \cos(\omega t + \phi)$.
$1$. Kinetic Energy $(K)$:
The velocity is $v = \frac{dx}{dt} = -A\omega \sin(\omega t + \phi)$.
$K = \frac{1}{2}mv^2 = \frac{1}{2}m(-A\omega \sin(\omega t + \phi))^2 = \frac{1}{2}m\omega^2 A^2 \sin^2(\omega t + \phi)$.
Since $k = m\omega^2$,$K = \frac{1}{2}kA^2 \sin^2(\omega t + \phi)$.
$2$. Potential Energy $(U)$:
The restoring force is $F = -kx$. The work done against this force to displace the particle by $dx$ is $dU = -F dx = kx dx$.
Integrating from $0$ to $x$,$U = \int_0^x kx dx = \frac{1}{2}kx^2$.
Substituting $x = A \cos(\omega t + \phi)$,$U = \frac{1}{2}kA^2 \cos^2(\omega t + \phi)$.
$3$. Total Energy $(E)$:
$E = K + U = \frac{1}{2}kA^2 \sin^2(\omega t + \phi) + \frac{1}{2}kA^2 \cos^2(\omega t + \phi)$.
$E = \frac{1}{2}kA^2 (\sin^2(\omega t + \phi) + \cos^2(\omega t + \phi)) = \frac{1}{2}kA^2$.