Gauss's Law with Non-Uniform Charge Density
AP Physics C: Electricity and Magnetism · Unit 1 — Electric Charges, Fields, and Gauss's Law
Enclosed charge is an integral
Physics C almost never gives a uniform sphere. Instead $\rho=\rho(r)$, and the enclosed charge must be integrated over spherical shells of volume $dV=4\pi r'^2dr'$:
$$Q_{\text{enc}}(r)=\int_0^r\rho(r')\,4\pi r'^2\,dr'$$Use a dummy variable $r'$ so that the upper limit $r$ is not confused with the integration variable. For cylinders the shell is $dV=2\pi r'\ell\,dr'$; for slabs, $dV=A\,dx'$.
Then $E(r)=Q_{\text{enc}}(r)/(4\pi\varepsilon_0r^2)$. Example: $\rho=\rho_0r/R$ for $r\le R$ gives $Q_{\text{enc}}=\pi\rho_0r^4/R$ and
$$E(r)=\frac{\rho_0r^2}{4\varepsilon_0R}\quad(r\le R),\qquad E(r)=\frac{\rho_0R^3}{4\varepsilon_0r^2}\quad(r\ge R)$$Both expressions agree at $r=R$: the field is continuous wherever there is no surface charge. A jump in $E$ signals a surface charge $\sigma=\varepsilon_0\Delta E$.
The shape of $E(r)$ inside tells you about $\rho$. Uniform density gives $E\propto r$; density increasing outward makes $E$ grow faster than linear; density decreasing outward can make $E$ peak inside the distribution and fall even before the surface.
Shells, slabs, and reading graphs backwards
A thick insulating shell $a\lt r\lt b$ with density $\rho$ has zero field in the hollow ($Q_{\text{enc}}=0$), a field that starts at zero at $r=a$ and grows through the material, and $kQ/r^2$ outside. Starting the integral at $a$ instead of $0$ is the whole difference.
A slab of thickness $2a$ (infinite in $y,z$) with $\rho(x)$ symmetric about $x=0$ uses a pillbox from $-x$ to $+x$: $2EA=\frac{A}{\varepsilon_0}\int_{-x}^{x}\rho\,dx'$, so $E(x)=\frac{1}{\varepsilon_0}\int_0^{x}\rho\,dx'$ inside and a constant outside.
AP also asks the inverse problem: given $E(r)$, find $\rho(r)$. Write $Q_{\text{enc}}=4\pi\varepsilon_0r^2E(r)$ and differentiate:
$$\rho(r)=\frac{1}{4\pi r^2}\frac{dQ_{\text{enc}}}{dr}=\frac{\varepsilon_0}{r^2}\frac{d}{dr}\left(r^2E\right)$$So $E=$ const inside a region means $\rho=2\varepsilon_0E/r$, not zero. And a region where $E\propto1/r^2$ contains no charge at all.
Worked example: vỏ dày mật độ đều
Vỏ cầu cách điện $a=0{,}10$ m, $b=0{,}20$ m, mật độ đều $\rho=2{,}0\times10^{-6}$ C/m³. Tính $E$ tại $r=0{,}15$ m và $r=0{,}40$ m.
Solution
$r=0{,}15$ m: chỉ phần vật liệu từ $a$ tới $r$ nằm trong mặt Gauss:
$$E=\frac{\rho\left(r^3-a^3\right)}{3\varepsilon_0r^2}=\frac{2\times10^{-6}\left(0{,}003375-0{,}001\right)}{3\cdot8{,}85\times10^{-12}\cdot0{,}0225}\approx7{,}96\times10^3\text{ N/C}$$$r=0{,}40$ m: toàn bộ điện tích $Q=\frac43\pi\rho\left(b^3-a^3\right)=\frac43\pi\cdot2\times10^{-6}\cdot0{,}007\approx5{,}86\times10^{-8}$ C:
$$E=\frac{kQ}{r^2}=\frac{9\times10^9\cdot5{,}86\times10^{-8}}{0{,}16}\approx3{,}30\times10^3\text{ N/C}$$Quên lỗ ($a^3$) ở câu đầu sẽ ra $\rho r/3\varepsilon_0\approx1{,}13\times10^4$ N/C — công thức của cầu đặc.