8.6 Gauss's law: lines, sheets, shells and changing densityCylinders, pillboxes and nonuniform charge

A long line of charge
For a long straight line with density λ, the field must point straight out from the line and depend only on the distance r. The matching Gaussian surface is a cylinder of radius r and length ℓ, coaxial with the line. On the curved side, E is perpendicular and constant: flux $E(2\pi r\ell)$. On the flat end caps, E runs along the surface: flux zero. The enclosed charge is $\lambda\ell$.
$$E(2\pi r\ell) = \frac{\lambda\ell}{\varepsilon_0} \quad\Rightarrow\quad E = \frac{\lambda}{2\pi\varepsilon_0 r} = \frac{2k\lambda}{r}$$
?Wait, what's the area of the curved side of a cylinder?
A large flat sheet
For a large sheet with surface density σ, the field points straight away from the sheet on both sides. Use a pillbox (a short cylinder) that pokes through the sheet, with caps of area A. The curved side has zero flux; each cap has flux EA. The enclosed charge is σA. So $2EA = \sigma A/\varepsilon_0$ and $E = \frac{\sigma}{2\varepsilon_0}$: the same at any distance. That's why the field between two large parallel plates (each $\sigma/2\varepsilon_0$, adding between them and canceling outside) is the uniform $\sigma/\varepsilon_0$ we used for the electron.
I thought about it. Show me
Thin shells
Inside a thin spherical shell of charge, a Gaussian sphere encloses no charge, so the field is zero everywhere inside. Not just at the center: everywhere. Outside, the shell acts like a point charge. If a shell surrounds a point charge, then inside the shell only the point charge counts; outside, both count.
Charge density that changes with r
If $\rho$ depends on r, you can't use "density times volume". Chop the volume into thin spherical shells of radius r', thickness dr', and volume $dV = 4\pi r'^2\,dr'$, and add up their charge: $q_{enc} = \int_0^r \rho(r')\,4\pi r'^2\,dr'$.
?Wait, why is a thin shell's volume 4πr² dr?
- Inside: Gaussian sphere of radius r. By spherical symmetry, flux $= E(4\pi r^2)$.
- $q_{enc} = \int_0^r \rho_0\frac{r'}{R}4\pi r'^2\,dr' = \frac{4\pi\rho_0}{R}\cdot\frac{r^4}{4} = \frac{\pi\rho_0r^4}{R}$.
Why?
The density changes with radius, so the enclosed charge must be an integral. - $E(4\pi r^2) = \frac{\pi\rho_0r^4}{\varepsilon_0R}$, so $E = \frac{\rho_0r^2}{4\varepsilon_0R}$ for $r < R$.
- Total charge: set r = R: $Q = \pi\rho_0R^3$. Outside: $E(4\pi r^2) = \frac{\pi\rho_0R^3}{\varepsilon_0}$, so $E = \frac{\rho_0R^3}{4\varepsilon_0r^2}$ for $r > R$.
- Check continuity at r = R: both give $\frac{\rho_0R}{4\varepsilon_0}$.
Why?
No surface charge sits at r = R, so E must be continuous there. A quick check that catches algebra slips.
Answer: $E = \frac{\rho_0r^2}{4\varepsilon_0R}$ inside and $E = \frac{\rho_0R^3}{4\varepsilon_0r^2}$ outside, radially outward for positive $\rho_0$.
Stuck? Get a hint
- Write $q_{enc}$ as an integral of ρ(r′) 4πr′² dr′ from 0 to r.
- ρ₀/R is constant: integrate r′³ to get r⁴/4.
- For outside, the enclosed charge is the total, found by setting r = R.
- Gaussian cylinder of radius 0.050 m coaxial with the wire: $E(2\pi r\ell) = \lambda\ell/\varepsilon_0$.
- $E = \frac{2k\lambda}{r} = \frac{2(9.0 \times 10^9)(3.0 \times 10^{-9})}{0.050} = 1.1 \times 10^3$ N/C, pointing radially away from the wire.
Answer: About $1.1 \times 10^3$ N/C, radially outward.
- A$kq/(4R^2)$ outward
- B$kq/(2R^2)$ inward
- C$3kq/(4R^2)$ inward
- D0
Show the answer
B. At 2R both charges are enclosed: $q_{enc} = -2q$, so $E = \frac{k(2q)}{(2R)^2} = \frac{kq}{2R^2}$, pointing inward because the net charge is negative. The first choice forgets the shell.
- A$E \propto r$
- B$E \propto 1/r$
- C$E \propto 1/r^2$
- DConstant
Show the answer
B. Outside, a Gaussian cylinder encloses a fixed charge per length, and its curved area grows as r, so $E \propto 1/r$. $E \propto r$ is the field inside a uniformly charged solid cylinder.

For a "derive" question with Gauss's law, write four things: the Gaussian surface and why (symmetry), the flux in terms of E, the enclosed charge (with an integral if ρ varies), and then solve. Only use the symbols the question lists.
- Line: cylinder, $E = \lambda/(2\pi\varepsilon_0 r)$, so $E \propto 1/r$.
- Large sheet: pillbox, $E = \sigma/(2\varepsilon_0)$, uniform. Two opposite plates: $\sigma/\varepsilon_0$ between, 0 outside.
- Thin shell: E = 0 everywhere inside; point charge outside.
- Changing density: $q_{enc} = \int\rho\,dV$ with $dV = 4\pi r^2\,dr$ (sphere) or $2\pi r\ell\,dr$ (cylinder).
- E is continuous across a boundary with no surface charge.