Vector fields, curl, and divergence

1 Vector fields

A planar vector field is a function \(F : D \to \mathbb {R}^2\) with \(D \subset \mathbb {R}^2\) a region we call the domain of \(F\).

A space vector field is a function \(F : D \to \mathbb {R}^3\) with \(D \subset \mathbb {R}^3\) a region we call the domain of \(F\).

A vector field in general corresponds to having a vector at each point. These are really good to model:

  • Force fields.
  • Electromagnetic fields.
  • Motions of fluids and wind.
  • Ordinary differential equations.

You can draw vector fields on Desmos:

https://www.desmos.com/calculator/eijhparfmd

2 Flows

Given a planar vector field \(F: D \to \mathbb {R}^2\), a flow line is a differentiable curve \(\gamma : [ a,b] \to D \) with

\[ \gamma ' (t) = F (\gamma (t) ) \]

for all \(t\). This means that \(\gamma \) models a particle that at each time, its velocity is the vector provided by \(F\) at its position.

You can create animations of flows of planar vector fields using the following:

Flows of space vector fields are defined analogously.

3 Curl

The curl of a vector field, measures how much rotation (swirl) is generated by its flow. This is measured in very distinct ways in the plane and in the space because angular momentum is encoded in the plane by a scalar and in the space by a vector.

3.1 2D curl

In the plane, rotation is simply either clockwise or counterclockwise.

  • The curl of a vector field \(F\) at a point \(p\) is positive if its flow generates counterclockwise swirl near \(p\).
  • The curl of a vector field \(F\) at a point \(p\) is negative if its flow generates clockwise swirl near \(p\).

3.2 3D curl

In the space, rotation (angular momentum) is encoded by a vector. The angular momentum of a rotation is a vector \(v\) such that:

  • the direction of \(v\) is the axis of rotation.
  • the length of \(v\) is the speed of rotation.
  • looking back at the object from the tip of \(v\), we see it spinning counterclockwise.

This formula is somewhat hard to remember, but if we consider the abstract vector

\[ \nabla = \Big \langle \frac {\partial }{\partial x} , \frac {\partial }{\partial y} , \frac {\partial }{\partial z} \Big \rangle , \]

then

\[ \text {Curl}(F) = \nabla \times F \]

becomes just a cross product.

4 Divergence

The divergence of a vector field at a point measures how much the vector field is pointing away from that point.

Even though the divergence formula is quite simple, it can be simplified more as as dot product:

\[ \text {div} (F) = \nabla \cdot F \]

5 Conservative vector fields

In the plane, a conservative vector field is

\[ F(x,y) = \Big \langle \frac {\partial f}{\partial x} , \frac {\partial f}{\partial y} \Big \rangle \]
Then its curl is
\begin{align*} \text {curl}(F) & = \frac {\partial }{\partial x} \frac {\partial f}{\partial y} - \frac {\partial }{\partial y} \frac {\partial f}{\partial x} \\ & = \frac {\partial ^2 f }{\partial x \partial y } - \frac {\partial ^2 f }{\partial y \partial x } \\ & = 0 \end{align*}

In the space, a conservative vector field is

\[ F(x,y, z) = \Big \langle \frac {\partial f}{\partial x} , \frac {\partial f}{\partial y} , \frac {\partial f}{\partial z } \Big \rangle \]
Then its curl is
\begin{align*} \text {Curl}(F) & = \Big \langle \frac {\partial }{\partial y} \frac {\partial f}{\partial z} - \frac {\partial }{\partial z} \frac {\partial f}{\partial y}, \frac {\partial }{\partial z} \frac {\partial f}{\partial x} - \frac {\partial }{\partial x} \frac {\partial f}{\partial z}, \frac {\partial }{\partial x} \frac {\partial f}{\partial y} - \frac {\partial }{\partial y} \frac {\partial f}{\partial x} \Big \rangle \\ & = \Big \langle \frac {\partial ^2 f}{\partial y\partial z} - \frac {\partial ^2 f}{\partial z\partial y}, \frac {\partial ^2 f}{\partial z \partial x} - \frac {\partial ^2 f}{\partial x \partial z}, \frac {\partial ^2 f}{ \partial x \partial y} - \frac {\partial ^2 f}{\partial y \partial x} \Big \rangle \\ & = \langle 0,0,0 \rangle \end{align*}

Technically, “having no holes” can be defined in terms of curves: any closed curve in \(D\) can be continuously deformed within \(D\) to a single point within \(D\). For example, the domain of

\[ F(x,y) = \Big \langle \frac {-y}{x^2 + y^2 } , \frac {x}{x^2 + y^2} \Big \rangle \]

is \(\mathbb {R}^2 \backslash \{ (0,0) \}\), which contains the unit circle, a curve that cannot be continuously deformed to a single point within \(D\). It is like having a rubber band stuck around a pole.

6 Exercises on vector fields

Consider the planar vector field
\[ F ( x , y ) = \langle e^x \cos y , \sin y + x^2 \rangle \]
Find its curl, divergence, and determine whether it is conservative or not. If it is conservative, find a potential function.

The curl can be computed as

\begin{align*} \text {curl} (F) & = \frac {\partial }{\partial x} ( \sin y + x^2 ) - \frac {\partial }{\partial y } (e^x \cos y) \\ & = 2x + e^x \sin y \end{align*}

For the divergence,

\begin{align*} \text {div} (F) & = \frac {\partial }{\partial x} ( e^x \cos y ) + \frac {\partial }{\partial y } ( \sin y + x^2 ) \\ & = e^x \cos y + \cos y \end{align*}

Since the curl is not zero, \(F\) is not conservative.

Consider the planar vector field
\[ F ( x , y ) = \langle y^2 - x^2 , 2xy \rangle \]
Find its curl, divergence, and determine whether it is conservative or not. If it is conservative, find a potential function.

The curl can be computed as

\begin{align*} \text {curl} (F) & = \frac {\partial }{\partial x} ( 2xy ) - \frac {\partial }{\partial y } ( y^2 - x^2 ) \\ & = 2y - 2y \\ & = 0 \end{align*}

For the divergence,

\begin{align*} \text {div} (F) & = \frac {\partial }{\partial x} ( y^2 - x^2 ) + \frac {\partial }{\partial y } ( 2xy ) \\ & = - 2x + 2x \\ & = 0 \end{align*}

Since the curl is zero, and \(F\) is defined everywhere, it is conservative. To find the potential function, we perform some “partial integration”:

\begin{align*} \frac {\partial f}{\partial x} & = y^2 - x^2 \\ \frac {\partial f}{\partial x} & = 2xy \end{align*}

We get

\begin{align*} f (x,y) & = xy^2 - x^3/3 + a(y)\\ f (x,y) & = xy^2 + b(x) \end{align*}

Matching terms, we get

\[ f(x,y) = xy^2 - x^3/3 + C \]
Consider the space vector field
\[ F ( x , y , z ) = \Big \langle \frac {-y}{x^2 + y^2 } , \frac {x}{x^2 + y^2 } , z \Big \rangle \]
Find its curl, divergence, and determine whether it is conservative or not. If it is conservative, find a potential function.

Before we compute the curl and divergence, we find the partial derivatives

\begin{align*} \frac {\partial P}{\partial x} & = \frac {2xy}{(x^2 + y^2 )^2} \\ \frac {\partial P}{\partial y} & = \frac {y^2 - x^2}{x^2 + y^2 } \\ \frac {\partial P}{\partial z} & = 0 \\ \frac {\partial Q}{\partial x} & = \frac {y^2 - x^2}{x^2 + y^2 } \\ \frac {\partial Q}{\partial y} & = \frac {- 2xy}{(x^2 + y^2 )^2} \\ \frac {\partial Q}{\partial z} & = 0 \\ \frac {\partial R}{\partial x} & = 0 \\ \frac {\partial R}{\partial y} & = 0 \\ \frac {\partial R}{\partial z} & = 1 \\ \end{align*}

The curl is

\begin{align*} \text {Curl} (F) & = \Big \langle 0 - 0 , 0 - 0, \frac {y^2 - x^2}{x^2 + y^2 } - \frac {y^2 - x^2}{x^2 + y^2 } \Big \rangle \\ & = \langle 0,0,0 \rangle \end{align*}

The divergence is

\begin{align*} \text {div} (F) & = \frac {2xy}{(x^2 + y^2 )^2} - \frac {2xy}{(x^2 + y^2 )^2} + 1 \\ & = 1 \end{align*}

The curl is zero, but \(F\) is not defined along the \(z\)-axis, where \(x^2 + y^2 = 0\). We will see later that \(F\) is not conservative.