Is the work done by external constant force = to potential energy stored in the spring.
i.e. $Fx=\tfrac{1}{2}Kx^2$
But we know $F=kx$ but then $Fx = Kx^2$
Is the work done by external constant force = to potential energy stored in the spring.
i.e. $Fx=\tfrac{1}{2}Kx^2$
But we know $F=kx$ but then $Fx = Kx^2$
A differential amount of work is
$$dw=F.dx$$
If $F$ and $x$ are in the same direction as in the case of the spring, then the amount of work done in compressing the spring is
$$W=\int F.dx=\int (kx)dx=\frac {kx^2}{2}$$
Hope this helps.
Well see the definition of change in potential energy of the system.It is defined as the negative of work done by internal conservative forces of the system.
Here considering internal forces of the system we have only the spring force which varies with displacement from the reference position.
Now you have applied the equation for work done as F.X which is wrong to apply here as the force is variable in the system.
Now the infinitesimal work done by the spring force in extending the spring is ( -kx.dx ).When you will integrate this equation from 0 to x then you would get the required relation.
Hope this helps.