In the textbook (pg. 260 Linear Circuit Analysis, by Artice Davis), losslessness is defined in such way:
Losslessness: If w(\$\infty\$) = 0 for any v(t) and i(t) waveforms supported by the element and having the property that v(\$ \infty\$) and i(\$ \infty\$) are both zero, then we say that the element is lossless ... we must require that both the voltage and current waveforms approach zero at t = \$ \infty\$ in order to test an element to see if it is lossless.
An element is lossless when there is no energy loss or energy exchanges. And for instance, if I start with the equation for the energy of a capacitor \$ w(t) = {1 \over 2} C v(t)^2 \$. So long if there's a voltage across the capacitor, energy cannot be zero (not lossless). BUT If I start the calculation with power, where \$ P = v(t) \cdot i(t) \$, then as long as either (and not necessarily both) current or voltage is zero, power has to be zero (so will its integration, or energy). Hence my questions are:
Mathematically, if I calculate energy by integrating power through all time, I get zero power and zero energy (lossless) if either voltage or current is zero. So why does the textbook claim that it is required for both current and voltage to be zero for an element to be considered lossless?
Conceptually, as long as a capacitor "holds" its charge eternally, then the capacitor has to be "lossless" because no charge is leaving the capacitor, and nothing disappears in form of energy away from the capacitor. So capacitor, ideally, can hold a voltage and still be lossless.