Benjamin Crowell · Simple Nature Ch. 8 · CC BY-SA 3.0
Changing electric fields create magnetic fields. Changing magnetic fields create electric fields. Maxwell's equations unify electricity and magnetism into a single theory, and predict that light is an electromagnetic wave.
Faraday's law
A changing magnetic flux through a loop induces an EMF (voltage). Faraday's law: EMF = -d(Phi)/dt. The minus sign is Lenz's law: the induced current opposes the change that caused it. This is how generators, transformers, and induction cooktops work.
Scheme
; Faraday's law: EMF = -dPhi/dt; For a loop in a changing field:; Phi(t) = B(t) * A * cos(theta); If B changes linearly: EMF = -A * dB/dt
(define pi 3.14159265)
; Circular loop, radius 10 cm
(define r 0.10)
(define A (* pi r r))
; Field changes from 0.5 T to 0.1 T in 0.2 seconds
(define B1 0.5)
(define B2 0.1)
(define dt 0.2)
(define dB (- B2 B1))
(define EMF (* -1 A (/ dB dt)))
(display "Loop area: ") (display A) (display " m^2") (newline)
(display "dB/dt: ") (display (/ dB dt)) (display " T/s") (newline)
(display "Induced EMF: ") (display EMF) (display " V") (newline)
; With N turns, EMF is N times larger
(define N 100)
(display "EMF with ") (display N) (display " turns: ")
(display (* N EMF)) (display " V")
Python
importmath
r = 0.10
A = math.pi * r**2
dB_dt = (0.1 - 0.5) / 0.2
EMF = -A * dB_dt
print(f"Loop area: {A:.4f} m^2")
print(f"dB/dt: {dB_dt:.1f} T/s")
print(f"Induced EMF: {EMF:.4f} V")
print(f"EMF with 100 turns: {100*EMF:.2f} V")
Inductance
A coil's own changing current induces a back-EMF in itself. Inductance L measures how much flux a coil produces per amp of current: L = Phi/I. A solenoid of N turns, length l, area A has L = mu_0 * N^2 * A / l. The energy stored in an inductor is (1/2) * L * I^2.
Scheme
; Inductance of a solenoid: L = mu0 * N^2 * A / length; Energy stored: U = 0.5 * L * I^2
(define pi 3.14159265)
(define mu0 (* 4 pi 1e-7))
(define (solenoid-inductance N A length)
(/ (* mu0 N N A) length))
(define (inductor-energy L I)
(* 0.5 L I I))
; 1000-turn solenoid, 5 cm radius, 30 cm long
(define N 1000)
(define r 0.05)
(define A (* pi r r))
(define length 0.30)
(define L (solenoid-inductance N A length))
(display "Inductance: ") (display L) (display " H") (newline)
(display "Inductance: ") (display (* L 1000)) (display " mH") (newline)
; Energy at 2 A
(define I 2.0)
(define U (inductor-energy L I))
(display "Energy at 2 A: ") (display U) (display " J")
Maxwell's equations
Four equations govern all of electromagnetism. Gauss's law for E: charges are sources of electric field. Gauss's law for B: there are no magnetic monopoles. Faraday's law: changing B creates E. Ampere-Maxwell law: currents and changing E create B. Maxwell added the displacement current term to Ampere's law, and the whole theory snapped shut.
Scheme
; Maxwell's equations predict electromagnetic waves.; The wave speed falls out of the constants:; c = 1 / sqrt(mu0 * eps0)
(define pi 3.14159265)
(define mu0 (* 4 pi 1e-7))
(define eps0 8.854e-12)
(define c (/ 1 (sqrt (* mu0 eps0))))
(display "Speed of light from Maxwell's equations:") (newline)
(display c) (display " m/s") (newline)
(display "Actual speed of light: 299792458 m/s") (newline)
(display "Ratio: ") (display (/ c 299792458))
; Maxwell computed this in 1865 and recognized; that light is an electromagnetic wave.
An oscillating charge creates oscillating E and B fields that propagate outward at speed c. E and B are perpendicular to each other and to the direction of travel. The wave carries energy: the intensity (power per area) is proportional to E^2. The electromagnetic spectrum, from radio to gamma rays, is all the same phenomenon at different frequencies.
Scheme
; EM wave properties; E and B are related: E = c * B; Intensity: I = (1/2) * c * eps0 * E0^2; Energy density: u = eps0 * E^2
(define c 3e8)
(define eps0 8.854e-12)
(define (em-intensity E0)
(* 0.5 c eps0 E0 E0))
; Sunlight at Earth's surface: E0 ~ 870 V/m
(define E0-sun 870)
(define I-sun (em-intensity E0-sun))
(display "Solar E field amplitude: ")
(display E0-sun) (display " V/m") (newline)
(display "Solar B field amplitude: ")
(display (/ E0-sun c)) (display " T") (newline)
(display "Solar intensity: ")
(display I-sun) (display " W/m^2") (newline)
(display "Expected ~1000 W/m^2 (the solar constant is 1361 W/m^2)")
Neighbors
Cross-references
Calculus Ch.15 — Green, Stokes, Divergence theorems: Maxwell's equations ARE these theorems applied to E and B
The differential forms of Maxwell's equations (div and curl) require vector calculus. The integral forms (Gauss, Faraday, Ampere) are more physical: they say what happens when you draw a closed surface or loop. Crowell develops both. Our code computes with the algebraic consequences rather than the calculus itself. The speed-of-light derivation is exact: Maxwell's prediction matched experiment to high precision.