A capacitor is connected to a battery. If UC ​is energy stored in capacitor. UB ​is energy supplied by battery