Vector fields

Introduction

A real-valued function may be called a scalar field. The word ‘field’ indicates a mathematical structure that assigns a concrete object of a certain fixed type to every point in space. A function may be interpreted as assigning a scalar value, the output , to each point in space.

A vector field assigns a vector value to each point of space. The data of a vector field can be conveyed as a collection of coordinate functions, where each coordinate function takes a point in space as input:

(In 3D, the vector field has 3 coordinate functions.) We can also represent the same data as:

Attachments/Pasted image 20231020124504.png
Attachments/Pasted image 20231020124534.png
Vector fields in 3D are harder to visualize:
Attachments/Pasted image 20231020125001.png
Vector fields are often used to represent a fluid flow (the vector gives flow velocity) or a force field (vector gives force). Both types of data require the assignment of a vector to each point in space.

Link to original

Gradient

Gradient

Given a function , a natural vector field may be formed using its partial derivative functions. This is called the gradient of , and is called the potential function of this vector field:

In 3D, the gradient of has components .

Recall that the partial is large when increases steeply in the direction, and it is large and negative when increases steeply in the direction. These facts generalize with the combined components: points in the direction of steepest increase of . This can be understood by recalculating the formula for :

Gradient and directional derivative

If we consider unit vectors pointing in various directions, we see that the greatest value of occurs when aligns with . This means that points in the direction in which is largest, i.e. the direction of steepest incline.

Link to original

Exercise

01

Compute gradient

For each of the following functions, compute the gradient:

  • (a)
  • (b)
  • (c) .
Link to original

Exercise

02

Derivative using gradient

Let . Find at the point , where , by first computing the gradient and evaluating a dot product.

Link to original

Gradient (part 2)

Attachments/Pasted image 20231020130900.png
Attachments/Pasted image 20231020131013.png

The level curves of a function are the sets of points satisfying for various . The gradient vector is perpendicular to the level curves:
Attachments/Pasted image 20231020144022.png

Proposition: Gradient level curves

The level curves to are perpendicular to the gradient vector.

Proof: Let parametrize the level curve , so for all . Then:

so .

This result can be generalized to surfaces. The level surfaces of a function are given by . Any curve in such a level surface satisfies , and therefore . This means the tangent plane to a level surface has normal vector given by at any given point.

Link to original

Example

Tangent plane to a hyperboloid

Tangent plane to a hyperboloid

Problem: Find the tangent plane at to the one-sheeted hyperboloid given by .

Solution: Consider the function , so the hyperboloid is the level curve . The normal vector is then given by the gradient . At this takes the value . The tangent plane is perpendicular to this vector and passes through :

Attachments/Pasted image 20231020155653.png

Link to original

Exercise

03

Direction with given slope

You are hiking on a mountain with altitude in meters given by the function:

You are at the point . Which two directions could you head (as an angle from the -axis) in order to ascend at a 20% grade?

Link to original

Gradient (part 3)

If you follow the gradient vectors, you will go up or down a path of steepest ascent. This is also the path that crosses levels curves most quickly.
Attachments/Pasted image 20231020151007.png

Link to original

Line integrals II: vector fields, aligned

Introduction

The aligned vector line integral is the integral of a vector field over a curve according to its alignment with the curve. It measures how much the vector field flows along the curve. It does not depend on the chosen parametrization (i.e. on the speed), but its sign depends on the direction traveled along the curve. It is given for a parametric curve that traverses its image one time, together with a vector field , by the formula:

Here we use the infinitesimal vector . This is the tangent vector scaled by ; alternatively it is the vector of infinitesimal travel of the particle during .

The same line integral is sometimes written with a different notation:

This notation is produced by writing and expanding the dot product.

To evaluate a line integral in this notation, first write a parametrization that traverses exactly once, then substitute for , and for , and for , then factor out the and evaluate the integral in .

Attachments/Pasted image 20231021151818.png

Link to original

Exercise

01

Vector line integral over a curve

Compute the line integral , where and is traversed by the parametric curve , .

Link to original

Example

Vector line integral

Vector line integral

Problem: Compute , where is an ellipse parametrized by .

Solution: First calculate that and . Plug everything into the integrand to obtain:

Simplify this and evaluate:

Link to original

Exercise

02

Vector line integral over a segment

Compute the line integral , where is the line segment from to .

Link to original

Curl

Introduction

In what follows we study a 2D version of the Fundamental Theorem of Calculus called Green’s Theorem. The 1D integral over the -axis is upgraded to a double integral over a 2D region . The derivative is replaced by a new kind of derivative called ‘curl’. The difference taken on the boundary of the 1D interval is upgraded to the line integral taken around the boundary of the 2D region .

Link to original

Curl as derivative operator

Curl as derivative operator

Start with a vector field with vector components , where and are functions of points in space.

From this we create a scalar field called the scalar curl of , written . This field is calculated with the formula:

One way to remember this formula is to create a vector-derivative-operator with components , and then take the cross product “”, applying and to the function components of . (Interpret and as 3D vectors with zero -component.) The result is a vector with only a -component. The subscript indicates that we are just taking the scalar value of that -component.

Link to original

Example

Computing scalar curl

Computing scalar curl

Suppose . Then , considered as a function of .

Link to original

Exercise

01

Computing scalar curl

Compute , where .

Link to original

Exercise

02

Computing scalar curl

Compute , where .

Link to original

Exercise

03

Understanding curls

  • (a) Draw the vector field .
  • (b) Compute the curl , where .
  • (b) Draw the vector field from 12A-02.
Link to original

Exercise

04

Line integral and vector field

What is the vector field being integrated in this line integral?

Link to original

Curl as measure of circulation

Curl as measure of circulation

The scalar curl field can be explained as a measure of circulation of the vector field around each point in space.
Attachments/Pasted image 20231108130424.png
It is good to understand how this works. Below we calculate the circulation of around a small box. In a Problem, you calculate the circulation of around a small circular loop.

Consider a small box with bottom left corner at a point in the plane, and sides of length and . Label the sides with subscripts for left, right, top, bottom as in the picture:
Attachments/Pasted image 20231107141906.png
The ‘circulation’ we wish to calculate is the aligned vector line integral around this box:

Break this into four integrals, one over each side of the box. Define parametric curves traversing each side, with for each case:

  • For side , take .
    • Observe that and .
  • For side , take .
    • Observe that and .
  • For side , take .
    • Observe that and .
  • For side , take .
    • Observe that and .

Notice that on , and the others simplify in a similar way because of the zeros in the vectors.

We are considering small boxes , and we will in fact take a limit as the sides go to zero. It is appropriate to use the linear approximation for each component and on the box, with differentials from the point . This lets us write the circulation integral in terms of and , evaluated at the point ; these appear in the curl formula we are trying to explain. Write for the components of .

  • For side , we have .
  • For side , we have .
  • For side , we have .
  • For side , we have .

Now plug everything in and compute four integrals in :

Simplify this by cancelling some terms and combining some others:

Notice that is the area of the box. The bigger the box, the greater the effect of circulation.

The scalar curl is the limit of the ratio of circulation to the enclosed area, for boxes shrinking to zero:

Link to original

Exercise

05

Circulation calculated around circles

Repeat the reasoning above but going around a small circle instead of a box.
You can use the single parametrization for a small constant, and the center point of the circle.

The derivation is faster with this method, but circles do not tile the plane the way boxes do, and we need a tiling of the plane to prove Green’s Theorem.

Link to original

Green’s Theorem

Introduction

The main theorem of 2D calculus is called Green’s Theorem, but it could be called more expressively “The Fundamental Theorem of 2D Calculus”. It says that the integral of curl over a region is equal to the total circulation on the boundary:

Green’s Theorem

When is a region of the -plane with boundary , then:

Writing this in terms of component functions, we have:

Link to original

Example

Area of a region calculated from the boundary

Area of a region calculated from the boundary

Set . Then while , so the LHS of Green’s Theorem reduces to the enclosed area. We then have:

For example, an ellipse is given by . Note . The area of an ellipse is therefore:

Link to original

Example

Faster calculation of line integral using Green’s Theorem

Faster calculation of line integral using Green’s Theorem

Problem: Find , where is given as in the picture:
Attachments/Pasted image 20231108161241.png
Solution: The interior of the region is covered by one double integral in polar coordinates, and that is easier to compute than four line integrals, so we use Green’s Theorem to convert to a double integral. We choose the vector field so that gives the line element. Then , and we compute:

Link to original

Exercise

01

Faster calculation of line integral using Green’s Theorem

Compute , where is the triangle with vertices , , and (traversed in order).

Link to original

Understanding Green’s Theorem

Understanding Green’s Theorem

To understand the reasoning behind Green’s Theorem, it is important to remember why the 1D version of the Fundamental Theorem of Calculus is true.

FTC derivation reminder: telescoping summation

Let . We would like to see why .

If and are very close, we could write . Ignoring the error term, we see that , and the RHS is the area of a box with base and height . This is when is very small.

If and are farther apart, divide into intervals:

Assume for simplicity that for every . Now analyze each small difference using a linear approximation:

Subtracting from both sides and plugging into the summation, obtain:

If we ignore the error term and take the limit as with , then the first summation (a Riemann sum) becomes .

To account for the error term properly, take small enough that for some fixed positive number . Then as the error summation limits to zero:

To summarize, the key idea is that we add up all the small differences . In the sum, internal cancellation occurs, leaving just the boundary difference . On the other hand, each small difference is approximated by . (The linear approximation of using .) The sum of these terms is exactly the Riemann sum for the integral .

Even more briefly, the integral adds up many microscopic differences in which are written in the form .

Attachments/Pasted image 20231108170408.png

Green’s Theorem can be explained with exactly the same process, except that instead of differences, we have circulations, and instead of that approximates a small difference, we have that approximates a small circulation. To add up circulations, we collect 2D squares, but there is still internal cancellation leaving only the terms on the boundary curve of the region.

Derivation of Green’s Theorem

We need to divide the region into microscopic squares. Let each square be identified by its bottom-left corner at point , where . Each square has width and height . Let denote the set of squares fully contained inside (specifically, the set of ordered pairs identifying the bottom-left corner of a square contained in ).
Attachments/Pasted image 20231109095847.png

The circulation around the square at is approximated by . The error terms need to be collected as well; the exact circulation differs by an error term with magnitude less than , where is a positive function of satisfying , for some , as . (Notice that this can be chosen so it doesn’t depend on by taking the biggest one of those used for any of the squares in .)

Now we add up all the circulations. The internal sides of boxes, which are shared between two boxes, will have a component of the integral traversed in each direction. These traversals contribute the same number with opposite signs, and therefore cancel. So, the total sum of circulations is equal to the circulation around the outer edges of the shape made by all squares of width which fit entirely in the domain. This is a 2D version of the cancellation in 1D that occurs between and , for example.
Attachments/Pasted image 20231109095712.png
Attachments/Pasted image 20231109102052.png

Considering now the sum of approximations, we have the sum of the values multiplied by the area of the squares, . This is a Riemann sum that limits to as and the number of boxes goes to . So the circulations add up to the boundary circulation around the squares contained in , and the sum of approximations using adds up to the integral of over the region.

Now let’s address the error term. Each small square has an error less than , which is less than for some positive number based on the guarantees on the behavior of . The number of boxes is . Let’s say the total area of the region is . The area covered by the boxes is so , and thus . The total error with all boxes is less than . But as . So the total error goes to zero.
Attachments/Pasted image 20231109102111.png

Going deeper

One remaining issue should be addressed. Does the boundary converge to the boundary of ? Or, at least, does the circulation on the boundary of the collection of squares converge to the circulation on ?

This question is difficult to address using the concepts in this course. Instead of addressing it fully, we just explain how the circulation on a squared boundary can approximate the correct circulation on an angled boundary. Strictly speaking, this kind of explanation will then work for polygons, but by considering linear approximations of boundaries, the explanation is also good for smooth boundaries that have first derivatives.

Consider an angled line segment parametrized by for . Approximate this by rectangular stair steps, two vertical for every one horizontal, of width . Consider the bottom step , with horizontal piece and vertical piece . The line integral over this step, horizontal and vertical, is:

whereas the line integral over the corresponding segment of , written , is:

If we assume is small enough that is (nearly) constant on the square containing and , then these two values are nearly equal. One can then take the sums over all on one hand, and on the other hand, and track errors as before, and find that as they converge to the same thing.

Interior boundary curves

Some shapes have boundary lines on the inside. Do not forget to include these lines as part of the total boundary in Green’s Theorem! The orientation of these lines should be consistent with counter-clockwise circulation around infinitesimal boxes near the boundary. In the figure below, and are oriented correctly, while has the wrong orientation. The boundary is therefore .
Attachments/Pasted image 20231111124247.png

Link to original

Path dependence

Introduction

Green’s Theorem expresses a relationship between circulation around the boundary and infinitesimal circulation in the interior. (Infinitesimal circulation is the curl times ). It says that adding up all the infinitesimal circulations gives the boundary circulation.

This relationship, considered from another angle, is connected to the idea of path independence. Consider two particle paths travelling between the same start and end points. Write for the first path, parametrized by , and for the second path, parametrized by . Write for the starting point, and for the ending point.
Attachments/Pasted image 20231111130946.png
Now consider the question: do the line integrals and have the same value for these two paths?

The vector field is said to be conservative or path independent if the answer is yes, and path dependent or non-conservative if the answer is no.

Consider the question more quantitatively. What is the value of the difference ? In fact, this difference is the same as the sum of line integrals around a closed loop starting and ending at . The complete path is written as :
Attachments/Pasted image 20231111131406.png
(Here the path is the same path as but traversed in the opposite direction.)

By Green’s Theorem, the integral of over the region between the two paths gives the difference . In particular, if (in some region), then by Green’s Theorem the line integral from to does not depend at all on the path taken! (Provided the path remains in the region where .)

Path independence is also connected to the gradient:

Link to original

Exercise

01

Gradient fields are conservative

Suppose for some scalar field . Show that .

Link to original

Challenge problem

02

(not for presentation)

Conservative fields are gradients

Suppose that . Find a scalar field such that . (Hint: define it using line integrals along paths!)

Link to original

Introduction (part 2)

Simply connected regions

Path independence is equivalent to only for simply connected domains. These are domains without any holes, meaning that any loop can be tightened down to a point in the domain.

If there are holes, then it is possible to construct a field in the part of the domain outside the hole, such that there, but path independence is no longer strictly valid. Paths that wrap around the missing hole can have different line integrals. In fact, the line integral measures the number of times a path wraps around the hole. Two paths that wrap the same number of times differ by some enclosed region outside the hole where , so the line integrals on these paths must agree!

Link to original

Exercise

03

Gradient of angle

Let . Show that:

We saw above that for . Compute the integral , where is a path that winds -times around a circle of radius . (For example, with .)

Notice that is not defined at . So the applicable domain for Green’s Theorem has a ‘hole’ containing .

Link to original

Fundamental Theorem of Line Integrals

Introduction

The following conditions for a vector field are equivalent:

  • is path independent,
  • in the region (which is simply connected, i.e. no holes),
  • for some scalar field .

When these conditions hold, is called conservative. Then for two paths and from to , and for a scalar field .

(Note: when the domain is not simply connected, then the curl condition is not strong enough, but the first and last conditions are still equivalent to each other and the word ‘conservative’ applies when these two conditions hold.)

The Fundamental Theorem of Line Integrals gives the value that is common to these line integrals over various paths:

FT of Line Integrals

For any path from point to point , we have:

If gives the elevation on a mountain at point , then gives the rate of incline in the direction of steepest ascent. The line integral of along any hiking path then gives the total change in elevation.

Derivation of FT of Line Integrals

Take any parametrization of given for . Now . By the chain rule for paths (in reverse), this is equal to . So can apply the ordinary FTC:

Link to original

Exercise

01

FT of Line Integrals: elevation gain

Consider the vector field . Choose any path between and . Verify the FT for line integrals by computing the elevation gain on your chosen path in two ways (computing both sides of the FT). For the right side, you will need to first find a field such that .

Link to original