I am learning about inductors and capacitors and we derived the energy stored on a capacitor to be 50% of that delivered by the battery. We did this considering a circuit of a capacitor connected to a battery and resistor in series, to not encounter the problem of an infinite initial current if we assumed there was no other resistor in the circuit. However our lecturer assured us that no matter how small the resistance in the circuit (even if it is just the small resistance of the wires), exactly 50% of energy would be lost. This made sense to me from the mathematics. I assume that in the case of a capacitor it is impossible to consider the theoretical case with no initial circuit resistance as you get infinities popping up in the mathematics?
Then we considered an inductor charging in a simple circuit consisting of just a battery and an inductor, and found that all of the energy from the battery is stored on the inductor. I appreciate that this is just a theoretical treatment and that some energy would be lost in the wires/internal resistance of the battery, and I also understand why a similar theoretical treatment of the capacitor case is impossible; however I can't think of the fundamental reason as to why it is completely impossible to charge a capacitor with anything but 50% of the battery energy whereas an inductor could theoretically store 100%.