Confusion about the meaning of steady current I am trying to learn some elementary EM, but I have some confusion about the basic concepts of steady current.
Suppose I have a wire of uniform cross section area. The current is always flowing from left to right.
I imagine that I can cut a segment of this wire (with the area vectors at both ends parallel to the flow of current) and compute the surface integral $\int\int_S \mathbf{J}\cdot d\mathbf{A}$, where $\mathbf{J}$ is the current density vector, $\mathbf{A}$ is the area vector, and $S$ is the boundary of the segment. I assume that $\mathbf{J}$ does not vary with time.
I believe that the magnitude of $\mathbf{J}$ can depend on its position, so lets say that its magnitude is greater on the right end, as compared to the left end. Because of that, the surface integral $\int\int_S \mathbf{J}\cdot d\mathbf{A}$ should have a non-zero value (the dot products on both ends do not cancel).
However, $\int\int_S \mathbf{J}\cdot d\mathbf{A}$ is precisely the net change in charge out of this segment, i.e., $-\frac{dq}{dt}$.
Now, for a steady current, $\frac{\partial \rho}{\partial t}$ is zero at every point, thus the $-\frac{dq}{dt}$ should also be zero, which contradicts my understanding that $\int\int_S \mathbf{J}\cdot d\mathbf{A}$ can be non-zero.
This is perhaps a very stupid question, but I just cannot figure out what has gone wrong. Any help would be greatly appreciated~
 A: $\int\int_S \mathbf{J}\cdot d\mathbf{A}$ represents the current $(\frac {dq} {dt})$ flowing through a cross-section area. It is not "the net change in charge out of this segment".
The "net change in the charge" would be equal to the difference between the current flowing in (through the left cross-section) and the current flowing out (through the right cross-section) of the segment.
Updating the answer based on the comments:
If $S$ is the whole surface of the segment, then $\int\int_S \mathbf{J}\cdot d\mathbf{A}$ represents the net charge flow and, in a steady state, should be zero. That does not change, if the current density through the left cross-section is different from the current density through the right cross-section, since the differences in the current density would be compensated by the differences in cross-section areas, yielding the same currents.
A: $\frac{\partial}{\partial t}\rho = 0$ implies $\nabla\cdot\mathbf{J} = 0$. Then, $I = \oint_S \mathbf{J}\,d\mathbf{S} = \iiint_{\Omega} \nabla\cdot\mathbf{J}\,d\Omega = 0$
If you consider $S$ as a cylinder, you will see that the current density does not depend on the cross section you take.
