The potential energy of a weight less spring compressed by a distance a is proportional to
a
a2
a-2
a0
Potential energy of spring = 12Kx2∴PE∝x2 ⇒PE∝a2