# A question about electrical energy in a network

Let $G=(V,E)$ be a network. Each arc $e$ has a resistance $r_e>0$. Let $f_e$ be the current flowing though $e=(u,v)$. By Ohm's law we know that a voltage $\phi$ is induced on the nodes and $f_e = \frac{\phi_u - \phi_v}{r_e}$. We define the electical energy of the network as $\mathcal{E}_r(f) = \sum_e f_e^2 r_e$. Note that $\phi$ is a mapping from the node set to $\mathbb{R}$. Given a real number $x$, define $E_x=\{e=(u,v)\in E : \min(\phi_u,\phi_v)\leq x\leq \max(\phi_u,\phi_v)\}$. Also $F_x=\sum_{e\in E_x}f_e$. Now show that $\int_{\mathbb{R}}F(x)dx = \mathcal{E}_r(f)$. I think this follows from the definition of integration, but can not find the connection. I am asking this question question in relation to max-flow computation using electrical flows.

Note that the energy can also be written as $\sum_e \Delta \phi(e)^2/r_e$. (To a physicist, this is the familiar $P=IV=I^2 R=V^2/R$ formula, but you don't need to know anything about electromagnetism to get this.) Now each edge contributes to the integral of $F$ on an interval of length $\Delta \phi(e)$, and contributes $f_e=\Delta \phi(e)/r_e$ there. Multiplying that gives that the contribution of each edge to the integral is $\Delta \phi(e)^2/r_e$; summing over edges gives the desired result.
• @SudiptaRoy Not really. The point is that $e \in E_x$ if and only if $x \in [\min \{ \phi_u,\phi_v \},\max \{ \phi_u,\phi_v \}]$. This interval has length $\Delta \phi(e)$. The contribution of $e$ to $F$ on this interval is $\Delta \phi(e)/r_e$. So you multiply the length of the interval by the contribution to $F$ to get the contribution of $e$ to $\int F$. I'm not sure about sign issues, though (is $f_e$ selected to be positive?) – Ian Jul 26 '17 at 19:21