# Joule's law in constant cross-section conductors

I know that the work needed to move a charge $q$ from a point A to a point B in presence of a steady electric field $\vec{E}$ is

$P = \displaystyle\frac{dW}{dt} = \displaystyle\frac{d}{dt}\left(q\int_C \vec{E}\cdot d\vec{l}\right) = \displaystyle\frac{dq}{dt}\int_C \vec{E}\cdot d\vec{l} = IV$

However, I have read that this is only true when the cross-section of the conductor is constant. Otherwise, the right formula should be

$P = \displaystyle\iiint_V\vec{E}\cdot\vec{J} dV$,

where $\vec{J}$ is the current density that flows throught the conductor cross-section.

Why is the first equation only valid for constant cross-section conductors?

Thank you.

Rewrite as $P=\int_C \vec E\cdot (I \,d\vec \ell)$. The proper generalization of $Id\vec\ell$ for surface or volume current densities is $\vec K\,dS$ or $\vec J\,dV$: this is the generalization that occurs, for instance, in application of the Biot-Savart law to surface or volume currents.
Physically, $Id\vec \ell$ is a small amount of current in a wire of length $d\ell$, whereas $\vec KdS$ is a small amount of current through the small surface $dS$ etc. There is a notational quirk in that, by tradition, one writes $Id\vec \ell$ rather than $\vec Id\ell$, i.e. the direction of the line current is indicated not in the current but in the orientation of the line element, whereas it is indicated by the direction of the surface current density $\vec K$ and the volume current density $\vec J$.
• Okay, so I understand that the step $dW/dt = dq/dt \cdot \int_C \vec{E}\cdot d\vec{l}$ is only valid because the cross-section is constant. Otherwise $q$ should not be considered constant and it could not be pulled out of the integral. – baister Feb 12 '17 at 19:41