# Divergence of a Vector Field

A **vector** is a quantity that has a *magnitude* in a certain *direction*. Vectors are used to model forces, velocities, pressures, and many other physical phenomena. A **vector field** is a function that assigns a vector to every point in space. Vector fields are used to model force fields (gravity, electric and magnetic fields), fluid flow, etc.

The divergence of a vector field F = <P,Q,R> is defined as the partial derivative of P with respect to x plus the partial derivative of Q with respect to y plus the partial derivative of R with respect to z.

The divergence of a vector field is also given by:

We define the divergence of a vector field at a point, as the net outward flux of per volume as the volume about the point tends to zero.

∇ ∙ __A__ = *div*__A__

In Cartesian

∇ ∙ __A__ ≡ *∂A*_{x}/∂_{x} + ∂A_{y}/∂_{y} + ∂A_{z}/∂_{z}

In Cylindrical

∇ ∙ __A__ ≡ *∂(r ∙ Ay*_{)}/(r ∙ ∂_{r)} + ∂A_{ø}/(r ∙ ∂_{ø)} + ∂A_{z}/∂_{z}

In Spherical

∇ ∙ __A__ ≡ *∂(R*^{2} ∙ A_{R)}/(R^{2}∙∂_{R)} + ∂(A_{ø }∙ sinθ)/(R ∙ sinθ ∙ ∂θ_{)} + ∂A_{ø}/(R ∙ sinθ ∙ ∂_{ø})

**Example 1:** Compute the divergence of *F(x, y) = 3x*^{2}i + 2yj.

Solution: The divergence of *F(x, y)* is given by ∇•*F(x, y)* which is a dot product.

**Example 2:** Calculate the divergence of the vector field *G(x,y,z) = e*^{x}i + ln(xy)j + e^{xyz}k.

Solution: The divergence of *G(x,y,z)* is given by ∇•* G(x,y,z)* which is a dot product. Its components are given by:

*G*_{1} = e^{x}

*G*_{2} = ln(xy)

*G*_{3} = e^{xyz}

and its divergence is:

**Example 3:** Calculate the divergence of the vector field *G(x, y, z) = 4y/x*^{2} · i + (sin y)j + 3k

Solution: The divergence of *G(x, y, z) *is given by ∇•* G(x,y,z) *which is a dot product. Its components are given by:

*G*_{1} = 4y/x^{2}

*G*_{2} = (sin y)

*G*_{3} = 3

and its divergence is