Divergence of Vector Field


Divergence of Vector Field

Corey
Hey Maria, in our last session we covered the Del operator and gradient. Today I want to dive into divergence. It's a crucial concept in electromagnetics.

Maria
Absolutely! Divergence measures how much a vector field spreads out from a point. It's the net outward flux per unit volume from an infinitesimally small volume around that point.

Corey
So mathematically, it's the dot product of Del with the vector field. In Cartesian coordinates, that gives ∂Ax/∂x + ∂Ay/∂y + ∂Az/∂z. That's straightforward.

Maria
Right. And the physical interpretation is key: positive divergence means net outflow, negative means net inflow, and zero means equal in and out. That's what makes it so useful for Gauss's law.

Corey
Let's derive it properly. If we consider a small cube with sides dx, dy, dz, the flux through each face can be expanded using Taylor series. For the x-direction, the net flux becomes (∂Ax/∂x) dx dy dz.

Maria
Exactly. And when you add the y and z components, you get total flux = (∂Ax/∂x + ∂Ay/∂y + ∂Az/∂z) times the volume. Dividing by volume gives the divergence. That's why ∇·A equals that sum.

Corey
This leads to the divergence theorem: the flux through a closed surface equals the volume integral of the divergence inside. It's a powerful shortcut for calculating flux.

Maria
But the expression changes in other coordinate systems. In cylindrical coordinates, the area perpendicular to ρ increases with ρ, so we get a factor of ρ inside the derivative.

Corey
Right! In cylindrical, the divergence is (1/ρ) ∂(ρ Aρ)/∂ρ + (1/ρ) ∂Aφ/∂φ + ∂Az/∂z. The ρ term accounts for the expanding area. Similarly, in spherical coordinates, the r² and sinθ factors appear.

Maria
In spherical, it's (1/r²) ∂(r² Ar)/∂r + (1/(r sinθ)) ∂(Aθ sinθ)/∂θ + (1/(r sinθ)) ∂Aφ/∂φ. The r² term comes from the area increasing with r², and sinθ from the area changing with θ.

Corey
Let's apply this with an example. Suppose we have a vector field A = r ar - 3 aθ + 5φ aφ in spherical coordinates, and we want the flux through a quarter-sphere from r=0 to 4, θ=0 to π/2, φ=0 to 3π/2.

Maria
Using the divergence theorem, we first compute ∇·A. For the given field, the r-term gives 3, the θ-term gives -3 cotθ / r, and the φ-term gives 5/(r sinθ). So ∇·A = 3 - (3 cotθ)/r + 5/(r sinθ).

Corey
Then we integrate over the volume. The volume element is r² sinθ dr dθ dφ. Multiplying gives (3r² sinθ - 3r cosθ + 5r) dr dθ dφ. Integrating separately, the first term yields 96π, the second -36π, and the third 30π².

Maria
So the total flux is 60π + 30π². That's much simpler than calculating the surface integral directly. The divergence theorem is a real time-saver.

Corey
Exactly. And understanding divergence conceptually helps us grasp other topics like Gauss's law for electricity and magnetism. It's a fundamental tool in electromagnetic theory.

Maria
Absolutely. I think we've got a solid handle on divergence now. Next time we can move on to curl. Same format?

Corey
Sounds good! Let's meet again soon to tackle that.

Ask anything
We've read this whole study set, so questions about it get the best answers.