Say we have a battery at a fixed voltage of $V$ charging a capacitor with capacitance $C$.
When the capacitor is fully charged, the energy stored in it will be $\frac{1}{2}QV$, where $V$ is the final voltage of the capacitor (and the voltage of the battery).
However, I'm a little confused as to the work the battery does...
To me, it seems that if the battery pushed $Q$ onto the capacitor, and the voltage of the battery is $V$, it must've done $QV$ of work, which means that the energy stored in the capacitor only accounts for half of it.
Where did the rest of the work the battery did go?