Derivation of power equation for electric circuits I am studying the fundamentals of electric circuits and have been stuck with the proof of the (instantaneous) electric power used in circuit analysis:
$$
p \left({t}\right) = v \left({t}\right) i \left({t}\right) \tag{1}\label{p_common}
$$
In the book Elements of Electromagnetics by Sadiku, they provide the following form of electric power (which I presume is valid for any material, not only conductors):
$$
p \left({t}\right) = \int_V {\vec E \left({t}\right) \cdot \vec J \left({t}\right) dv} \tag{2}\label{p_vol}
$$
They also say that for conductors with uniform cross section, $dv = ds \cdot dl$, and the integral can be separated as:
$$
\begin{align}
p \left({t}\right) &= \left( {\int_L {E\left({t}\right) dl} } \right)\left( {\int_S {J\left({t}\right) ds} } \right) \\
p \left({t}\right) &= v \left({t}\right) i \left({t}\right)
\end{align}
$$
The implicit conclusion is that Eq. $\ref{p_vol}$ must be used whenever the material is NOT a conductor with uniform cross section. However, Eq. \ref{p_common} is used universally in circuit analysis, even for nonlinear element like diodes and transistors. So my question is: is Eq. \ref{p_common} valid for any circuit element, regardless of its nature? if yes, how can we prove Eq. \ref{p_common} for any general material? and if not, is Eq. \ref{p_vol} the proper way to calculate the power of any general circuit element?
PD: I would be grateful if someone shared me a thorough proof of Eq. \ref{p_vol}, the one given in the book of Sadiku omits some steps so I did not understand it completely.
 A: I'd derive eq 2 like this…
The work done per unit time on a charge q moving with velocity $\vec{v}$ in an electric field $\vec{E}$ is $q\vec{E}.\vec{v}.$
If there are $n$ of these charge carriers per unit volume, then the total work done per unit time on the charge carriers in volume dV is
$$\text{Power} = q\vec{E}.\vec{v}\ n\ dV.$$
But the current density, $\vec{J}$, is a vector of magnitude equal to the charge per unit area crossing a small imaginary surface per unit time and direction that in which the charges are moving. It follows from this that$$\vec{J}=nq\vec{v}.$$
Therefore$$\text{Power} = \vec{E}.\vec{J}\ dV.$$
This is a very general formula; it will even cope with the case of $\vec{J}$ not being in the same direction as $\vec{E}$, as I imagine might arise in certain crystalline conductors. It will also work if there's more than one species of charge-carrier. 
I believe that (1) applies only when $\vec{J}$ is in the same direction as $\vec{E}$, which you might expect if $\vec{E}$ gives the charge carriers a mean drift velocity, $\vec{v}$, in the same direction as itself (or the opposite direction for negative carriers), as in simple theories of conduction, for example Drude's theory. In this case we can write the last equation simply in terms of the magnitudes, E and J, of the vectors $\vec{E}$ and $\vec{J}.$ ...
$$\text{Power} = EJ\ dV.$$
Now $E$ is the magnitude of the potential gradient, and $J$ is the current per unit area, so$$\text{Power} = \frac{d\Phi}{dx} \times \frac{I}{A}\ dV.$$
But $A\ dx=dV$ so
$$\text{Power} =I\ d\Phi$$
in which $d\Phi$ is the pd across the length of conductor in question.
For a conductor of finite length (including a device like a diode) the current at any time will be the same all along the conducting path (except for alternating currents of frequency high enough for phase differences not to be negligible). For the same current throughout the conducting path, the last equation integrates to $$\text{Power} =I\ \Delta \Phi.$$ This equation can be derived much more simply: it follows immediately from the definitions of pd and current! 
