Explanation:
The restoring force acting on the particle in SHM,
\(F = - kx\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(1)\)
The potential energy in SHM, \(E = \frac{1}{2}k{x^2}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,(2)\)
From eq.(1) and (2), we get
\(\begin{aligned}& E=\dfrac{1}{2} \times\left(\dfrac{-F}{x}\right) \times x^{2}=-\dfrac{F x}{2} \\& \Rightarrow \dfrac{2 E}{F}+x=0\end{aligned}\)