Consider a spring being extended by a steadily increasing force.
When the force has a magnitude F, the extension is x, as in the diagram
below. 








A graph of force against extension is found to be a straight line passing
through the origin, as long as the elastic limit of the spring has not
been exceeded. 

Therefore we can write 

F α
x 



This means that, during the process of extending the
spring, the magnitude of the average force exerted was F/2. 







The slope of the graph is k, the elastic constant of the spring. 

Therefore we can write 



NB In some situations, for example in the section on simple harmonic motion, you might see 



This is perfectly reasonable if we consider F to represent
the force with which the spring reacts when it is extended by some external
agent. 



The work done stretching the spring depends on the average force
exerted on
it 





and, putting these two equations together gives 



The potential energy stored in a body, by virtue of
its position or its state (in this case, its state of having been
stretched) is simply equal to the work done putting it in that state
or position. 

Therefore, we can write 



Notice, from the equation w = ½Fx, that the work done stretching the spring is
represented by the area under the graph of F against x.




This can be useful to know in cases where the graph is not a straight line. 
