Answer :
The average force can be calculated as F/2, where
F = kx
Therefore, substituting this in to the equation for energy:
Energy = Force * Distance
Energy = F/2 * x
Energy = kx/2 * x
Energy = 1/2 kx^2
F = kx
Therefore, substituting this in to the equation for energy:
Energy = Force * Distance
Energy = F/2 * x
Energy = kx/2 * x
Energy = 1/2 kx^2