Find the work necessary to compress or stretch a spring