Line integrals II: vector fields, aligned

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 𝐫(t) that traverses its image π’ž one time, together with a vector field 𝐅, by the formula:

βˆ«π’žπ…β‹…d𝐬=βˆ«π’žπ…(𝐫(t))⋅𝐫′(t)dt.

Here we use the infinitesimal vector d𝐬=𝐫′(t)dt. This is the tangent vector scaled by dt; alternatively it is the vector of infinitesimal travel of the particle during dt.

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

βˆ«π’žπ…β‹…d𝐬=βˆ«π’žF1dx+F2dy+F3dz.

This notation is produced by writing d𝐬=(dx,dy,dz) and expanding the dot product.

To evaluate a line integral in this notation, first write a parametrization 𝐫(t)=(x(t),y(t),z(t)) that traverses π’ž exactly once, then substitute xβ€²(t)dt for dx, and yβ€²(t)dt for dy, and zβ€²(t)dt for dz, then factor out the dt and evaluate the integral in t.

Exercise 11A-01

Vector line integral over a curve

Compute the line integral βˆ«π’žπ…β‹…d𝐬, where 𝐅=(x+y2,xz,y+z) and π’ž is traversed by the parametric curve 𝐫(t)=(t2,t3,βˆ’2t), t∈[0,2].

Example

Vector line integral

Problem: Compute βˆ«π’ž2ydxβˆ’3dy, where π’ž is an ellipse parametrized by 𝐫(ΞΈ)=(5+4cos⁑θ,3+2sin⁑θ).

Solution: First calculate that xβ€²(t)=βˆ’4sin⁑θ and yβ€²(t)=2cos⁑θ. Plug everything into the integrand to obtain:

(5+4cos⁑θ,3+2cos⁑θ)=(2(3+2sin⁑θ)(βˆ’4sin⁑θ)βˆ’3(2cos⁑θ))dΞΈ.

Simplify this and evaluate:

∫02Ο€(2(3+2sin⁑θ)(βˆ’4sin⁑θ)βˆ’3(2cos⁑θ))dΞΈ=βˆ’βˆ«02Ο€24sin⁑θ+16sin2⁑θ+6cos⁑θ=βˆ’16Ο€.
Exercise 11A-02

Vector line integral over a segment

Compute the line integral βˆ«π’žβˆ’ydx+xdyx2+y2, where π’ž is the line segment from (1,0) to (0,1).

Optimization

Review of 1D theory

A regular point of a function f is a point c where fβ€²(c)=mβ‰ 0. A critical point is a point cβˆˆβ„ where fβ€²(c) is either zero or undefined. In calculus, the theory of optimization (finding extremal values) is largely a theory of critical points.

Given a function f(x) of a single variable, its extrema occur either on boundary points of the region, or at critical points of f in the interior of the region. For a closed interval [a,b], the boundary points are a and b, while the interior is the open interval (a,b). Every interior point is either regular or critical. To find extrema, therefore, it suffices to check boundary points, interior points of non-differentiability, and interior points where the derivative is zero.

All of this reasoning may be derived from the linear approximation:

Linear approximation: fβ€²(c)β‰ 0⟹localΒ increase/decreaseΒ possible

If fβ€²(x) exists at c, we can write f near c as:

f(x)=b+mΞ”x+Ξ”xΞ΅(Ξ”x).

Here f(c)=b, fβ€²(c)=m, and Ξ”x=xβˆ’c. Now rewrite this as f(x)=b+(m+Ξ΅)Ξ”x. If m>0, then for Ξ”x small enough, m+Ξ΅>0 because Ξ΅β†’0 as Ξ”xβ†’0. This means there are points a close to c for which f(a)>f(c) (with a>c), and points for which f(a)<f(c) (with a<c). Conversely, if m<0, there are points a near c for which f(a)<f(c) and for which f(a)>f(c).

It follows that if c is a regular point, meaning f′(c)=m≠0, then c is certainly neither a local maximum nor minimum.

The critical points can be evaluated using the first and second derivative tests. For example, if the sign of fβ€² crosses zero at c from above, or if fβ€²β€²(c)<0, the point is a local maximum.

2D theory

The 1D theory may be applied directly to the trace curves of a function f(x,y), i.e. the curves given by z=f(x,b) or z=f(a,y). The result is that if fx(a,b)=mx≠0, or if fy(a,b)=my≠0, then (a,b) is neither a local maximum nor minimum, but rather it would be possible to increase or decrease f by moving along the respective trace curve.

A critical point of f(x,y) is a point (a,b) such that either fx(a,b)=fy(a,b)=0, or at least one of fx,fy doesn’t exist. All extreme values of f(x,y) in the interior of a region must occur, therefore, at critical points.

(Note: the situation where, say, fy fails to exist while fx=mx≠0, counts as a critical point in these notes, but some other authors would not count it. Such points cannot be local extrema by the trace-curve reasoning applied to x.)

The definition of critical points can be encapsulated in a single statement about the gradient:

Info

The point p is a critical point of f if and only if: βˆ‡f(p)=0β†’ or βˆ‡f(p) is undefined.

Global extrema are either local extrema (critical points in the interior), or they lie on the boundary. To check the boundary, one must find a parametrization of the boundary as a curve 𝐫(t), and then optimize the scalar function f(𝐫(t)) of the single variable t using the 1D theory. The extrema on the boundary should then be compared with the local extrema in the interior.

As in the 1D theory, critical points of f(x,y) can be either maxima or minima or neither, and there is a tool involving second-order partials that allows us to classify critical points in many cases. It is called the discriminant. Suppose that fxx,fyy,fxy exist and are continuous near (a,b), a critical point of f(x,y). Define the discriminant D(x,y) by the formula:

D(x,y)=fxx(x,y)fyy(x,y)βˆ’fxy(x,y)2.

This formula is easy to remember as the determinant of the matrix of second-order partials:

D=|fxxfxyfyxfyy|.

Discriminant test

Let (a,b) be a critical point near which the second-order partials are continuous.

  • If D(a,b)=0 the test is inconclusive
  • If D(a,b)<0 then (a,b) is a saddle point
  • If D(a,b)>0 then (a,b) is a max/min:
    • If fxx>0 or fyy>0 then (a,b) is a min
    • If fxx<0 or fyy<0 then (a,b) is a max

Exercise 11A-03

Classify critical points on topographical contour map

Example

Minimum vs. saddle

Problem: Consider the function f:

f(x,y)=(x2+y2)eβˆ’x.

Determine the local extrema of f by finding and analyzing its critical points.

Solution: We set fx=0,fy=0 and solve this system of equations for points (x,y). By computing the partials, we obtain:

(2xβˆ’x2βˆ’y2)eβˆ’x=02yeβˆ’x=0.

The second equation implies y=0 because eβˆ’x is never zero. Plugging this fact into the first equation gives x(2βˆ’x)eβˆ’x=0 which implies x=0,2. So the critical points as given by components are (0,0) and (2,0).

Now let us analyze these critical points using the discriminant. Compute:

fxx=(2βˆ’4x+x2+y2)eβˆ’xfyy=2eβˆ’xfxy=βˆ’2yeβˆ’x.

Therefore D(x,y)=2(2βˆ’4x+x2βˆ’y2)eβˆ’2x, and in particular D(0,0)=4, D(2,0)=βˆ’4eβˆ’4. We also need fxx(0,0)=2>0 and fxx(2,0)=βˆ’2eβˆ’2<0. The discriminant test concludes that (0,0) is a local minimum, while (2,0) is a saddle point.

3D plot: https://www.math3d.org/cDHxQockR Also try Desmos3d: https://www.desmos.com/3d/17d5d68086

Exercise 11A-04

Analyze two critical points

Let f(x,y)=2x2βˆ’8xy+y4βˆ’4y3. Find the two critical points of f and analyze them using the discriminant test. You are encouraged to check your results by graphing the function in Demos3d or Math3d. What is the minimum value taken by f?

Exercise 11B-01

Maximum on closed domain

Find the global maximum value of y2+xyβˆ’x2 on the square x∈[0,2], y∈[0,2]. Where does this occur? Remember to check critical points on the interior and optimize the function on the boundary.

Example

Minimal distance

Problem: Consider the surface given by points with coordinates satisfying y2=9+xz. Find the point(s) (x,y,z) closest to the origin.

Solution: Our goal is to extremize the distance to the origin of an arbitrary point on the surface. The distance formula gives d=x2+y2+z2. This function will be extremized at the same place(s) that the function dβ€²=x2+y2+z2 is extremized because βˆ’ is monotone increasing for positive inputs. So we minimize dβ€² instead. Next we write the distance as a function of just two variables. Using the surface equation to determine y2, we write dβ€²=9+xz+x2+z2. Then:

dxβ€²=z+2xdzβ€²=x+2z.

Setting these simultaneously to zero and solving gives (x,z)=(0,0), and (x,y,z) is (0,3,0) or (0,βˆ’3,0). The distance at these points is 3.

Exercise 11B-02 = Problem 11-03

Biggest box

Find the largest volume of a box with nonnegative coordinates, all but one vertex on the coordinate planes, and the remaining vertex lying in the paraboloid given by x24+y29+z=1. (So one corner is at the origin, and the opposite corner is on the paraboloid.) What are the dimensions of this box?

nD theory

(The technique for nD requires knowledge of linear algebra, so the next discussion will not be tested in this course.)

In 3D, the same argument about trace curves shows that where βˆ‡f=(fx,fy,fz) is a non-zero vector, there f is not a local extremum. At such a point, motion in the direction of βˆ‡f will increase the value of f, and motion in the (opposite) direction of βˆ’βˆ‡f will decrease the value of f.

Similarly, in nD one defines critical points as those points p where βˆ‡f(p) is either 0β†’ or undefined. Local extrema of f(x1,…,xn) can only occur at critical points.

The matrix of second-order partials has a general form called the Hessian matrix:

H(x1,…,xn)=(fx1x1…fx1xn………fxnx1…fxnxn).

In 3D the Hessian matrix looks like this:

H(x,y,z)=(fxxfxyfxzfyxfyyfyzfzxfzyfzz).

In order to use H(x,y,z) to classify critical points, you have to compute its eigenvalues and count the number of positive and number of negative eigenvalues. (All positive ⇝ minimum, all negative ⇝ maximum, various signs ⇝ saddle.) The determinant is the product of the eigenvalues, so in the 2D theory the discriminant reveals whether the eigenvalues have the same or opposite signs. This explains the discriminant rule that is used in 2D.

Constrained optimization: Lagrange multipliers

The setup is a function f(x,y) and a curve π’ž. The problem is to find the extremal values of f(x,y) on the curve. If the curve π’ž is given with a parametrization 𝐫(t), then we could just extremize f(𝐫(t)) using the 1D theory. If the curve is instead given by a constraint such as g(x,y)=0, then there is another technique that can be much easier to implement than finding a parametrization 𝐫(t) for π’ž. It is called Lagrange multipliers. Since the constraint is written as g(x,y)=0, you can think of this as a relative of implicit differentiation.

The method of Lagrange multipliers makes use of the fact that when f(x,y) is extremized at p on g(x,y)=0, then the gradients must align: βˆ‡f(p)=Ξ»βˆ‡g(p) for some scalar Ξ».

Gradients align at extremal values

The constraint curve π’ž is given as the level curve g(x,y)=c with c=0. To show the gradients align, we show that they are both perpendicular to this level curve. Let 𝐫(t) be a parametrization of π’ž. We have already seen that:

0=ddt0=ddtg(𝐫(t))=βˆ‡g⋅𝐫′(t)

for any t, so βˆ‡g is always perpendicular to the level curves. In addition, at the specific time t0 where f(𝐫(t)) is extremized, we also have from the 1D optimization theory and the chain rule:

0=ddtf(𝐫(t))|t0=βˆ‡f(𝐫(t0))⋅𝐫′(t0),

and this shows that βˆ‡f is also perpendicular to the level curve g(x,y)=0 at t0. Since both are perpendicular to the level curve, they must point along the same line.

Lagrange multipliers: parallel level curves

It is convenient to visualize the Lagrange condition on a contour map. The curve π’ž will be parallel to the level curves of f(x,y) at the points where the value of f(x,y) is extremized on π’ž. If the level curves of f are not parallel to π’ž at a point p, then it is possible to increase or decrease f by moving along π’ž because this motion will cross over level curves of f.

Because π’ž is a level curve of g(x,y), it is perpendicular to βˆ‡g. So the level curves of g and f must be parallel at an extremal point. This happens if and only if the gradients are parallel.

Example

Lagrange multipliers

Problem: Find the extreme values of f(x,y,z)=3x+2y+4z on the ellipsoid x2+2y2+6z2=1. Solution: We define g(x,y,z)=x2+2y2+6z2. Write out the Lagrange Equations:

βˆ‡f=(3,2,4),βˆ‡g=(2x,4y,12z),(3,2,4)=Ξ»(2x,4y,12z).

Solve the system of equations by first solving for Ξ» in each coordinate and then equating these values:

32=Ξ»x,12=Ξ»y,13=Ξ»z.

Obtain x=92z and y=32z. Insert these expressions into the equation g(x,y,z)=1 and find a single equation, the solutions of which are zp=2123 and zq=βˆ’2123. Using these expressions again, we find the other coordinates of two critical points:

p=1123(9,3,2),q=βˆ’1123(9,3,2).

Plug these points into f(x,y,z) and obtain f(p)=413 and f(q)=βˆ’413.

Since the ellipsoid has no boundary, these are the global max and min of f on the ellipsoid.

Exercise 11B-03

Lagrange multipliers

Find the extreme values taken by the function on the curve that is given by the equation:

  • (a) f(x,y)=x2βˆ’y2, x2+y2=1
  • (b) f(x,y)=xyeβˆ’x2βˆ’y2, 2xβˆ’y=0

Problems due 6 Nov 2023, 10:00pm

Problem 11-01

Vector line integral

Compute βˆ«π’žπ…β‹…d𝐬, where 𝐅=(ez,ey,x+y) and π’ž is the triangle with vertices (1,0,0), (0,1,0), (0,0,1) (traversed in that order).

Problem 11-02

Study of critical points

Find the critical points of the following functions, and analyze them using the discriminant test (or state that the test fails). You may use a calculator or computer to evaluate the discriminant at the critical points.

  • (a) f(x,y)=x3+y3βˆ’3x2βˆ’3y2βˆ’9x
  • (b) f(x,y)=(6xβˆ’x2)(4yβˆ’y2)
  • (c) f(x,y)=xβˆ’y2βˆ’ln⁑(x+y).
Problem 11-03

See above.

β˜… Problem 11-04

Additional exercises to write and submit: A-02, A-04, B-01, B-03.