Skip to content
GATEiit

GATE EE · Electromagnetic Fields

Divergence

Pointwise divergence operator in Cartesian, cylindrical, and spherical coordinates, Maxwell's equation div D = rho_v, and the divergence theorem.

Before you start

Concept notes

1. Physical Meaning and Limit Definition of Divergence

The divergence of any vector field A at a point is the net outward flux per unit volume as the enclosing differential volume Δv shrinks around the point:

∇⋅A=lim⁡Δv→0∮SA⋅dSΔv

  • Source (∇⋅A>0): More flux lines leave the infinitesimal box than enter (positive volume charge density ρv>0 for D).
  • Sink (∇⋅A<0): Flux lines converge inward (negative charge density ρv<0).
  • Solenoidal (∇⋅A=0): Entering flux balances exiting flux (∇⋅B=0 everywhere for magnetostatics, and ∇⋅D=0 in charge-free regions).
Δv∇·A > 0source (ρv > 0 for D)Δv∇·A < 0sink (ρv < 0)Δv∇·A = 0solenoidal (∇·B = 0)∇·A = lim ∮S A·dS / Δv (Δv → 0)
Divergence is net outward flux per unit volume: positive at a source, negative at a sink, zero for solenoidal fields like B.

2. Curvilinear Coordinate Expansions

Because radial unit vectors fan out with radius, curvilinear derivatives include metric scale factors (h1h2h3):

  1. Cartesian (x,y,z): ∇⋅A=∂Ax∂x+∂Ay∂y+∂Az∂z
  2. Cylindrical (ρ,ϕ,z): ∇⋅A=1ρ∂(ρAρ)∂ρ+1ρ∂Aϕ∂ϕ+∂Az∂z
  3. Spherical (r,θ,ϕ): ∇⋅A=1r2∂(r2Ar)∂r+1rsin⁡θ∂(Aθsin⁡θ)∂θ+1rsin⁡θ∂Aϕ∂ϕ

3. Divergence Theorem and Maxwell's First Equation

Summing differential outflow across adjacent sub-cells cancels all shared interior wall fluxes, leaving the outer boundary flux (Gauss-Ostrogradsky divergence theorem):

∮SD⋅dS=∫V(∇⋅D) dv=∫Vρv dv  ⟹  ∇⋅D=ρv

This pointwise PDE lets you reconstruct the local volume charge density ρv directly by differentiating any known spatial flux density field D.

Formulas to remember

Point Charge Density EquationLocal charge density equals divergence of electric flux density
∇⋅D=ρv
Cartesian DivergenceScalar output from three partial derivatives
∇⋅A=∂xAx+∂yAy+∂zAz
Cylindrical DivergenceLine-charge D ~ 1/rho yields zero divergence everywhere for rho > 0
∇⋅A=1ρ∂(ρAρ)∂ρ+1ρ∂Aϕ∂ϕ+∂Az∂z
Spherical DivergencePoint-charge D ~ 1/r^2 gives r^2 * A_r = constant, hence zero divergence away from origin
∇⋅A=1r2∂(r2Ar)∂r+1rsin⁡θ∂(sin⁡θ Aθ)∂θ+1rsin⁡θ∂Aϕ∂ϕ
Divergence TheoremRequires closed smooth or piecewise-smooth bounding surface S around volume V
∮SA⋅dS=∫V(∇⋅A) dv

Common mistakes

  • Forgetting the ρ or r2 factor inside the derivative in cylindrical 1ρ∂ρ(ρAρ) and spherical 1r2∂r(r2Ar) divergence.
  • Confusing ∇⋅A (scalar output) with ∇V or ∇×A (vector outputs).
  • Applying the divergence theorem to an open surface like a half-cylinder without including its missing closing faces.
  • Omitting sin⁡θ inside 1rsin⁡θ∂(sin⁡θ Aθ)∂θ for spherical polar components.
  • Assuming uniform constant radial magnitude Ar=C in spherical or cylindrical coordinates has zero divergence.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Finding Volume Charge Density from D(x,y,z)

numerical

Given D=x2a^x+2yza^y+z2a^z mC/m2, find ρv at point (2,1,3) m.

  1. Step 1: Take Cartesian partial derivatives

    Try it on paper first.

Example 2: Evaluating Flux Over a Closed Cylinder via Divergence Theorem

numerical

Evaluate ∮SD⋅dS over the closed cylinder 0≤ρ≤2, 0≤z≤3 when D=ρza^ρ+2ρ2a^ϕ+z2a^z.

  1. Step 1: Compute cylindrical divergence of D

    Try it on paper first.

Example 3: Solenoidal Condition for Cylindrical Radial Field

conceptual

Why does a radial vector field A=cρa^ρ have ∇⋅A=0 for all ρ>0 even though its field lines spread out radially?

  1. Step 1: Apply cylindrical divergence operator

    Try it on paper first.

Example 4: Flux from Spherical Vector Field

numerical

Given D=5r2a^r C/m2 in spherical coordinates, find ρv at r=2 m.

  1. Step 1: Apply spherical radial divergence

    Try it on paper first.

Previous year questions

No official GATE EE question is tagged with this topic yet. The topic test below uses practice questions.

Topic test

8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EE syllabus; being checked by a reviewer. Updated 2026-12-04. Spotted a mistake? Use Report an issue on any question, or contact us.