---
title: "Verify divergence theorem, D field"
subject: "Electromagnetism"
chapter: 1
key: "semester_3/electromagnetism:verify-divergence-theorem-dr-theta"
source: https://www.bctengineer.com/q/semester_3/electromagnetism/verify-divergence-theorem-dr-theta
site: BCT Engineering
---

# Verify divergence theorem, D field

Electromagnetism · Chapter 1: Introduction

- Asked in: 2073 Shrawan, 8 marks
- Video: [Electromagnetic fields 47: Divergence Theorem: Example (1)](https://www.youtube.com/watch?v=m_U36N_AV78) — Study with Dr. Hisham أدرس مع د. هشام
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/electromagnetism/verify-divergence-theorem-dr-theta
- Whole chapter: https://www.bctengineer.com/md/semester_3/electromagnetism/chapter-1

## Question

Given the flux density D = (2cosθ/r³) a_r + (sinθ/r³) a_θ C/m², evaluate both sides of the divergence theorem for the region defined by 1 < r < 2, 0 < θ < π/2, 0 < φ < π/2.

## Short answer

The volume integral of ∇·D is zero, and the closed surface flux also sums to zero, verifying the divergence theorem.

## Answer

**Divergence theorem:** The net outward flux of **D** through a closed surface equals the volume integral of ∇ · D over the enclosed volume: ∮ D · dS = ∫ (∇ · D) dv.

**Given:** D = (2cosθ/r³) a_r + (sinθ/r³) a_θ C/m². Region: 1 < r < 2, 0 < θ < π/2, 0 < φ < π/2.

#### Right side: volume integral

```text
∇ · D = (1/r²) ∂(r² D_r)/∂r + (1/(r sinθ)) ∂(sinθ D_θ)/∂θ + (1/(r sinθ)) ∂D_φ/∂φ
```

(D has no φ-component, so the last term is zero.)

```text
(1/r²) ∂(r² · 2cosθ/r³)/∂r = (1/r²) ∂(2cosθ/r)/∂r = −2cosθ/r⁴
(1/(r sinθ)) ∂(sinθ · sinθ/r³)/∂θ = (1/(r sinθ)) (2 sinθ cosθ / r³) = 2cosθ/r⁴

∇ · D = −2cosθ/r⁴ + 2cosθ/r⁴ = 0
```

So ∫ (∇ · D) dv = **0**.

#### Left side: closed surface integral

The region has five faces.

```text
1. Outer, r = 2:   dS = r² sinθ dθ dφ a_r,  D_r = 2cosθ/8
   Ψ = ∫₀^(π/2)∫₀^(π/2) (2cosθ/8)(4) sinθ dθ dφ = ∫ cosθ sinθ dθ · ∫dφ = (1/2)(π/2) = π/4

2. Inner, r = 1:   dS = −r² sinθ dθ dφ a_r,  D_r = 2cosθ
   Ψ = −∫∫ 2cosθ sinθ dθ dφ = −(1)(π/2) = −π/2

3. Face θ = π/2 (part of the xy-plane): outward normal is +a_θ, dS = r sinθ dr dφ a_θ
   D_θ = 1/r³ at θ = π/2:
   Ψ = ∫₀^(π/2)∫₁² (1/r³)(r) dr dφ = (1/2)(π/2) = π/4

4. θ = 0: this is only the z-axis (zero area): Ψ = 0

5. φ = 0 and φ = π/2 faces: D has no a_φ component, so D · dS = 0.
```

Total flux:

```text
Ψ = π/4 − π/2 + π/4 + 0 = 0
```

**Answer:** Both sides equal **0**, so the divergence theorem is verified. (D is solenoidal here: the same flux enters through r = 1 as leaves through r = 2 and θ = π/2.)

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is ∇·D for D = (2cosθ/r^3) a_r + (sinθ/r^3) a_θ?
   A. 4cosθ/r^4
   B. 0, because the two terms cancel (-2cosθ/r^4 + 2cosθ/r^4)
   C. -2cosθ/r^4
   D. 2cosθ/r^4
   Answer: B. The radial term gives -2cosθ/r^4 and the θ term gives +2cosθ/r^4, so the sum is zero and the volume integral is zero. (Key point: Divergence value)

2. Which faces of the region contribute flux?
   A. Only r = 2
   B. r = 2, r = 1 and θ = π/2
   C. All five faces equally
   D. Only the φ faces
   Answer: B. The r = 2, r = 1 and θ = π/2 faces carry flux. The φ faces get none since D has no a_φ component, and θ = 0 is only an axis with no area. (Key point: Surface faces)

3. Why is the flux through r = 1 negative (-π/2)?
   A. D_r is negative there
   B. The outward normal there is -a_r, pointing toward the origin
   C. The area is negative
   D. Because r is smaller
   Answer: B. The outward normal of the region at the inner sphere is -a_r, so D·dS = -D_r dS and the flux is negative. (Key point: Inner surface sign)

4. What is the total outward flux?
   A. π/4 + π/2 + π/4 = π
   B. π/4 - π/2 + π/4 = 0, equal to the volume integral
   C. π/2
   D. -π/2
   Answer: B. Fluxes are π/4 (outer), -π/2 (inner) and π/4 (θ = π/2), summing to 0, which agrees with the divergence integral. (Key point: Total flux)

## Related in Electromagnetism

- [Verify divergence theorem, quarter hemisphere](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Averify-divergence-theorem-hemisphere) — Electromagnetism, chapter 1
- [Evaluate Stokes' theorem for G field](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Astokes-theorem-evaluate-g-field) — Electromagnetism, chapter 1
- [Verify Stokes' theorem, conical surface](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Averify-stokes-conical-surface) — Electromagnetism, chapter 1
- [Polarization and E in both regions](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Adielectric-boundary-x-polarization-e) — Electromagnetism, chapter 2
- [Energy density in electrostatic field](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Aenergy-density-electrostatic-field) — Electromagnetism, chapter 2, asked 2×

## Related in other subjects

- [Verify Gauss' divergence theorem F=yi+xj+z²k](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Averify-gauss-divergence-theorem-f-yi) — Mathematics III, chapter 2, asked 2×
- [Evaluate using Gauss' divergence theorem F=(2xy+z)i+y²j−(x+3y)k](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aevaluate-using-gauss-divergence-theorem-f-four) — Mathematics III, chapter 2, asked 9×
- [Verify Gauss' divergence theorem F=x²i+3j+yzk](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Averify-gauss-divergence-theorem-f-x2i) — Mathematics III, chapter 2
- [Evaluate using Gauss' divergence theorem](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aevaluate-using-gauss-divergence-theorem) — Mathematics III, chapter 2, asked 11×
