Current density is the total amount of current flowing per unit cross-sectional area. So, the total current passing through a cross-sectional area can be expressed as the surface integral of the current density.
Now, charge conservation requires that the total current flowing out of a given volume equals the rate of decrease of charge within that volume.
Expressing the total charge in terms of the volume charge density, the equation gets modified. Since the charge density is a space function, using the Leibniz rule, its time derivative can be moved inside the integral.
Applying the divergence theorem to the left-hand side of the equation converts the closed surface integral to a volume integral. This relation holds for any volume; as a result, the integrands are equal.
The divergence of the current density equals the negative rate of change of volume charge density. This mathematical statement of local charge conservation is called the continuity equation.
For steady currents, the charge density is invariant with time. So, the divergence of the current density is zero.
The total amount of current flowing per unit cross-sectional area is called the current density. Hence, the current passing through a cross-sectional area can be written as the surface integral of the current density.
According to the conservation of charge, the total current flowing out of a given volume equals the rate of decrease of charge within that volume.
Now, the total charge can be written in terms of the volume charge density.
The charge density is a space function. Hence, applying the Leibniz rule, the time derivative can be moved inside the integral.
When the divergence theorem is applied to the left-hand side of the above equation, the closed surface integral is converted into the volume integral.
Since this relation holds for any volume, the integrands are equal and the obtained relation is called the continuity equation. This states that the divergence of the current density equals the negative rate of change of volume charge density.
For steady currents, the charge density is invariant with time. Hence, the divergence of the current density is zero.
Suggested Reading
Griffiths, David J., Introduction to Electrodynamics, CA: Pearson. Pp. 222
Ida, Nathan, Engineering Electromagnetics, 3rd Edition, Springer. Pp. 355-356.