Not trying to trivialise it but I was trying to convince myself that we can usefully extract all the energy from the inductor. I cannot yet find a suitable circuit which does not waste energy.DaveE said:Switches are nearly always assumed to be ideal (instantaneous) in thought experiments like this. IRL, you would add a bit more engineering, like snubbers, clamp diodes, transient suppressors, make-before-break types, etc.
That really wasn't his point. It's a diversion from the basic physics here. You could use a step function for the voltage source without any switches, which is also a magical creation.