In the figure, a $ 20 nF $ capacitor is connected in parallel across a $ 30 nF $ capacitor. There are $2 $ resistors of $10 Ω$ connected in series with the capacitors. A battery is connected across this circuit and after attainment of Steady State, its polarity is reversed. Find total heat energy dissipated as heat in the resistors.
In the solution, the book first calculated work done by the battery. Total charge supplied by the battery is $ 500nC $, that makes work done by battery as $$W =qV$$. This gives the value $5000 nJ$. As after reversing polarity, battery again does same work, total work done by battery is $10 uJ$. Initially, energy in capacitors is $2500nJ$ and finally after reversing polarity it will have the same value. Therefore, by first law of thermodynamics $$Q =W + ΔU$$ $ΔU=0$
That gives $Q=W$
and $Q=10 uJ$
Now my problem is, how can total work done by battery be dissipated into heat? The arguement that $ΔU=0$ is applied incorrectly as initially, the energy stored in capacitors was zero. Barring that,let's say we connected a battery across the capacitors. $$Q=1/2 qV$$ energy get's dissipated into heat. It's magnitude is $2500 nJ$. Let's call this amount of energy $E$.
After attaining steady state, we reverse polarity of the battery. I believe first, all the energy stored in the capacitor will go into heat and charging of the battery. Now, capacitors become uncharged after discharging. I do not know what fraction of $E$ will be dissipated into heat. After discharging completely, battery will do work $2E$ and $E$ amount of work will be dissipated into heat.
According to me, total work by battery should not get dissipated into heat as initially, energy in capacitor was zero and now it is $E$. So some work by battery has to go in the capacitors. That makes $ΔU=0$ incorrect. And when the capacitors are discharging, how much energy will get dissipated as heat and in charging of battery?