x1 = initial stretch of the spring
x2 = final stretch of the spring
Figure 6-18 graphs the force that you exert as a function of the distance x that the spring has been stretched. If the spring is initially stretched a distance x1 and you stretch it further to x2, the work W that you do is equal to the area of the colored trapezoid in Figure 6-18. From geometry, this area is equal to the average height of the graph multiplied by the width x2−x1. Equation 6-12 can be simplified to: