The compression curve would be theoretically given for a system of bodies in which the spring applies the force (Although in the same way the following process can be extrapolated to any system, depending on the type of Force to consider) For a spring mass system, the strength is given by Hooke's law as
Where,
K = Spring constant
x = Displacement
If we integrate based on distance we would have
This integral represents the area under the Force Curve based on each distance segment traveled.
This is the same formula that represents the elastic potential energy of a body. Therefore the correct answer is D.