Solution
Initially, the capacitor plates are charged with $+q$ and $-q$. The electrostatic attraction force $F_e$ between the plates pulls them closer, compressing the spring. The system is in mechanical equilibrium before the discharge begins.
Initial State Calculation:
The electrostatic force between the plates is:
$$ F_e = \frac{q^2}{2 A \varepsilon_0} $$
At equilibrium, this force is balanced by the spring force $F_s = kx$, where $x$ is the compression from the relaxed length $l$.
$$ kx = \frac{q^2}{2 A \varepsilon_0} \implies x = \frac{q^2}{2 k A \varepsilon_0} $$
The initial separation between the plates is $d = l – x$.
The total initial energy of the system ($U_i$) is the sum of the electrostatic potential energy ($U_E$) and the spring potential energy ($U_S$): $$ U_i = U_E + U_S = \frac{q^2 d}{2 A \varepsilon_0} + \frac{1}{2} k x^2 $$ Substituting $d = l – x$: $$ U_i = \frac{q^2 (l – x)}{2 A \varepsilon_0} + \frac{1}{2} k x^2 = \frac{q^2 l}{2 A \varepsilon_0} – \frac{q^2 x}{2 A \varepsilon_0} + \frac{1}{2} k x^2 $$ Substituting $x = \frac{q^2}{2 k A \varepsilon_0}$: $$ U_i = \frac{q^2 l}{2 A \varepsilon_0} – \underbrace{\frac{q^2}{2 A \varepsilon_0} \left( \frac{q^2}{2 k A \varepsilon_0} \right)}_{Term A} + \underbrace{\frac{1}{2} k \left( \frac{q^2}{2 k A \varepsilon_0} \right)^2}_{Term B} $$ Notice that Term B is exactly half of Term A. $$ U_i = \frac{q^2 l}{2 A \varepsilon_0} – \frac{q^4}{4 k A^2 \varepsilon_0^2} + \frac{q^4}{8 k A^2 \varepsilon_0^2} = \frac{q^2 l}{2 A \varepsilon_0} – \frac{q^4}{8 k A^2 \varepsilon_0^2} $$
(a) Resistance $R$ is very high:
If $R$ is high, the discharge is very slow (quasi-static). The plates move slowly back to their relaxed position as the charge decreases, maintaining mechanical equilibrium throughout. The kinetic energy is negligible. The final state has $q=0$, so the plates return to separation $l$ and the spring is relaxed ($U_{f} = 0$). By conservation of energy, the total heat developed ($H$) equals the loss in system energy.
$$ H = U_i – U_f = U_i – 0 = \frac{q^2 l}{2 \varepsilon_0 A} – \frac{q^4}{8 \varepsilon_0^2 k A^2} $$
(b) Resistance $R$ is very small:
If $R$ is small, the discharge is sudden. The charge $q$ becomes zero almost instantly. Due to inertia, the heavy plates ($mass\ m$) do not move during this short discharge time. The separation remains $d$.
The heat developed in the resistor corresponds only to the loss of electrostatic potential energy stored in the capacitor at that instant. The spring energy is mechanical and is not dissipated in the electrical resistor (it will eventually dissipate as mechanical damping, but the question asks for heat in resistance).
$$ H = U_{E(\text{initial})} = \frac{q^2 d}{2 A \varepsilon_0} = \frac{q^2 (l-x)}{2 A \varepsilon_0} $$
$$ H = \frac{q^2 l}{2 A \varepsilon_0} – \frac{q^2}{2 A \varepsilon_0} \left( \frac{q^2}{2 k A \varepsilon_0} \right) = \frac{q^2 l}{2 \varepsilon_0 A} – \frac{q^4}{4 \varepsilon_0^2 k A^2} $$
