Two formulas for current: how are they the same? I am struggling to reconcile the two definitions for current density.
Definition one: the current is the flux of the current density vectors through a surface:
$$I = \iint_{S} \vec{J} \cdot d\vec{S}$$
Definition two: the current is the small change in charge through a surface over the small change in time that passed: $$I=\frac{dq}{dt}$$
I cannot manage to mathematically transform one into the other. Expanding the first definition:
$$I=\iint_{S} \vec{J} \cdot d\vec{S}=\iint_{S} \rho \vec{v} \cdot d\vec{S}$$
We can see the real meaning of this integral now. Charge density is the charge contained in a point (really in an infinitesimal volume (Mass-density functions: how is there mass-density at points?). Whatever surface you're measuring the current through, you're measuring the velocity vector of point charges, scaled by the points' respective charge. The flux integral considers all of the influences together of these scaled velocity vectors.
I could use some help completing my mental picture. How is what I just described the same as the rate of change of the charge through the surface? An explanation of that is preferred or maybe a mathematical transformation from one form to the other. A huge thanks to anyone willing to help!
Dear moderators: this post Equivalent formulas for electric current density  has a similar title but is not at all the same question in substance.
 A: Let's start considerating an infinitesimal volume of a wire and we want to calculate the amount of charge that is passing through an infinitesimal element of my section.
We know that the infinitesimal charge is $dq=\rho\cdot d\tau$ where $\rho$ is the volumetric charge density and $\tau$ the infinitesimal volume.
Given the constant velocity $\vec{v}$ of the charges, we have microscopically that only some of the charges in the wire can reach our surface $\Sigma$ in a fixed time $dt$. So we can write our infintesimal volume like this: $d\tau=(\vec{v}\cdot dt)(d\Sigma\cdot cos(\theta))$ where $\theta$ is the angle between the normal unitary vector and the velocity, so we are
projecting the velocities onto the surface and $v\cdot dt$ is the space charges travel in dt.
So we can write: $$dq=\rho\cdot cos(\theta)d\Sigma\cdot v\cdot dt=ne\cdot cos(\theta)d\Sigma\cdot v\cdot dt$$ Dimensionally it's consistent. Where $n$ is the number of electrons of unity of volume and $e$ is the charge of an electron. So we have the infinitesimal current: $$di=\frac{dq}{dt}=ne(\vec{v}\cdot \vec{u}_n)d\Sigma$$ where $\vec{u}_n$ is the normal unitary vector.
Here we introduce the current density $\vec{j}=\rho\cdot \vec{v}=ne\vec{v}$.
If we integrate we obtain that the current is the flux of the current density vector through a surface. $$i=\int_\Sigma di=\int_\Sigma \vec{j}\cdot \vec{u}_n d\Sigma$$ and so, in this way we have combined the two definition.
I hope it's all clear. these are some of my notes.
