Question 5 of 8: Charge Distribution Producing a Given Piecewise Radial Field
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Exams — May 2016 — 04-BS-9 Basic Electromagnetics. Three-hour, closed-book exam (approved Casio/Sharp calculator only). Aids given: $\varepsilon_0=8.85\times10^{-12}$ F/m, $\mu_0=4\pi\times10^{-7}$ H/m, $e=1.6\times10^{-19}$ C. Format: eight questions offered; any five constitute a complete paper and only the first five appearing in the answer book are marked. All eight are solved below for completeness.
Reference texts: Sadiku, Elements of Electromagnetics / Hayt & Buck, Engineering Electromagnetics — Coulomb's law and superposition, Gauss's law and divergence, Biot–Coulomb law and magnetic field of current loops and coaxial conductors, Faraday's law, Lorentz force, capacitance and field energy, DC circuit power distribution; Young & Freedman, University Physics with Modern Physics — refraction geometry.
Question 5: Charge Distribution Producing a Given Piecewise Radial Field (20 marks)
Find. The volume charge density $\rho(r)$ (and total charge) producing this field.
Field grows linearly with $r$ inside radius $R$ and falls as $1/r^2$ outside — the signature of a uniformly charged sphere, continuous at $r=R$.
Approach. Apply the divergence aid directly: $\rho=\varepsilon_0\,\text{div}\,\vec E$ in each region (Gauss's law in differential form). Both branches, evaluated at $r=R$, must agree in magnitude for the field to be physical (continuous) — use that as a consistency check, then integrate the inside density over the sphere's volume for the total charge.
Divergence and charge density inside ($r<R$), $\vec E=A(x,y,z)$.
$$\text{div}\,\vec E=\frac{\partial(Ax)}{\partial x}+\frac{\partial(Ay)}{\partial y}+\frac{\partial(Az)}{\partial z}=A+A+A=3A$$
$$\rho=\varepsilon_0(3A)=(8.85\times10^{-12})(3)(1.44\times10^{21})$$
$$\rho=\boxed{3.823\times10^{10}\ \text{C/m}^3\ \text{(uniform)}}$$
Divergence outside ($r>R$), $\vec E=AR^3\,\vec r/r^3$. This is the standard $\hat r/r^2$ form (times the constant $AR^3$), whose divergence is zero everywhere except the origin (well outside this region):
$$\text{div}\,\vec E=0\ \Rightarrow\ \rho=0\ \text{for}\ r>R$$
So all the charge is confined within radius $R$ — no charge (volume or surface) exists outside the sphere.
Continuity check at $r=R$ (confirms a single uniform sphere, no surface layer). Inside at $r\to R$: $E=AR$. Outside at $r\to R$: $E=A(R/R)^3R=AR$. The two branches agree exactly, so the field has no jump at $r=R$ and therefore no surface charge sits there either — consistent with $\rho=0$ outside.
Total charge, from the uniform volume density.
$$Q=\rho\cdot\frac43\pi R^3=(3.823\times10^{10})\cdot\frac43\pi(10^{-10})^3$$
$$Q=\boxed{1.601\times10^{-19}\ \text{C}\ \approx\ +e}$$
Quantity
Result
Volume charge density $\rho$ ($r<R$)
$3.823\times10^{10}$ C/m$^3$, uniform
Charge density ($r>R$)
$0$ (no charge outside $R$)
Total charge $Q$
$1.601\times10^{-19}$ C $\approx+e$
that mark is the lower half of the curly brace grouping the two branches. The field as printed, $\vec E=A(R/r)^3(x,y,z)$ for $r>R$, is continuous at $r=R$ (Step 3), which is exactly what the solution above uses.