What is the connection between charge distribution and generalized functions? When one talks about electric charge distribution, one usually refers to the way in which charge is "spread" through space. For example one might say that charge is distributed continuously with a

*

*volume charge density $\rho~({\rm C/m^3})$  in a volume,

*surface charge density $\sigma~({\rm C/m^2})$  on a surface,

*linear charge density $\lambda~({\rm C/m})$  on a curve.

Alternatively we could have a discrete charge distribution in which the total charge $q$ in a region of space is located at various points.
However, in mathematics there is also the concept of distributions which is a sort of a generalization of a function. Formally a distribution is a functional that acts on test functions. A famous example of this is the delta Dirac function $\delta$ which, in the case of a test function $\varphi$ is defined as $\delta(\varphi) = \varphi(0) $.
My question is: is there a connection between the concepts of "charge distribution" and "mathematical distribution (as described earlier)"? If so, what are the distributions and the test functions in the previous cases (where we have $\rho$, $\sigma$ and $\lambda$)?
 A: We can model any charge distribution in 3 dimensions via the charge density $\rho(x,y,z)$. The volume integral of $\rho(x,y,z)$ over a region of space gives the net charge enclosed in that region.
If $\rho(x,y,z)$ is a smooth, non-singular function, then it describes a "cloud" of charge.
If there is a surface charge density, then $\rho$ will be proportional to a single delta function, which localizes the charge on the surface. For simplicity, let's suppose the charge is localized in the $xy$ plane where $z=0$. Then
$$
\rho(x,y,z) = \sigma(x,y) \delta(z)
$$
Then integrating the area charge density $\sigma(x,y)$ over some area gives a charge, while the delta function $\delta(z)$ localizes the charge. There is only non-zero net charge if the integration over $z$ includes $z=0$.
If there is a linear charge density, then $\rho$ will be proportional to a squared delta function, which localizes the charge on a curve. For simplicity, let's suppose the charge is localized on the $z$ axis, where $x=y=0$. Then
$$
\rho(x,y,z) = \lambda(z) \delta(x) \delta(y)
$$
Then integrating the linear charge density $\lambda(x,y)$ over some curve gives a charge, while the delta functions $\delta(x)\delta(y)$ localizes the charge. There is only non-zero net charge if the integration over $x$ and $y$ includes $x=y=0$.
If there is a point charge, then $\rho$ will be proportional to a curbed delta function, which localizes the charge to a point. For simplicity, let's suppose the charge is localized at the origin, where $x=y=z=0$. Then
$$
\rho(x,y,z) = q \delta(x) \delta(y) \delta(z)
$$
Then the overall factor $q$ gives the net charge the point charge will contribute if we include $x=y=z$ in our integration volume, while the delta functions $\delta(x)\delta(y)\delta(z)$ localizes the charge. There is only non-zero net charge if the integration over $x$, $y$, and $z$ includes $x=y=z=0$.
A general charge distribution can involve arbitrary superpositions of a smooth component of $\rho(x,y,z)$, and varying degrees of delta function singularities.
