You are currently viewing Maxwell’s Equations Explained in Differential and Integral Form

Maxwell’s Equations Explained in Differential and Integral Form

ELECTROMAGNETISM / VECTOR CALCULUS / INTERACTIVE

Maxwell's four equations, from intuition to formula

Four short lines describe every electric and magnetic effect: charges, magnets, motors, transformers, antennas and light. It is chapter 2 of the learning path; chapter 1 (voltage and current) is the gentler start. This page teaches the language first (fields, flux, circulation, divergence and curl). Then it covers each equation in both forms, and finally shows how the four together produce electromagnetic waves. Every graphic is live: drag objects, change sliders, and watch.

Chapter 3: Maxwell's equations in matter (D, H, P, M) and how a permanent magnet works, with a real 3 mm NdFeB datasheet decoded and the magnet's field in 2D and 3D.

Chapter 1: What voltage really is, and how U = R·I follows from Maxwell's equations, from the basics, with many live experiments. Chapter 4: Where does the current flow in a plate? Variational principles and a step-by-step derivation studio.

0 · The big picture

Four equations, two questions each

Every Maxwell equation answers one of two questions about a field: "Does it spread out from a point?" (that is divergence, or flux through a closed surface) or "Does it swirl around a point?" (that is curl, or circulation around a loop). Ask both questions about E and B and you get four equations. Click a card.

Spreads out? (divergence / flux)Swirls? (curl / circulation)
Electric field EYes, from charges: GaussOnly where B changes: Faraday
Magnetic field BNever: Gauss for magnetismAround currents and changing E: Ampère-Maxwell
1 · What is a field?

An arrow attached to every point in space

A vector field assigns an arrow (a direction and a length) to every point. E(x,y,z,t) is the force a tiny +1 C test charge would feel there. B describes the force on moving charges. You can draw a field three ways: as arrows, as field lines (curves that follow the arrows; their density shows strength), or as flow (imagine the field as the velocity of a fluid, the most useful picture for div and curl).

View:  | 

Drag the charges. Lines start on + and end on −. They never cross, and they crowd together where the field is strong.

2 · How to read the symbols

A vocabulary of fewer than 15 symbols

SymbolRead asMeaningUnit
E"E field"Electric field: force per chargeV/m
B"B field"Magnetic flux densityT (tesla)
ρ"rho"Charge density: charge per volumeC/m³
J"current density"Current per cross-section area, as a vector pointing in the flow directionA/m²
ε₀"epsilon naught"Permittivity of vacuum, 8.854·10⁻¹² F/m. Says how "hard" it is to make E: large ε₀ means a weak E per charge.F/m
μ₀"mu naught"Permeability of vacuum, ≈ 4π·10⁻⁷ H/m. Says how much B a current makes.H/m
∇"nabla" or "del"The vector of partial derivatives (∂/∂x, ∂/∂y, ∂/∂z). It is an operator: it needs a field to act on.1/m
∇·"div"Divergence: how much the field flows out of a point. Result is a number (scalar).
∇×"curl"Curl: how much and around which axis the field swirls at a point. Result is a vector.
∂/∂t"partial d by d t"Rate of change in time at a fixed point in space1/s
∯∂V … · dA"closed surface integral"Add up flux over a surface with no holes (a bag). ∂V means "the boundary of volume V". dA is a tiny patch of area as a vector pointing outward.
∮∂S … · dl"closed line integral"Walk once around a closed loop, adding up the field component along the path. ∂S is the edge of surface S.
∬S … · dA"surface integral"Flux through an open surface S (like a soap film stretched over a loop)
a · b"dot"|a||b|cos θ: how much a points along b
a × b"cross"A vector perpendicular to both, with length |a||b|sin θ (right-hand rule)
Sign conventions to remember. For closed surfaces, dA points outward. For a loop and the surface it bounds, use the right-hand rule: curl the fingers along the walking direction of dl, and the thumb gives the direction of dA.
3 · Flux: the first key idea

How much field passes through a surface

Imagine the field as rain and the surface as a window. Flux = how much rain goes through the window. It depends on the field strength, the area, and the angle. Only the part of E perpendicular to the surface counts: Φ=E·A=EAcosθ. For curved surfaces or non-uniform fields, cut the surface into tiny patches dA and add up: ∬E·dA.

Tilt θ
Field strength

The green arrow is the area vector A: perpendicular to the window, with length equal to its area. At θ=0 every line goes through: maximal flux. At 90° the rain just slides past: zero. Past 90° the flux becomes negative, because the field goes through backwards.

A closed surface has an inside and outside, so we count outgoing as +, incoming as −. The net flux tells you whether something inside is producing or swallowing field.

4 · Circulation: the second key idea

How much field pushes you along a loop

Walk around a closed loop. At each step dl, ask "how much does the field push me forward?" That is E·dl. Add it up over the whole loop: ∮E·dl. For E, this is the voltage you gain on one round trip (the EMF). If it is non-zero, the field "goes around".

Field:

The walker moves around the loop. The bar graph accumulates E·dl: green when the field pushes forward, red when it pushes back.

Uniform field: what you gain on one side you lose on the other, so the total is 0. Radial field: also 0. Vortex: you are pushed forward the whole way, so the total is non-zero.

5 · Divergence and curl: flux and circulation shrunk to a point

The two local questions you can ask a field

Divergence ∇·F, "how much comes out of here?"

Put a tiny box around a point, measure the net outward flux, and divide by the box volume. Let the box shrink to zero:

∇·F=limV→0∯F·dAV=∂Fx∂x+∂Fy∂y+∂Fz∂z

Read ∂Fx/∂x as: "does the x-flow get stronger as I move in x?" If more leaves on the right than enters on the left, something in between is producing flow. Positive = source (faucet), negative = sink (drain), zero = whatever enters also leaves.

Curl ∇×F, "how much does it spin here?"

Put a tiny paddle wheel at the point. The curl is the circulation per area around a tiny loop. Its direction is the wheel's axis (right-hand rule):

(∇×F)z=limA→0∮F·dlA=∂Fy∂x−∂Fx∂y

Read ∂Fy/∂x as: "is the upward flow stronger on the right than on the left?" If so, the wheel gets pushed counter-clockwise. Curl is about differences across the wheel, not about whether the lines look circular.

Field:

Drag the probe. The dashed square shows the flux through each side (red = out, blue = in), and the paddle wheel spins with the local curl. Try these surprises:

  • Shear (a river that is faster in the middle): the lines are straight, but the wheel still spins. There is curl without circular lines.
  • Wire 1/r vortex (the B field outside a wire): the lines are circles, but away from the centre the wheel does not spin. Curl is zero everywhere except the centre. All the circulation comes from the current at the centre.
  • Point charge: the arrows spread out, but the divergence is zero everywhere except at the charge. The field gets weaker exactly fast enough to compensate (as 1/r² in 3D, as 1/r in this flat picture).
6 · The bridge between the two forms

Why each law comes in a "differential" and an "integral" form

The differential form is a statement about each single point (div and curl). The integral form is about a whole region (flux and circulation). Two theorems translate between them. Both use the same trick: inner contributions cancel.

Divergence (Gauss) theorem

∯∂VF·dA=∭V(∇·F)dV

Cut the volume into cells. Whatever leaves one cell through a shared wall enters its neighbour, so shared walls cancel. Only the outer skin is left. Total outflow = sum of all the little sources inside.

Stokes' theorem

∮∂SF·dl=∬S(∇×F)·dA

Tile the surface with tiny loops, all turning the same way. Each inner edge is walked twice, once in each direction, so it cancels. Only the outer boundary is left. Circulation around the edge = sum of all the tiny swirls inside.

So ∇·E = ρ/ε₀ at every point ⇔ ∯E·dA = Q/ε₀ for every bag, and ∇×E = −∂B/∂t at every point ⇔ ∮E·dl = −dΦB/dt for every loop. Same physics, viewed under a microscope or from a distance.
7 · Equation 1: Gauss's law

Charges are the sources and sinks of the electric field

Differential form, click each part
∇·E=ρε0
"The divergence of E equals the charge density divided by epsilon-naught."
Integral form, click each part
∯∂VE·dA=Qencε0
"The total electric flux out of any closed surface equals the enclosed charge divided by epsilon-naught."
Click a part of the formula.
Drag the charges and the surface. Drag the small handle to resize it.

Lines that cross the surface are marked: ● out (+1), ● in (−1). A charge outside sends lines in and out the same number of times, so its net is 0. A charge inside contributes the same amount no matter the shape or size of the surface. This is the 1/r² law in disguise: the sphere's area grows like r² exactly as the field weakens like 1/r². (In this flat picture the circle's length grows like r and the field weakens like 1/r, the 2D version of the same balance.)

Worked example: field of a point charge (Coulomb's law from Gauss)

Choose a sphere of radius r around q. By symmetry E is radial and has the same size everywhere on the sphere, so ∯E·dA = E·4πr². Gauss: E·4πr² = q/ε₀ ⇒ E = q/(4πε₀r²). That is Coulomb's law.

Worked example: inside a metal / Faraday cage

In a conductor at rest E = 0 inside (otherwise charges would move). Then ∇·E = 0 ⇒ ρ = 0 inside: all excess charge sits on the surface.

8 · Equation 2: Gauss's law for magnetism

There are no magnetic charges: B lines never end

Differential form
∇·B=0
"The divergence of B is zero everywhere."
Integral form
∯∂VB·dA=0
"The net magnetic flux out of any closed surface is zero."
Click a part of the formula.
Drag the bag (circle). Whatever goes in also comes out.

B lines form closed loops: they go out of the N pole, around, and back in at S, then continue through the magnet. Cut a magnet and you get two smaller magnets, never an isolated N. Compare with section 7: electric lines start and end on charges, magnetic lines have no start or end.

Inside a real permanent magnet, B still has zero divergence, but H does not. Chapter 3 explains why, using a real 3 mm NdFeB cube: remanence, coercivity, its field in 2D and 3D, and its pull force.
9 · Equation 3: Faraday's law of induction

A changing magnetic field creates a swirling electric field

Differential form
∇×E=−∂B∂t
"The curl of E equals minus the rate of change of B."
Integral form
∮∂SE·dl=−ddt∬SB·dA
"The EMF around a loop equals minus the rate of change of magnetic flux through it."
Click a part of the formula.
or drag the magnet left/right yourself.

Top: the magnet moves through a coil. Bottom: the flux ΦB through the coil (blue) and the induced EMF = −dΦ/dt (red). No motion means no voltage, however strong the magnet. Only change counts. The minus sign is Lenz's law: the induced current flows so that its own field opposes the change. This is how generators, transformers, wireless chargers and electric guitar pickups work.

Important consequence: without a changing B, ∇×E = 0, so E is "conservative" and voltage is well defined (KVL works). With a changing B, the circulation of E is non-zero, and "the voltage between two points" depends on the path. That is why scope probe ground loops pick up noise. Chapter 1 builds voltage up from scratch and derives U = R·I.
10 · Equation 4: Ampère-Maxwell law

Currents and changing electric fields create a swirling magnetic field

Differential form
∇×B=μ0J+μ0ε0∂E∂t
"The curl of B equals mu-naught times the current density plus mu-naught epsilon-naught times the rate of change of E."
Integral form
∮∂SB·dl=μ0Ienc+μ0ε0ddt∬SE·dA
"The circulation of B around a loop equals mu-naught times (the current through it plus epsilon-naught times the rate of change of electric flux through it)."
Click a part of the formula.
Both surfaces share the same loop (green).

A capacitor is charging. B swirls around the wire, and the same loop must give the same answer for any surface it bounds. S1 is pierced by the wire, so Ienc = I. S2 passes between the plates, where no charge flows, so Ienc = 0. Without Maxwell's extra term this is a contradiction. The fix: between the plates E is growing, and ε₀ dΦE/dt = I exactly. Maxwell called this the displacement current. With it, both surfaces agree.

Why the extra term is forced: charge conservation

Take the divergence of both sides. div(curl anything) = 0, so 0 = μ₀∇·J + μ₀ε₀ ∂(∇·E)/∂t = μ₀(∇·J + ∂ρ/∂t). This is the continuity equation: charge cannot vanish, only flow away. Without the ∂E/∂t term we would get ∇·J = 0, which is false for a charging capacitor.

Worked example: field around a straight wire

Choose a circle of radius r. By symmetry B is tangential and constant: ∮B·dl = B·2πr = μ₀I ⇒ B = μ₀I/(2πr).

11 · All four together: light

Changing E makes B, changing B makes E, and the pair travels on its own

In empty space (ρ = 0, J = 0) equations 3 and 4 feed each other. Taking the curl of Faraday and inserting Ampère-Maxwell gives the wave equation:

∇2E=μ0ε0∂2E∂t2c=1μ0ε0≈299 792 458m/s

Maxwell computed this speed from two numbers measured with coils and capacitors, and got the speed of light. Light is an electromagnetic wave.

Frequency E ⟂ B ⟂ direction of travel, in phase, |E| = c|B|. Drag the picture to rotate it in 3D.
Derivation step by step
  1. Faraday: ∇×E = −∂B/∂t. Take the curl: ∇×(∇×E) = −∂(∇×B)/∂t.
  2. Insert Ampère-Maxwell with J = 0: = −μ₀ε₀ ∂²E/∂t².
  3. Vector identity: ∇×(∇×E) = ∇(∇·E) − ∇²E, and Gauss with ρ = 0 gives ∇·E = 0.
  4. Result: ∇²E = μ₀ε₀ ∂²E/∂t². This is a wave with v² = 1/(μ₀ε₀).
12 · Cheat sheet

Everything on one page

NameDifferentialIntegralIn words
Gauss∇·E=ρ/ε0∯E·dA=Qenc/ε0Charges are sources of E
Gauss (mag.)∇·B=0∯B·dA=0No magnetic monopoles
Faraday∇×E=−∂B/∂t∮E·dl=−dΦB/dtChanging B swirls E
Ampère-Maxwell∇×B=μ0J+μ0ε0∂E/∂t∮B·dl=μ0Ienc+μ0ε0dΦE/dtCurrents and changing E swirl B

In materials it is common to write ∇·D = ρfree and ∇×H = Jfree + ∂D/∂t with D = εE and H = B/μ. The structure is the same, the medium is hidden inside ε and μ (full chapter in Chapter 3). Plus the Lorentz force F = q(E + v×B), which tells charges how to move in the fields.

13 · Check yourself

Quiz

SI units, vacuum form. The simulations are 2D teaching models: fields are drawn in a plane using the 2D version of each law (a charge's field falls off as 1/r, a magnet is a flat solenoid). In that model the fluxes and circulations shown are computed numerically and the cancellations are exact; absolute magnitudes are illustrative.

Leave a Reply