Plate a of a parallel-plate, air filled capacitor is connected to a spring having force
constant k, and plate b is fixed. They rest on a table top.If a charge +Q is placed on plate a and a charge −Q is placed on plate b, by how
much does the spring expand?
The Attempt at a Solution
I have already solved this and the answer is q^2/2k(epsilon)A by equating forces at equilibrium. I now wish to solve this using work energy theorem also. The work done is F*s=Q*E*s=Q^2 x/2(epsilon) where x is extension. Change in potential energy of spring is 1/2 kx^2 and change in electrostatic potential energy is -kq^2/x^2; am I wrong somewhere?