Elastic potential energy: It is the energy of an object associated with the state of extension or compression.
For a spring, E=,
For a wire: if the weight is suspended from a wire of length L having area of cross-section =A, then the elastic potential energy per unit volume =