Why current density is defined as the rate of change of current with respect to area ($\frac{di}{dS}$) What I know is current density is the amount of current passing per unit area perpendicular to the current. But then why do we define it as the rate of change of current with respect to change in area $\left(\dfrac{di}{dS}\right)$.
Aren’t they both two different things?
I’m a high school student. It’s given in the book Concepts Of Physics  (volume-2) by H.C. Verma, on page 172.

 A: The current density is not defined as $\mathrm di/\mathrm dS$. The precise definition of current density is the following
$$\mathbf j=\left(\lim _{\Delta S\to 0} \frac{i}{\Delta S}\right) \mathbf{\hat n}$$
where $\mathbf{\hat n}$ is the unit vector in the direction perpendicular to the infinitesimal area ($\Delta S$), and
$$i=\frac{\mathrm d q}{\mathrm dt}$$
where $q$ is the charge passing through/crossing the area $\Delta S$. Note that for any real physical scenario, as $\Delta S$ goes to $0$, so does the current ($i$) passing through it. Thus, when $\Delta S$ is infinitesimal, so is the current, but writing it as $\mathrm di$ is abuse of notation, because $\mathrm d(\rm quantity)$ is primarily used when we are taking an infinitesimal change in the "$\rm quantity$" (not the case here), or taking an infinitesimal element of that "$\rm quantity$" (also, not exactly the case here).
In this light, the definition given in your book is, strictly speaking, incorrect. However, it is highly likely that the author meant to convey the above definition, but abused the notation, thus rendering the definition incorrect.
