The potential energy in an elastic string of force constant K which has been extended…