Energy
We have seen that to build up the current $I$ in an inductance, the energy $U=\tfrac{1}{2}LI^2$ must be provided by the external circuit. When the current falls back to zero, this energy is delivered back to the external circuit. There is no energy-loss mechanism in an ideal inductance. When there is an alternating current through an inductance, energy flows back and forth between it and the rest of the circuit, but the average rate at which energy is delivered to the circuit is zero. We say that an inductance is a nondissipative element; no electrical energy is dissipated—that is, “lost”—in it. Similarly, the energy of a condenser, $U=\tfrac{1}{2}CV^2$, is returned to the external circuit when a condenser is discharged. When a condenser is in an ac circuit energy flows in and out of it, but the net energy flow in each cycle is zero. An ideal condenser is also a nondissipative element. We know that an emf is a source of energy. When a current $I$ flows in the direction of the emf, energy is delivered to the external circuit at the rate $dU/dt=\emf I$. If current is driven against the emf—by other generators in the circuit—the emf will absorb energy at the rate $\emf I$; since $I$ is negative, $dU/dt$ will also be negative. If a generator is connected to a resistor $R$, the current through the resistor is $I=\emf/R$. The energy being supplied by the generator at the rate $\emf I$ is being absorbed by the resistor. This energy goes into heat in the resistor and is lost from the electrical energy of the circuit. We say that electrical energy is dissipated in a resistor. The rate at which energy is dissipated in a resistor is $dU/dt=RI^2$. In an ac circuit the average rate of energy lost to a resistor is the average of $RI^2$ over one cycle. Since $I=\hat{I}e^{i\omega t}$—by which we really mean that $I$ varies as $\cos\omega t$—the average of $I^2$ over one cycle is $\abs{\hat{I}}^2/2$, since the peak current is $\abs{\hat{I}}$ and the average of $\cos^2\omega t$ is $1/2$. What about the energy loss when a generator is connected to an arbitrary impedance $z$? (By “loss” we mean, of course, conversion of electrical energy into thermal energy.) Any impedance $z$ can be written as the sum of its real and imaginary parts. That is, \begin{equation} \label{Eq:II:22:24} z=R+iX, \end{equation}  where $R$ and $X$ are real numbers. From the point of view of equivalent circuits we can say that any impedance is equivalent to a resistance in series with a pure imaginary impedance—called a reactance—as shown in Fig. 22–17. We have seen earlier that any circuit that contains only $L$’s and $C$’s has an impedance that is a pure imaginary number. Since there is no energy loss into any of the $L$’s and $C$’s on the average, a pure reactance containing only $L$’s and $C$’s will have no energy loss. We can see that this must be true in general for a reactance.  If a generator with the emf $\emf$ is connected to the impedance $z$ of Fig. 22–17, the emf must be related to the current $I$ from the generator by \begin{equation} \label{Eq:II:22:25} \emf=I(R+iX). \end{equation}  To find the average rate at which energy is delivered, we want the average of the product $\emf I$. Now we must be careful. When dealing with such products, we must deal with the real quantities $\emf(t)$ and $I(t)$. (The real parts of the complex functions will represent the actual physical quantities only when we have linear equations; now we are concerned with products, which are certainly not linear.) Suppose we choose our origin of $t$ so that the amplitude $\hat{I}$ is a real number, let’s say $I_0$; then the actual time variation $I$ is given by \begin{equation*} I=I_0\cos\omega t. \end{equation*}  The emf of Eq. (22.25) is the real part of \begin{equation} I_0e^{i\omega t}(R+iX)\notag \end{equation}  or \begin{equation} \label{Eq:II:22:26} \emf=I_0R\cos\omega t-I_0X\sin\omega t. \end{equation}  The two terms in Eq. (22.26) represent the voltage drops across $R$ and $X$ in Fig. 22–17. We see that the voltage drop across the resistance is in phase with the current, while the voltage drop across the purely reactive part is out of phase with the current. The average rate of energy loss, $\av{P}$, from the generator is the integral of the product $\emf I$ over one cycle divided by the period $T$; in other words,  \begin{equation*} \av{P} = \frac{1}{T}\int_0^T \emf I\,dt=\frac{1}{T}\int_0^T I_0^2R\cos^2\omega t\,dt-\frac{1}{T}\int_0^T I_0^2X\cos\omega t\sin\omega t\,dt. \end{equation*} 
 \begin{align*} \av{P} = \frac{1}{T}\!\int_0^T\!\! &\emf I\,dt\\[1.5ex] =\frac{1}{T}\!\int_0^T\!\! &I_0^2R\cos^2\omega t\,dt\\[-.25ex] -\;&\frac{1}{T}\!\int_0^T\!\!\!I_0^2X\cos\omega t\sin\omega t\,dt. \end{align*} 
 The first integral is $\tfrac{1}{2}I_0^2R$, and the second integral is zero. So the average energy loss in an impedance $z=R+iX$ depends only on the real part of $z$, and is $I_0^2R/2$, which is in agreement with our earlier result for the energy loss in a resistor. There is no energy loss in the reactive part.