# How to use the definition of volume current density?

The volume current density $$J$$ is defined as $$\frac {dI}{da_{\perp}}$$ where $$dI$$ is a small current segment flowing in the volume with cross section $$da_{\perp}$$ where $$da_{\perp}$$ is a small area element that is perpendicular to the current flow.

So in the next simple example, a uniform volume current density flowing parallel to the axis of a simple cylinder, the cross section is circular, so our intuition tells us that $$J$$ should be equal to $$\frac{I}{\pi r^2}$$ , we did this without integrals, but now if I want to do it as an integral,

$$I = \int_S \vec J . \vec da$$ where the surface $$S$$ is the cylinder which contains three parts, the curved surface and both circular ends, so $$S = S_1 +S_2 + S_3$$ respectively.

Computing the integral, the $$\vec J$$ vector is parallel to the axis while the normal vector of the curved surface is radial, so the contribution from $$S_1$$ vanishes, this leaves us with the 2 circular ends,

$$I = \int_{S_2} \vec J . \vec da + \int_{S_3} \vec J . \vec da$$

But in that case, $$\vec J$$ is parallel to one of the $$\vec da$$'s and antiparallel to the other, so both integrals cancel and that leaves us with $$I = 0$$ , so how do we use the definition of $$I = \int_S \vec J . \vec da$$ ?

• Notice there is a problem (that doesn't really affect your question) in your problem statement. You first define $J$ to be a scalar, and then you start using it as a vector quantity $\vec{J}$. – The Photon Aug 6 at 4:45

But in that case, $$\vec J$$ is parallel to one of the $$\vec da$$'s and antiparallel to the other, so both integrals cancel and that leaves us with $$I = 0$$ , so how do we use the definition of $$I = \int_S \vec J . \vec da$$ ?