TExcelTAD
Home › Electromagnetic Theory: Maxwell's Equations to Waves › Maxwell's Equations in Integral and Differential Form

Maxwell's Equations in Integral and Differential Form

Four equations hold everything this course has built so far. Gauss's law came from Coulomb's experiments, the absence of magnetic charge from the fact that magnets always have two poles, Faraday's law from induction, and Ampère's law with Maxwell's correction from forces between currents plus charge conservation. Written together, they describe every classical electromagnetic phenomenon: the capacitor, the transformer, the antenna, the optical fibre. This lesson collects them in both forms, says what each term means physically, adds the constitutive relations and the boundary conditions that make them solvable, and checks with SymPy that a travelling wave satisfies all four.

The four laws

Law Integral form Differential (point) form Says
Gauss (electric) ∮SD⋅dS=Qenc\oint_S \mathbf{D} \cdot d\mathbf{S} = Q_\text{enc} ∇⋅D=ρv\nabla \cdot \mathbf{D} = \rho_v charge is the source of electric flux
Gauss (magnetic) ∮SB⋅dS=0\oint_S \mathbf{B} \cdot d\mathbf{S} = 0 ∇⋅B=0\nabla \cdot \mathbf{B} = 0 magnetic flux lines close; no magnetic charge
Faraday ∮CE⋅dl=−ddt∫SB⋅dS\oint_C \mathbf{E} \cdot d\mathbf{l} = -\frac{d}{dt}\int_S \mathbf{B} \cdot d\mathbf{S} ∇×E=−∂B∂t\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t} a changing B\mathbf{B} makes a circulating E\mathbf{E}
Ampère–Maxwell ∮CH⋅dl=Ienc+ddt∫SD⋅dS\oint_C \mathbf{H} \cdot d\mathbf{l} = I_\text{enc} + \frac{d}{dt}\int_S \mathbf{D} \cdot d\mathbf{S} ∇×H=J+∂D∂t\nabla \times \mathbf{H} = \mathbf{J} + \frac{\partial \mathbf{D}}{\partial t} currents and a changing D\mathbf{D} make a circulating H\mathbf{H}

The integral forms (with a fixed surface SS and its boundary CC) are the ones to use with symmetry, as in Gauss's law and Ampère's law. The point forms follow from the divergence and Stokes theorems (the integral theorems) and are the ones to use for waves and numerical solvers. The two forms say the same thing, except that the integral forms still make sense across surfaces where fields jump, which is where the boundary conditions below come from.

div D = rho_v flux out div B = 0 in = outN end curl E = -dB/dt B growingE curl H = J + dD/dt I or dD/dtH

Signs and handedness. In Faraday's law the circulation of E\mathbf{E} runs opposite to the right-hand sense of a growing B\mathbf{B} (Lenz); in Ampère's law H\mathbf{H} circulates with the right-hand sense of the current. That one sign difference is what lets the two curl equations sustain a wave instead of a runaway.

Constitutive relations: what the material adds

The four equations have more unknowns (E\mathbf{E}, D\mathbf{D}, H\mathbf{H}, B\mathbf{B}, and J\mathbf{J} in conductors) than equations. The material closes the system:

D=εE,B=μH,J=σE (+ Jsource)\mathbf{D} = \varepsilon\mathbf{E}, \qquad \mathbf{B} = \mu\mathbf{H}, \qquad \mathbf{J} = \sigma\mathbf{E} \ (+\ \mathbf{J}_\text{source})

for linear, isotropic, non-dispersive media. Real materials can be anisotropic (ε\varepsilon a matrix: crystals, some PCB laminates), nonlinear (iron near saturation, Magnetic Materials) or dispersive (ε\varepsilon depends on frequency: every material, eventually; Time-Harmonic Fields handles that with complex permittivity).

Charge conservation is built in. Take the divergence of the Ampère–Maxwell law and use Gauss's law: 0=∇⋅J+∂ρv/∂t0 = \nabla \cdot \mathbf{J} + \partial\rho_v/\partial t, the continuity equation (Displacement Current). Likewise, the divergence of Faraday's law shows that ∇⋅B\nabla \cdot \mathbf{B} cannot change in time. So for time-varying fields the two divergence equations act as initial conditions; the two curl equations carry the dynamics.

Boundary conditions

Applying the integral forms to a thin pillbox and a thin rectangular loop that straddle an interface (normal n^\hat{\mathbf{n}} pointing from medium 2 into medium 1) gives four conditions valid for any time dependence:

Quantity Condition From
tangential E\mathbf{E} n^×(E1−E2)=0\hat{\mathbf{n}} \times (\mathbf{E}_1 - \mathbf{E}_2) = 0 Faraday (the loop's area, and so its flux, shrinks to zero)
tangential H\mathbf{H} n^×(H1−H2)=K\hat{\mathbf{n}} \times (\mathbf{H}_1 - \mathbf{H}_2) = \mathbf{K} Ampère–Maxwell
normal D\mathbf{D} n^⋅(D1−D2)=ρs\hat{\mathbf{n}} \cdot (\mathbf{D}_1 - \mathbf{D}_2) = \rho_s Gauss (electric)
normal B\mathbf{B} n^⋅(B1−B2)=0\hat{\mathbf{n}} \cdot (\mathbf{B}_1 - \mathbf{B}_2) = 0 Gauss (magnetic)

These generalise the static conditions of Electrostatic Boundary Conditions and Magnetic Boundary Conditions. At a perfect electric conductor (no fields inside): Etan=0\mathbf{E}_\text{tan} = 0 and Bn=0B_n = 0 at the surface, while the surface charge and surface current carry whatever DnD_n and Htan\mathbf{H}_\text{tan} the outside field has. Surface currents K\mathbf{K} exist only on perfect conductors; at an interface between real materials Htan\mathbf{H}_\text{tan} is continuous. These four lines are what Reflection at Normal Incidence and Rectangular Waveguides use.

Worked example: does this field obey Maxwell's equations?

Given: in free space, E=10cos⁡(2π⋅108 t−kz) x^ V/m\mathbf{E} = 10\cos(2\pi \cdot 10^8\, t - kz)\,\hat{\mathbf{x}}\ \text{V/m}, no charges or currents.

Find: the H\mathbf{H} that goes with it, and the value of kk that makes all four equations hold.

Solve: ∇⋅D=ε0 ∂Ex/∂x=0\nabla \cdot \mathbf{D} = \varepsilon_0\,\partial E_x/\partial x = 0, as required. Faraday's law:

∇×E=∂Ex∂zy^=10ksin⁡(ωt−kz) y^=−μ0∂H∂t⇒ H=10kωμ0cos⁡(ωt−kz) y^\begin{aligned} \nabla \times \mathbf{E} &= \frac{\partial E_x}{\partial z}\hat{\mathbf{y}} = 10k\sin(\omega t - kz)\,\hat{\mathbf{y}} = -\mu_0\frac{\partial \mathbf{H}}{\partial t} \\ \Rightarrow\ \mathbf{H} &= \frac{10k}{\omega\mu_0}\cos(\omega t - kz)\,\hat{\mathbf{y}} \end{aligned}

Now Ampère–Maxwell must also hold: ∇×H=−∂Hy/∂z x^=ε0 ∂E/∂t\nabla \times \mathbf{H} = -\partial H_y/\partial z\,\hat{\mathbf{x}} = \varepsilon_0\,\partial\mathbf{E}/\partial t. Working it through gives k2/(ωμ0)=ωε0k^2/(\omega\mu_0) = \omega\varepsilon_0, so

k=ωμ0ε0=2π⋅1082.998×108=2.096 rad/m,H0=E0μ0/ε0=10376.7=26.54 mA/mk = \omega\sqrt{\mu_0\varepsilon_0} = \frac{2\pi \cdot 10^8}{2.998 \times 10^8} = 2.096\ \text{rad/m}, \qquad H_0 = \frac{E_0}{\sqrt{\mu_0/\varepsilon_0}} = \frac{10}{376.7} = 26.54\ \text{mA/m}

Check: λ=2π/k=2.998 m\lambda = 2\pi/k = 2.998\ \text{m} and the field pattern moves at ω/k=c\omega/k = c. E\mathbf{E}, H\mathbf{H} and the direction of travel form a right-handed set (x^×y^=z^\hat{\mathbf{x}} \times \hat{\mathbf{y}} = \hat{\mathbf{z}}). Not every field is allowed: pick any other kk and Faraday's and Ampère's laws contradict each other. The two curl equations together demand waves at speed 1/μ0ε01/\sqrt{\mu_0\varepsilon_0}, Maxwell's prediction (his paper read in 1864, published in 1865) and Hertz's experiments of 1887.

In Python: SymPy does the vector calculus

python · try it yourself
import sympy as sp
from sympy.vector import CoordSys3D, curl, divergence

R = CoordSys3D("R")
t, w, k, E0, mu, eps = sp.symbols("t omega k E_0 mu epsilon", positive=True)
x, y, z = R.x, R.y, R.z

# trial fields: E along x, H along y, both travelling in +z
H0 = sp.Symbol("H_0", positive=True)
E = E0 * sp.cos(w * t - k * z) * R.i
H = H0 * sp.cos(w * t - k * z) * R.j

gauss_e = sp.simplify(divergence(eps * E))
gauss_m = sp.simplify(divergence(mu * H))
faraday = (curl(E) + mu * sp.diff(H, t)).to_matrix(R).applyfunc(sp.simplify)
ampere = (curl(H) - eps * sp.diff(E, t)).to_matrix(R).applyfunc(sp.simplify)
print("div D =", gauss_e, "  div B =", gauss_m)
print("Faraday residual:", list(faraday))
print("Ampere residual: ", list(ampere))

# where sin(kz - wt) = 1 the residuals are just their amplitudes
amps = [r.subs({t: 0, z: sp.pi / (2 * k)}) for r in (faraday[1], ampere[0])]
print("amplitude conditions:", amps)
sol = [s for s in sp.solve(amps, [H0, k], dict=True) if s[k].is_positive]
print("solution:", sol)

# numbers: 100 MHz in free space, E0 = 10 V/m
num = {w: 2 * sp.pi * 1e8, mu: 4e-7 * sp.pi, eps: 8.854e-12, E0: 10}
s = sol[0]
print(f"k = {float(s[k].subs(num)):.4f} rad/m, lambda = {float(2*sp.pi/s[k].subs(num)):.4f} m")
print(f"H0 = {float(s[H0].subs(num))*1e3:.3f} mA/m, E0/H0 = {float((E0/s[H0]).subs(num)):.2f} Ohm")
div D = 0   div B = 0
Faraday residual: [0, (-E_0*k + H_0*mu*omega)*sin(R.z*k - omega*t), 0]
Ampere residual:  [(-E_0*epsilon*omega + H_0*k)*sin(R.z*k - omega*t), 0, 0]
amplitude conditions: [-E_0*k + H_0*mu*omega, -E_0*epsilon*omega + H_0*k]
solution: [{H_0: E_0*sqrt(epsilon)/sqrt(mu), k: sqrt(epsilon)*sqrt(mu)*omega}]
k = 2.0958 rad/m, lambda = 2.9980 m
H0 = 26.544 mA/m, E0/H0 = 376.73 Ohm

The two amplitude conditions are exactly Faraday's and Ampère's laws for this field; their only positive solution is k=ωμεk = \omega\sqrt{\mu\varepsilon} and H0=E0ε/μH_0 = E_0\sqrt{\varepsilon/\mu}, the plane wave of the next section.

Interactive: the solution you just found

The ee-em-wave lab draws this field: 10 V/m10\ \text{V/m} at 100 MHz100\ \text{MHz}. Its readouts give λ=2.998 m\lambda = 2.998\ \text{m}, k=2.096 rad/mk = 2.096\ \text{rad/m} and H0=26.54 mA/mH_0 = 26.54\ \text{mA/m}, the numbers of the worked example. E\mathbf{E} and H\mathbf{H} peak together and are perpendicular to each other and to the direction of travel.

zxyEpeak 10.0 V/mHpeak 26.5 mA/m (x eta0)travels in +z; lambda = 3.00 m (2 wavelengths shown)yxE at z = 0, seen from behindlinear01/e101 delta2 delta3 delta4 delta5 delta|E|/|E surface|into copper at 100 MHz:skin depth delta = 6.61 umgood-conductor formula: 6.61 umsigma/(omega eps) = 1.04e+10

Quasi-statics: when can a term be dropped?

Circuit theory is Maxwell's equations with the coupling terms neglected where they are small. Over a region of size ℓ\ell at frequency ff:

  • Electroquasistatic (capacitors, high-impedance circuits): neglect ∂B/∂t\partial\mathbf{B}/\partial t in Faraday's law, so E=−∇V\mathbf{E} = -\nabla V again.
  • Magnetoquasistatic (inductors, transformers, machines, eddy currents): neglect ∂D/∂t\partial\mathbf{D}/\partial t in Ampère's law (but keep it where it charges a capacitor).
  • Both are good when ℓ≪λ\ell \ll \lambda, the lumped condition of the introduction. When ℓ\ell approaches λ/10\lambda/10, keep everything: transmission lines and radiation.

Guided lab: measure the speed Maxwell predicted

Hand calculation. In a coaxial cable filled with solid polyethylene (εr=2.25\varepsilon_r = 2.25), Maxwell's equations give a speed v=c/εr=1.999×108 m/sv = c/\sqrt{\varepsilon_r} = 1.999 \times 10^8\ \text{m/s}, so a 10 m10\ \text{m} length delays a signal by 50.0 ns50.0\ \text{ns}.

Simulation. The SymPy script with eps set to 2.25ε02.25\varepsilon_0.

What you would measure. Connect a function generator's fast-edge pulse output (or a square wave with rise time under 5 ns5\ \text{ns}) through a BNC T-piece at the scope's channel 1 to 10 m10\ \text{m} of RG-58 (solid PE dielectric) whose far end goes to channel 2 with a 50 Ω50\ \Omega feed-through terminator. Measure the delay between the 50 %50\ \% points of the two edges: expect about 50 ns50\ \text{ns} (RG-58's velocity factor is 0.660.66, giving 50.5 ns50.5\ \text{ns}). With a 100 MHz100\ \text{MHz} scope, the edge timing is good to about ±1 ns\pm 1\ \text{ns} and the cable length to ±2 cm\pm 2\ \text{cm}, so the velocity factor comes out to within about ±2 %\pm 2\ \%. Use equal-length short leads for both channels, or measure the instrument skew first with the cable removed.

Hazards and safe setup. Signal-generator levels only; no hazards beyond tripping over the cable.

Pitfalls

  • Mixing B\mathbf{B} and H\mathbf{H} in the boundary conditions. Normal B\mathbf{B} and tangential H\mathbf{H} (without surface current) are continuous, not normal H\mathbf{H}.
  • Taking the divergence equations as independent of the curl equations. For time-varying fields they follow from them plus charge conservation.
  • Forgetting the material is in the constants. In a dielectric D=εE\mathbf{D} = \varepsilon\mathbf{E}, and kk grows by εrμr\sqrt{\varepsilon_r\mu_r}.
  • Applying the point forms across an interface. Derivatives do not exist where fields jump; use the boundary conditions there.

Practice

  1. Show that E=E0cos⁡(ωt−kz)z^\mathbf{E} = E_0\cos(\omega t - kz)\hat{\mathbf{z}} cannot be a wave in free space.
  2. At a boundary with n^=z^\hat{\mathbf{n}} = \hat{\mathbf{z}}, medium 1 above, H1=3x^+4z^ A/m\mathbf{H}_1 = 3\hat{\mathbf{x}} + 4\hat{\mathbf{z}}\ \text{A/m} with μr1=1\mu_{r1} = 1; medium 2 has μr2=4\mu_{r2} = 4 and no surface current. Find H2\mathbf{H}_2.
  3. Repeat the worked example for a dielectric with εr=4\varepsilon_r = 4: find kk and H0H_0.
Answer
  1. ∇⋅E=∂Ez/∂z=kE0sin⁡(ωt−kz)≠0\nabla \cdot \mathbf{E} = \partial E_z/\partial z = kE_0\sin(\omega t - kz) \ne 0 in a charge-free region, violating Gauss's law; a plane wave's field must be transverse to its direction of travel.
  2. Tangential H\mathbf{H} continuous: H2x=3H_{2x} = 3. Normal B\mathbf{B} continuous: μ0⋅4=4μ0H2z\mu_0 \cdot 4 = 4\mu_0 H_{2z}, so H2z=1H_{2z} = 1. H2=3x^+1z^ A/m\mathbf{H}_2 = 3\hat{\mathbf{x}} + 1\hat{\mathbf{z}}\ \text{A/m}.
  3. k=2⋅2.096=4.192 rad/mk = 2 \cdot 2.096 = 4.192\ \text{rad/m}; η=376.7/2=188.4 Ω\eta = 376.7/2 = 188.4\ \Omega, H0=10/188.4=53.1 mA/mH_0 = 10/188.4 = 53.1\ \text{mA/m}.

Test yourself

Which of Maxwell's equations says that magnetic flux lines have no beginning or end?

  1. ∇⋅D=ρv\nabla \cdot \mathbf{D} = \rho_v
  2. ∇⋅B=0\nabla \cdot \mathbf{B} = 0
  3. ∇×E=−∂B/∂t\nabla \times \mathbf{E} = -\partial\mathbf{B}/\partial t
  4. ∇×H=J+∂D/∂t\nabla \times \mathbf{H} = \mathbf{J} + \partial\mathbf{D}/\partial t

At the surface of a perfect electric conductor, which field component must be zero?

  1. normal D\mathbf{D}
  2. tangential H\mathbf{H}
  3. tangential E\mathbf{E}
  4. all of them

Taking the divergence of the Ampère–Maxwell law and using Gauss's law gives…

  1. Faraday's law
  2. the continuity equation
  3. the wave equation
  4. Ohm's law

For a 10 V/m10\ \text{V/m}, 100 MHz100\ \text{MHz} wave in free space, Maxwell's curl equations require $H_0 = $…

  1. 10 A/m10\ \text{A/m}
  2. 26.5 mA/m26.5\ \text{mA/m}
  3. 3.33 mA/m3.33\ \text{mA/m}
  4. 376.7 A/m376.7\ \text{A/m}