The voltage waveform that minimize the energy loss in the resistance when charging the capacitor in
a resistor–capacitor circuit is investigated using the calculus of variation. A linear voltage ramp
gives the best efficiency, which means a constant current source should be used for charging.
Comparison between constant current source and battery-powered system is made to illustrate the
energy advantage of the former.