# Vector Fields

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

We have now seen many types of functions. They are characterized by the domain and the range. Below is a list of some of the functions that we have encountered so far.

Domain |
Range |
Name |
---|---|---|

\(\mathbb{R}\) | \(\mathbb{R}\) | One variable Function |

\(\mathbb{R}\) | \(\mathbb{R}^2\) | Parametric Equations |

\(\mathbb{R}^2\) | \(\mathbb{R}\) | Function of 2 Variables |

\(\mathbb{R}\) | Vectors | Vector Valued Function |

By letting the domain be \(\mathbb{R}^n\) and the range be n-dimensional vectors, we get a new type of functions called a vector field.

Definition: Vector Field

A *vector field *is be a function where the domain is \(\mathbb{R}^n\) and the range is \(n\)-dimensional vectors.

Example \(\PageIndex{1}\)

An important vector field that we have already encountered is the *gradient vector field*. Let \(f(x,y)\) be a differentiable function. Then the function that takes a point \(x_0,y_0\) to \(\nabla f(x_0,y_0)\) is a vector field since the gradient of a function at a point is a vector. For example, if

\[f(x,y) = 0.1xy - 0.2y\]

then

\[\nabla f(x,y) = 0.1y\hat{\textbf{i}} + (0.1x - 0.2) \hat{\textbf{j}} \]

The sketch of the gradient is pictured below.

The best way to sketch a vector field is to use the help of a computer, however it is important to understand how they are sketched. For this example, we pick a point, say \((1,2)\) and plug it into the vector field

\[\nabla f(1,2) = 0.2 \hat{\textbf{i}} - 0.2 \hat{\textbf{j}} \]

Next, sketch the vector that begins at \((1,2)\) and ends at \((1 + .2, .2 - .1)\). Notice that when we sketch vector fields, we use the definition that involves two points rather than the definition that assumes all vectors emanate from the origin.

Example \(\PageIndex{2}\)

In physics, many vector fields satisfy the *inverse square law*. A vector field \(\textbf{F}\) satisfying the inverse square law has the property that if

\[\textbf{r} = x \hat{\textbf{i}} + y \hat{\textbf{j}} + z \hat{\textbf{k}} \]

and **u** is the unit vector in the direction of **r** (\(\textbf{u} = \frac{r}{||r||}\)), then

\[F(x,y,z)= \dfrac{k}{||r||^2}u \]

Examples of force fields that satisfy the inverse square law are gravitational force fields and electric force fields. Below is a plot of a vector field that satisfies the inverse square law.

Notice that as the distance from the origin gets small, the vector become small quickly. For gravity, this tells us that as we fly away from the earth, we experience less gravity, until it seems like weightlessness.

Other examples of vector fields that occur in nature include velocity fields. For example, the currents in the ocean ensure movement of the water. The if we sketch the velocity vector of at each point of the ocean, we get a vector field. A similar velocity field is produced from wind in the atmosphere.

### Conservative Vector Fields

Our first and most important example was the gradient vector field. Can we go backwards? That is, given a vector field \(\textbf{F}\), can we construct a function \(f\) with the property that

\[\textbf{F}= \nabla f \]

The answer to this question is only for some very special vector fields, which we call conservative.

Definition: Conservative Vector Field

Let \(\textbf{F}\) be a vector field. Then \(\textbf{F}\) is called conservative if there is a differentiable function \(f\) such that

\[\nabla f = \textbf{F} \]

\(f\) is called the potential function for \(\textbf{F}\).

Fortunately, we do not need to flounder about to determine if a vector field \(\textbf{F}\) is conservative; we use the following argument:

If

\[\textbf{F}= \langle M,N \rangle \]

is conservative, then

\[ \langle M,Q \rangle = \nabla f = \langle f_x,f_y \rangle \]

So that

\[M = f_x \label{eq1A}\]

and

\[N=f_y \label{eq1B} \]

Now take partial derivatives with respect to \(y\) of Equation \ref{eq1A} and with respect to \(x\) of Equation \ref{eq1B} to get

\[M_y=f_{xy}\]

and

\[N_x = f_{yx} \]

Since mixed partial derivative are the same (for nice functions) we get

\[M_y=N_x \]

This turns out to be both a necessary and sufficient condition for a vector field to be conservative.

Theorem: Testing of Conservativeness

If \(M\) and \(N\) have continuous first order partial derivatives, then the vector field

\[\textbf{F} = M \hat{\textbf{i}} + N \hat{\textbf{j}} \]

is conservative if and only if

\[M_y = N_x \]

Example \(\PageIndex{3}\)

Determine which of the two vector fields are conservative

- \(\textbf{F}= 3xy \hat{\textbf{i}}- x^2 \hat{\textbf{j}} \)
- \(\textbf{G}=(1+2xy) \hat{\textbf{i}}+ (x^2-2) \hat{\textbf{j}} \)

**Solution**

For part A. we find

\[M_y=3x \;\;\; \text{and} \;\;\; N_x=-2x\]

Since they are not equal the vector field is not conservative.

For part B. we find

\[M_y=2x \;\;\; \text{and} \;\;\; N_x=2x\]

They are equal, so the vector field is conservative.

Once we know that a vector field is conservative, how do we find the potential function? We investigate the relations

\[M=f_x \;\;\; \text{and} \;\;\; N=f_y\]

Example \(\PageIndex{4}\)

Find the potential function for the conservative vector field in the last example

\[\textbf{G}=( 1+2xy) \hat{\textbf{i}}+ (x^2-2) \hat{\textbf{j}} \nonumber \]

**Solution**

We have

\[M=1+2xy=f_x\]

Integrating both sides with respect to \(x\) we get

\[x+x^2y+c(y)=f(x,y)\]

Notice that the constant of integration may involve \(y\) terms since we are treating \(y\) as a constant. Now differentiate with respect to \(y\) to get

\[x^2+c'(y)=f_y=N=x^2-2\]

Thus

\[c'(y) = -2\]

Integrating with respect to \(y\), we get

\[c(y) = -2y\]

We do not need a constant of integration here since we just want "a" potential function not the general potential function. Putting it all together, we get the potential function

\[f(x,y)=x+x^2y-2y \]

### The Curl of a Vector Field

If \(\textbf{F}\) is a vector field then we want to look at what operation we can do to it. One such operation is called the *Curl of *\(\textbf{F}\). We define it as follows.

Definition: Curl of a Vector Field

If \(\textbf{F}\) is a differentiable vector field with

\[\textbf{F} = M \hat{\textbf{i}}+N \hat{\textbf{j}}+P\hat{\textbf{k}} \]

then

\[\begin{align} Curl \; \textbf{F} &= \nabla \times \textbf{F} \\ &= \begin{vmatrix} \hat{\textbf{i}} & \hat{\textbf{j}} & \hat{\textbf{k}} \\ \partial x &\partial y &\partial z \\ M &N &P \end{vmatrix} \\ &=(P_y-N_z) \hat{\textbf{i}} -(P_x-M_z) \hat{\textbf{j}}+(N_x-M_y) \hat{\textbf{k}} \end{align}\]

Notice that for a two dimensional vector field, where there is only a **k** component for a cross product, that if the curl is zero then the vector field field is conservative; actually more is true. Remembering that all second order partial derivatives are independent of order for nice functions, we have

Theorem: The curl of a conservative vector field

Let \(\textbf{F}\) be a three dimensional differentiable vector field with continuous partial derivatives. Then

\[Curl \; \textbf{F} =0 \]

if and only if \(\textbf{F}\) is *conservative*.

Example \(\PageIndex{5}\)

Determine if the vector field

\[\textbf{F}=yz^2 \hat{\textbf{i}} +(xz^2+2) \hat{\textbf{j}} + (2xyz-1) \hat{\textbf{k}} \]

is conservative. If it is, find a potential function.

**Solution**

We calculate

\[\begin{align} Curl \textbf{F} &= \begin{vmatrix} \hat{\textbf{i}} & \hat{\textbf{j}} & \hat{\textbf{k}} \\ \partial x & \partial y & \partial z \\ yz^2 &xz^2 &2xyz-1 \end{vmatrix} \\ &= (2xz-2xz) \hat{\textbf{i}} - (2yz-2yz) \hat{\textbf{j}} +(z^2-z^2) \hat{\textbf{k}} \\ &=0 \end{align}\]

The vector field is conservative. Now equate

\[f_x = yz^2 \]

and integrate to get

\[f=xyz^2+c(y,z) \]

Notice the constant now depends on both \(y\) and \(z\), since they were held constant when we integrated. Now take a partial with respect to \(y\) to get

\[xz^2=f_y=xz^2+2 \]

Hence

\[c_y(y,z)=2 \]

Integrate with respect to \(y\) to get

\[c(y,z) = 2y + c(z)\]

Notice that \(z\) is the only "constant" remaining. We get

\[f=xyz^2+2y+c(z) \]

Now take a derivative with respect to z to get

\[2xyz + c'(z) = f_z = 2xyz - 1\]

so that

\[c'(z) = -1\]

finally integrate to get

\[c(z) = -z\]

The potential function is

\[f(x,y,z) = xyz^2 + 2y - z\]

### The Divergence of a Vector Field

The curl of a vector field was defined as the cross product of the "dell" operator with the vector field. A curious student may try to take a dot product instead and see where it leads.

Definition: The Divergence of a Vector Field

If **F** is a differentiable vector field with

\[\textbf{F}=M \hat{\textbf{i}}+N \hat{\textbf{j}}+P \hat{\textbf{k}} \]

then

\[div \; \textbf{F}=\nabla \cdot \textbf{F} = M_y+N_y+P_z \]

Notice that the curl of a vector field is a vector field, while the divergence of a vector field is a real valued function.

Example \(\PageIndex{6}\)

Find the divergence of the vector field

\[\textbf{F}=(x-3y) \hat{\textbf{i}} +(x^2z^2+\cos(z^2)) \hat{\textbf{j}}+(xyz^2) \hat{\textbf{k}} \]

**Solution**

We just take the three partial derivatives and add them up

\[ (1) + (0) + (2xyz) = 1 + 2xyz\]

Larry Green (Lake Tahoe Community College)