# Work done by electric force on spring mass system

A point mass $$m$$ having charge $$q$$ is connected with massless spring to a rigid wall on a horizontal surface.A horizontal uniform electric field $$E$$ is switched on and mass is displaced through a distance $$x$$ from equilibrium position.

Work done by electric force is $$W=qE.x$$ as electric force is constant.

But $$F(external)$$ on spring mas system is equal to $$kx$$. So $$W=kx.x= kx^2$$(equation 1) as external force i.e, electric force is constant.

We know that work done is stored in the form of potential energy and we know that potential energy stored in the spring is$$1/2 kx^2$$.

So $$W = 1/2 kx^2$$ (let it be equation 2)

But the above 2 equations are not equal. From where did the 1/2 come from in the 2nd equation???

Unlike the electric force in this scenario, the spring force is not constant with respect to displacement. This is where the factor of $$1/2$$ arises. $$W_k=\int_0^x-kx\,\mathrm{d}x=-\frac{1}{2}kx^2$$ The electric field does work $$W_E=qEx$$, while the spring force does work $$W_k=-\frac{1}{2}kx^2$$. Since the mass comes to rest, the total work done on it must be 0: $$W_E+W_k=qEx-\frac{1}{2}kx^2=0$$
• Yeah, since the spring force is variable, you can't just do $W=Fx$. Mar 14 '21 at 15:06