contestada

The formula for elastic potential energy is (1/2)kx², all that I am asking is why is it not kx²? Here is my logic. Let us say that k is 2 N/m which means that for the spring to move 1 meter you have to apply 2 N of force, if you want to move the spring 2 meters, then you have to apply 2N and then 2 N again, so the work should be 2N×4m=8J. Where did I go wrong?