Solution:
Given:
[tex]\begin{gathered} F=1000N \\ \text{original length, l}_0=2m \\ \text{final length, l}_f=5m \end{gathered}[/tex]
The work done by an elastic material is given by;
[tex]\begin{gathered} W=\frac{1}{2}Fe \\ \text{where;} \\ e\text{ is the extension} \\ e=l_f-l_o \\ e=5-2=3m \\ \\ \text{Hence, the work done is;} \\ W=\frac{1}{2}Fe \\ W=\frac{1}{2}\times1000\times3 \\ W=\frac{3000}{2} \\ W=1500J \end{gathered}[/tex]
Therefore, the work done to compress the spring is 1500J