0% found this document useful (0 votes)
211 views54 pages

Multivariable Calculus Notes - MIT OCW

The document discusses multivariable calculus concepts including vectors, dot products, cross products, determinants, and matrices. It covers using these tools to represent geometric relationships and solve problems involving multiple variables.

Uploaded by

joshua scott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
211 views54 pages

Multivariable Calculus Notes - MIT OCW

The document discusses multivariable calculus concepts including vectors, dot products, cross products, determinants, and matrices. It covers using these tools to represent geometric relationships and solve problems involving multiple variables.

Uploaded by

joshua scott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

MIT OpenCourseWare

http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 1. – Thu, Sept 6, 2007
Handouts: syllabus; PS1; flashcards.

Goal of multivariable calculus: tools to handle problems with several parameters – functions of
several variables.
Vectors. A vector (notation: A � ) has a direction, and a length (|A � |). It is represented by
a directed line segment. In a coordinate system it’s expressed by components: in space, A � =
�a1 , a2 , a3 � = a1 ı̂ + a2 ĵ + a3 k̂. (Recall in space x-axis points to the lower-left, y to the right, z up).
Scalar multiplication
Formula for length? Showed√picture of �3, 2, 1� and used flashcards to ask for its length. Most
students got the right answer ( 14).
� | = a2 + a2 + a2 by reducing to the Pythagorean theorem in the

You can explain why |A 1 2 3
plane (Draw a picture, showing A � and its projection to the xy-plane, then derived |A
� | from length
of projection + Pythagorean theorem).
Vector addition: A � +B� by head-to-tail addition: Draw a picture in a parallelogram (showed how
� �
the diagonals are A + B and B � −A� ); addition works componentwise, and it is true that
A� = 3ı̂ + 2ĵ + k̂ on the displayed example.
Dot product.
�·B
Definition: A � = a1 b1 + a2 b2 + a3 b3 (a scalar, not a vector).
�·B
Theorem: geometrically, A � = |A � ||B
� | cos θ.
Explained the theorem as follows: first, A � ·A� = |A
� |2 cos 0 = |A � |2 is consistent with the definition.
Next, consider a triangle with sides A �, B
�, C � = A�−B � . Then the law of cosines gives |C � |2 =
� |2 + |B
|A � |2 − 2|A
� ||B
� | cos θ, while we get
|C� |2 = C
� ·C� = (A�−B � ) · (A
�−B � ) = |A � |2 + |B|
� 2 − 2A� · B.

Hence the theorem is a vector formulation of the law of cosines.
�·B
A �
Applications. 1) computing lengths and angles: cos θ = .
� ||B
|A �|
Example: triangle in space with vertices P = (1, 0, 0), Q = (0, 1, 0), R = (0, 0, 2), find angle at P :
−−→ −−→
PQ · PR �−1, 1, 0� · �−1, 0, 2� 1
cos θ = −−→ −−→ = √ √ =√ , θ ≈ 71.5◦ .
|P Q ||P R | 2 5 10
Note the sign of dot product: positive if angle less than 90◦ , negative if angle more than 90◦ ,
zero if perpendicular.
2) detecting orthogonality.
Example: what is the set of points where x + 2y + 3z = 0? (possible answers: empty set, a point,
a line, a plane, a sphere, none of the above, I don’t know).
Answer: plane; can see “by hand”, but more geometrically use dot product: call A � = �1, 2, 3�,

−→
� · OP = x + 2y + 3z = 0 ⇔ |A|| −
−→
� OP | cos θ = 0 ⇔ θ = π/2 ⇔ A �⊥− −→
P = (x, y, z), then A OP . So we
get the plane through O with normal vector A �.

1
2

18.02 Lecture 2. – Fri, Sept 7, 2007


We’ve seen two applications of dot product: finding lengths/angles, and detecting orthogonality.
� · û = |A
A third one: finding components of a vector. If û is a unit vector, A � | cos θ is the component
� along the direction of û. E.g., A
of A � · ı̂ = component of A
� along x-axis.
Example: pendulum making an angle with vertical, force = weight of pendulum F� pointing
downwards: then the physically important quantities are the components of F� along tangential
direction (causes pendulum’s motion), and along normal direction (causes string tension).
Area. E.g. of a polygon in plane: break into triangles. Area of triangle = 21 base × height =
1 � �
2 |A||B | sin θ (= 1/2 area of parallelogram). Could get sin θ using dot product to compute cos θ and
sin2 + cos2 = 1, but it gives an ugly formula. Instead, reduce to complementary angle θ� = π/2 − θ
by considering A �� = A � rotated 90◦ counterclockwise (drew a picture). Then area of parallelogram
= |A� ||B
� | sin θ = |A
� � ||B
� | cos θ� = A
�� · B
�.
Q: if A� = �a1 , a2 �, then what is A � � ? (showed picture, used flashcards). Answer: A � � = �−a2 , a1 �.
(explained on picture). So area of parallelogram is �b1 , b2 � · �−a2 , a1 � = a1 b2 − a2 b1 .
� �
� a1 a2 �
Determinant. Definition: det(A, B) = � � � � � = a1 b2 − a2 b1 .
b1 b2 �
� �
� a1 a2 �
Geometrically: � � � = ± area of parallelogram.
b1 b2 �
The sign of 2D determinant has to do with whether B � is counterclockwise or clockwise from A�,
without details.
� �
� a1 a2 a3 � � � � � � �
� b2 b3 � � b1 b3 � � b1 b2 �
� � �
� �
b b b
Determinant in space: det(A, B, C) = � 1 2 3 � = a1 � −a +a �.
c2 c3 � 2 � c1 c3 � 3 � c1 c2 �
� � � � � � �
� c1 c2 c3 �
� B,
Geometrically: det(A, � C)� = ± volume of parallelepiped. Referred to the notes for more about
determinants.
Cross-product. (only for 2 vectors in space); gives a vector, not a scalar (unlike dot-product).
� �
� ı̂ ĵ k̂ �� � � � � � �
� a2 a3 � � a1 a3 � � a1 a2 �
�×B � = � a1 a2 a3 � = ı̂ �

Definition: A � b2 b3 � − ĵ � b1 b3 � + k̂ � b1 b2 �.
� � � � �
� �
� b1 b2 b3 �
(the 3x3 determinant is a symbolic notation, the actual formula is the expansion).
�×B
Geometrically: |A � | = area of space parallelogram with sides A �, B� ; direction = normal to
� and B
the plane containing A �.
How to decide between the two perpendicular directions = right-hand rule. 1) extend right hand
� ; 2) curl fingers towards direction of B
in direction of A � ; 3) thumb points in same direction as A
� ×B
�.
Flashcard Question: ı̂ × ĵ =? (answer: k̂, checked both by geometric description and by
calculation).
Triple product: volume of parallelepiped = area(base) · height = |B � ×C � | (A
� · n̂), where n̂ =
� � � � � � � � � �
B × C/|B × C |. So volume = A · (B × C ) = det(A, B, C). The latter identity can also be checked
directly using components.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 3. – Tue, Sept 11, 2007

Remark: A × B = −B × A, A × A = 0.
Application of cross product: equation of plane through P1 , P2 , P3 : P = (x, y, z) is in the
−− −−−→ −−−→ −−→
plane iff det(P1 P , P1 P2 , P1 P3 ) = 0, or equivalently, P1 P · N = 0, where N is the normal vector
−−−→ −−−→
N = P1 P2 × P1 P3 . I explained this geometrically, and showed how we get the same equation both
ways.
Matrices. Often quantities are related by linear transformations; e.g. changing coordinate
systems, from P = (x1 , x2 , x3 ) to something more adapted to the problem, with new coordinates
(u1 , u2 , u3 ). For example ⎧
⎨ u1 = 2x1 + 3x2 + 3x3
u2 = 2x1 + 4x2 + 5x3
u3 = x1 + x2 + 2x3

⎡ ⎤⎡ ⎤ ⎡ ⎤
2 3 3 x1 u1
Rewrite using matrix product: ⎣ 2 4 5 ⎦ ⎣ x2 ⎦ = ⎣ u2 ⎦, i.e. AX = U .
1 1 2 x3 u3
Entries in the matrix product = dot product between rows of A and columns of X. (here we
multiply a 3x3 matrix by a column vector = 3x1 matrix).
More generally, matrix multiplication AB:
⎡ ⎤
⎡ ⎤ . 0 ⎡ ⎤
1 2 3 4 ⎢ . 14
⎣ . . . . ⎦⎢ . 3 ⎥ = ⎣ .

⎣ . 0 ⎦ . ⎦
. . . . . .
. 2
(Also explained one can set up A to the left, B to the top, then each entry of AB = dot product
between row to its left and column above it).
Note: for this to make sense, width of A must equal height of B.
What AB means: BX = apply transformation B to vector X, so (AB)X = A(BX) = apply
first B then A. (so matrix multiplication is like composing transformations, but from right to left!)
(Remark: matrix product is not commutative, AB is in general not the same as BA – one of the
two need not even make sense if sizes not compatible).
⎡ ⎤
1 0 0
Identity matrix: identity transformation IX = X. I3×3 = ⎣ 0 1 0 ⎦
0 0 1
� �
0 −1
Example: R = = plane rotation by 90 degrees counterclockwise.
1 0
Rı̂ = ĵ, Rĵ = −ı̂, R2 = −I.
Inverse matrix. Inverse of a matrix A (necessarily square) is a matrix M = A−1 such that
AM = M A = In .
A−1 corresponds to the reciprocal linear relation.
E.g., solution to linear system AX = U : can solve for X as function of U by X = A−1 U .

1
2

Cofactor method to find A−1 (efficient for small matrices; for large matrices computer software
uses other algorithms): A−1 = det(1A) adj(A) (adj(A) = “adjoint matrix”).
⎡ ⎤
2 3 3
Illustration on example: starting from A = ⎣ 2 4 5 ⎦
1 1 2
⎡ 1) matrix of⎤minors (= determinants formed by deleting one row and one column from A):
3 −1 −2 �
� 4 5 �

⎣ 3 1 −1 (e.g. top-left is �
⎦ � � = 3).
1 2 �
3 4 2
⎡ ⎤
+ − + 3 +1 −2
2) cofactors = flip signs according to checkerboard diagram − + − : get ⎣ −3 1 +1 ⎦
+ − + 3 −4 2
3) transpose = exchange
⎡ rows / columns ⎤ (read horizontally, write vertically) get the adjoint
3 −3 3
matrix M T = adj(A) = ⎣ 1 1 −4 ⎦
−2 1 2
⎡ ⎤
3 −3 3
1
4) divide by det(A) (here = 3): get A−1 = ⎣ 1 1 −4 ⎦.
3 −2 1 2

18.02 Lecture 4. – Thu, Sept 13, 2007


Handouts: PS1 solutions; PS2.
Equations of planes. Recall an equation of the form ax + by + cz = d defines a plane.
1) plane through origin with normal vector N = �1, 5, 10�: P = (x, y, z) is in the plane ⇔
−−→
N · OP = 0 ⇔ �1, 5, 10� · �x, y, z� = x + 5y + 10z = 0. Coefficients of the equation are the
components of the normal vector.
2) plane through P0 = (2, 1, −1) with same normal vector N = �1, 5, 10�: parallel to the previous
−−→
one! P is in the plane ⇔ N · P0 P = 0 ⇔ (x − 2) + 5(y − 1) + 10(z + 1) = 0, or x + 5y + 10z = −3.
Again coefficients of equation = components of normal vector.
(Note: the equation multiplied by a constant still defines the same plane).

So, to find the equation of a plane, we really need to look for the normal vector N ; we can e.g.
find it by cross-product of 2 vectors that are in the plane.
Flashcard question: the vector v = �1, 2, −1� and the plane x + y + 3z = 5 are 1) parallel, 2)
perpendicular, 3) neither?
(A perpendicular vector would be proportional to the coefficients, i.e. to �1, 1, 3�; let’s test if
it’s in the plane: equivalent to being ⊥ N . We have v · N = 1 + 2 − 3 = 0 so v is parallel to
the plane.)
Interpretation of 3x3 systems. A 3x3 system asks for the intersection of 3 planes. Two
planes intersect in a line, and usually the third plane intersects it in a single point (picture shown).
The unique solution to AX = B is given by X = A−1 B.
3

Exception: if the 3rd plane is parallel to the line of intersection of the first two? What can
happen? (asked on flashcards for possibilities).
If the line P1 ∩ P2 is contained in P3 there are infinitely many solutions (the line); if it is
parallel to P3 there are no solutions. (could also get a plane of solutions if all three equations
are the same)
These special cases correspond to systems with det(A) = 0. Then we can’t invert A to solve the
system: recall A−1 = det(1A) adj(A). Theorem: A is invertible ⇔ det A �= 0.

Homogeneous systems: AX = 0. Then all 3 planes pass through the origin, so there is the
obvious (”trivial”) solution X = 0. If det A = � 0 then this solution is unique: X = A−1 0 = 0.
Otherwise, if det A = 0 there are infinitely many solutions (forming a line or a plane).
Note: det A = 0 means det(N 1 , N 2 , N 3 ) = 0, where N i are the normals to the planes Pi . This
means the parallelepiped formed by the N i has no area, i.e. they are coplanar (showed picture of 3
planes intersecting in a line, and their coplanar normals). The line of solutions is then perpendicular
to the plane containing N i . For example we can get a vector along the line of intersection by taking
a cross-product N 1 × N 2 .
General systems: AX = B: compared to AX = 0, all the planes are shifted to parallel
positions from their initial ones. If det A �= 0 then unique solution is X = A−1 B. If det A = 0,
either there are infinitely many solutions or there are no solutions.
(We don’t have tools to decide whether it’s infinitely many or none, although elimination will
let us find out).

18.02 Lecture 5. – Fri, Sept 14, 2007


Lines. We’ve seen a line as intersection of 2 planes. Other representation = parametric equation
= as trajectory of a moving point.
E.g. line through Q0 = (−1, 2, 2), Q1 = (1, 3, −1): moving point Q(t) starts at Q0 at t = 0, moves
−−−→ −−−−−→ −−−→
at constant speed along line, reaches Q1 at t = 1: its “velocity” is �v = Q0 Q1 ; Q0 Q(t) = tQ0 Q1 .
On example: �x + 1, y − 2, z − 2� = t�2, 1, −3�, i.e.

⎨x(t) = −1 + 2t,

y(t) = 2 + t,

z(t) = 2 − 3t

Lines and planes. Understand where lines and planes intersect.


Flashcard question: relative positions of Q0 , Q1 with respect to plane x + 2y + 4z = 7? (same
side, opposite sides, one is in the plane, can’t tell).
(A sizeable number of students erroneously answered that one is in the plane.)
Answer: plug coordinates into equation of plane: at Q0 , x+2y +4z = 11 > 7; at Q1 , x+2y +4z =
3 < 7; so opposite sides.
Intersection of line Q0 Q1 with plane? When does the moving point Q(t) lie in the plane? Check:
at Q(t), x + 2y + 4z = (−1 + 2t) + 2(2 + t) + 4(2 − 3t) = 11 − 8t, so condition is 11 − 8t = 7, or
t = 1/2. Intersection point: Q(t = 12 ) = (0, 5/2, 1/2).
(What would happen if the line was parallel to the plane, or inside it. Answer: when
plugging the coordinates of Q(t) into the plane equation we’d get a constant, equal to 7 if the line
is contained in the plane – so all values of t are solutions – or to something else if the line is parallel
to the plane – so there are no solutions.)
4

General parametric curves.


Example: cycloid: wheel rolling on floor, motion of a point P on the rim. (Drew picture, then
showed an applet illustrating the motion and plotting the cycloid).
Position of P ? Choice of parameter: e.g., θ, the angle the wheel has turned since initial position.
Distance wheel has travelled is equal to arclength on circumference of the circle = aθ.
Setup: x-axis = floor, initial position of P = origin; introduce A = point of contact of wheel on
−−→ −−→ −−→ −−→
floor, B = center of wheel. Decompose OP = OA + AB + BP .
−−→ −−→ −−→
OA = �aθ, 0�; AB = �0, a�. Length of BP is a, and direction is θ from the (−y)-axis, so
−−→ −−→
BP = �−a sin θ, −a cos θ�. Hence the position vector is OP = �aθ − a sin θ, a − a cos θ�.
Q: What happens near bottom point? (flashcards: corner point with finite slopes on left and
right; looped curve; smooth graph with horizontal tangent; vertical tangent (cusp)).
Answer: use Taylor approximation: for t → 0, f (t) ≈ f (0) + tf � (0) + 12 t2 f �� (0) + 61 t3 f ��� (0) + . . . .
This gives sin θ ≈ θ − θ3 /6 and cos θ ≈ 1 − θ2 /2. So x(θ) � θ3 /6, y(θ) � θ2 /2 Hence for θ → 0,
y/x � ( 12 θ2 )/( 16 θ3 ) = 3/θ → ∞: vertical tangent.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 6. – Tue, Sept 18, 2007
Handouts: Practice exams 1A and 1B.

Velocity and acceleration. Last time: position vector �r(t) = x(t)ı̂ + y(t)ĵ [+z(t)k̂].
E.g., cycloid: �r(t) = �t − sin t, 1 − cos t�.
d�r dx dy
Velocity vector: �v (t) = = � , �. E.g., cycloid: �v (t) = �1 − cos t, sin t�. (at t = 0, �v = �0:
dt dt dt
translation and rotation motions cancel out, while at t = π they add up and �v = �2, 0�).
� √
Speed (scalar): |�v |. E.g., cycloid: |�v | = (1 − cos t)2 + sin2 t = 2 − 2 cos t. (smallest at
t = 0, 2π, ..., largest at t = π).
d�v
Acceleration: �a(t) = . E.g., cycloid: �a(t) = �sin t, cos t� (at t = 0 �a = �0, 1� is vertical).
dt
r|
d|�
Remark: the speed is | d� r
dt |, which is NOT the same as dt !
ds
Arclength, unit tangent vector. s = distance travelled along trajectory. = speed = |�v |.
dt
Can recover length of trajectory by integrating ds/dt, but this is not always easy... e.g. the length
� 2π √
of an arch of cycloid is 0 2 − 2 cos t dt (can’t do).
�v d�r d�r ds ds
Unit tangent vector to trajectory: Tˆ = . We have: = = Tˆ = Tˆ|�v |.
|�v | dt ds dt dt
In interval Δt: Δ�r ≈ T̂ Δs, dividing both sides by Δt and taking the limit Δt → 0 gives us the
above identity.
Kepler’s 2nd law. (illustration of efficiency of vector methods) Kepler 1609, laws of planetary
motion: the motion of planets is in a plane, and area is swept out by the line from the sun to the
planet at a constant rate. Newton (about 70 years later) explained this using laws of gravitational
attraction.
Kepler’s law in vector form: area swept out in Δt is area ≈ 12 |�r × Δ�r| ≈ 12 |�r × �v | Δt
d
So dt (area) = 12 |�r × �v | is constant.
Also, �r × �v is perpendicular to plane of motion, so dir(�r × �v) = constant. Hence, Kepler’s 2nd
law says: �r × �v = constant.
The usual product rule can be used to differentiate vector functions: dt d
(�a · �b), dt
d
(�a × �b), being
careful about non-commutativity of cross-product.
d d�r d�v
(�r × �v ) = × �v + �r × = �v × �v + �r × �a = �r × �a.
dt dt dt
So Kepler’s law ⇔ �r × �v = constant ⇔ �r × �a = 0 ⇔ �a//�r ⇔ the force F� is central.
(so Kepler’s law really means the force is directed //�r; it also applies to other central forces –
e.g. electric charges.)
18.02 Lecture 7. – Thu, Sept 20, 2007
Handouts: PS2 solutions, PS3.
Review. Material on the test = everything seen in lecture. The exam is similar to the practice
exams, or very slightly harder. The main topics are (Problem numbers refer to Practice 1A):

1) vectors, dot product. A · B = |A||B| cos θ = ai bi . Finding angles. (e.g. Problem 1.)
1
2

2) cross-product, area of space triangles 12 |A × B|; equations of planes (coefficients of equation


= components of normal vector) (e.g. Problem 5.)
3) matrices, inverse matrix, linear systems (e.g. Problem 3.)
4) finding parametric equations by decomposing position vector as a sum; velocity, acceleration;
differentiating vector identities (e.g. Problems 2,4,6).
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 8. – Tue, Sept 25, 2007

Functions of several variables.


Recall: for a function of 1 variable, we can plot its graph, and the derivative is the slope of the
tangent line to the graph.
Plotting graphs of functions of 2 variables: examples z = −y, z = 1 − x2 − y 2 , using slices by
the coordinate planes. (derived carefully).
Contour plot: level curves f (x, y) = c. Amounts to slicing the graph by horizontal planes z = c.
Showed 2 examples from “real life”: a topographical map, and a temperature map, then did the
examples z = −y and z = 1 − x2 − y 2 . Showed more examples of computer plots (z = x2 + y 2 ,
z = y 2 − x2 , and another one).
Contour plot gives some qualitative info about how f varies when we change x, y. (shown an
example where increasing x leads f to increase).
Partial derivatives.
∂f f (x0 + Δx, y0 ) − f (x0 , y0 )
fx = = lim ; same for fy .
∂x Δx→0 Δx
Geometric interpretation: fx , fy are slopes of tangent lines of vertical slices of the graph of f
(fixing y = y0 ; fixing x = x0 ).
How to compute: treat x as variable, y as constant.
Example: f (x, y) = x3 y + y 2 , then fx = 3x2 y, fy = x3 + 2y.

18.02 Lecture 9. – Thu, Sept 27, 2007


Handouts: PS3 solutions, PS4.
Linear approximation
Interpretation of fx , fy as slopes of slices of the graph by planes parallel to xz and yz planes.
Linear approximation formula: Δf ≈ fx Δx + fy Δy.
Justification: fx and fy give slopes of two lines tangent to the graph:
y = y0 , z = z0 + fx (x0 , y0 )(x − x0 ) and x = x0 , z = z0 + fy (x0 , y0 )(y − y0 ).
We can use this to get the equation of the tangent plane to the graph:
z = z0 + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
Approximation formula = the graph is close to its tangent plane.
Min/max problems.
At a local max or min, fx = 0 and fy = 0 (since (x0 , y0 ) is a local max or min of the slice).
Because 2 lines determine tangent plane, this is enough to ensure that tangent plane is horizontal
(approximation formula: Δf � 0, or rather, |Δf | � |Δx|, |Δy|).
Def of critical point: (x0 , y0 ) where fx = 0 and fy = 0.
A critical point may be a local min, local max, or saddle.
Example: f (x, y) = x2 − 2xy + 3y 2 + 2x − 2y.
Critical point: fx = 2x − 2y + 2 = 0, fy = −2x + 6y − 2 = 0, gives (x0 , y0 ) = (−1, 0) (only one
critical point).
1
2

Is it a max, min or saddle? (pictures shown of each type). Systematic answer: next lecture.
For today: observe f = (x − y)2 + 2y 2 + 2x − 2y = (x − y + 1)2 + 2y 2 − 1 ≥ −1, so minimum.
Least squares.
Set up problem: experimental data (xi , yi ) (i = 1, . . . , n), want to find a best-fit line y = ax + b
(the unknowns here are a, b, not x, y!)
Deviations: yi − (axi + b); want to minimize the total square deviation D = i (yi − (axi + b))2 .

∂D ∂D
= 0 and = 0 leads to a 2 × 2 linear system for a and b (done in detail as in Notes LS):
∂a ∂b
�� � �� � �
x2i a + xi b = xi yi
�� � �
xi a + nb = yi

Least-squares setup also works in other cases: e.g. exponential laws


y = ceax (taking logarithms: ln y = ln c + ax, so setting b = ln c we reduce to linear case); or
quadratic laws y = ax2 + bx + c (minimizing total square deviation leads to a 3 × 3 linear system
for a, b, c).
Example: Moore’s Law (number of transistors on a computer chip increases exponentially with
time): showed interpolation line on a log plot.
18.02 Lecture 10. – Fri, Sept 28, 2007
Second derivative test.
Recall critical points can be local min (w = x2 + y 2 ), local max (w = −x2 − y 2 ), saddle (w =
y − x2 ); slides shown of each type.
2

Goal: determine type of a critical point, and find the global min/max.
Note: global min/max may be either at a critical point, or on the boundary of the domain/at
infinity.
We start with the case of w = ax2 + bxy + cy 2 , at (0, 0).
Example from Tuesday: w = x2 −2xy+3y 2 : completing the square, w = (x−y)2 +2y 2 , minimum.
b b b2 1 b
If a �= 0, then w = a(x2 + xy)+cy 2 = a(x+ y)2 +(c− )y 2 = (4a2 (x+ y)2 +(4ac−b2 )y 2 ).
a 2a 4a 4a 2a
3 cases: if 4ac − b2 > 0, same signs, if a > 0 then minimum, if a < 0 then maximum; if
4ac − b2 < 0, opposite signs, saddle; if 4ac − b2 = 0, degenerate case.
� x x
This is related to the quadratic formula: w = y 2 a( )2 + b( ) + c .

y y
2 2
If b −4ac < 0 then no roots, so at +bt+c has a constant sign, and w is either always nonnegative
or always nonpositive (min or max). If b2 − 4ac > 0 then at2 + bt + c crosses zero and changes sign,
so w can have both signs, saddle.
General case: second derivative test.
∂2f
We look at second derivatives: fxx = , fxy , fyx , fyy . Fact: fxy = fyx .
∂x2
Given f and a critical point (x0 , y0 ), set A = fxx (x0 , y0 ), B = fxy (x0 , y0 ), C = fyy (x0 , y0 ), then:
– if AC − B 2 > 0 then: if A > 0 (or C), local min; if A < 0, local max.
– if AC − B 2 < 0 then saddle.
3

– if AC − B 2 = 0 then can’t conclude.


Checked quadratic case (fxx = 2a = A, fxy = b = B, fyy = 2c = C, then AC − B 2 = 4ac − b2 ).
General justification: quadratic approximation formula (Taylor series at order 2):
Δf � fx (x − x0 ) + fy (y − y0 ) + 12 fxx (x − x0 )2 + fxy (x − x0 )(y − y0 ) + 12 fyy (y − y0 )2 .
At a critical point, Δf � A2 (x − x0 )2 + B(x − x0 )(y − y0 ) + C2 (y − y0 )2 . In degenerate case, would
need higher order derivatives to conclude.
NOTE: the global min/max of a function is not necessarily at a critical point! Need to check
boundary / infinity.
1
Example: f (x, y) = x + y + xy , for x > 0, y > 0.
fx = 1 − x12 y = 0, fy = 1 − xy1 2 = 0. So x2 y = 1, xy 2 = 1, only critical point is (1, 1).
fxx = 2/x3 y, fxy = 1/x2 y 2 , fyy = 2/xy 3 . So A = 2, B = 1, C = 2.
Question: type of critical point? Answer: AC − B 2 = 2 · 2 − 1 > 0, A
= 2 > 0, local min.
What about the maximum? Answer: f → ∞ near boundary (x → 0 or y → 0) and at infinity.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 11. – Tue, Oct 2, 2007
Differentials.
Recall in single variable calculus: y =√f (x) ⇒ dy = f � (x) dx. Example: y = sin−1 (x) ⇒ x = sin y,
dx = cos y dy, so dy/dx = 1/ cos y = 1/ 1 − x2 .
Total differential: f = f (x, y, z) ⇒ df = fx dx + fy dy + fz dz.
This is a new type of object, with its own rules for manipulating it (df is not the same as Δf !
The textbook has it wrong.) It encodes how variations of f are related to variations of x, y, z. We
can use it in two ways:
1. as a placeholder for approximation formulas: Δf ≈ fx Δx + fy Δy + fz Δz.
2. divide by dt to get the chain rule: if x = x(t), y = y(t), z = z(t), then f becomes a function
df dx dy dz
of t and = fx + fy + fz
dt dt dt dt
Example: w = x2 y + z, dw = 2xy dx + x2 dy + dz. If x = t, y = et , z = sin t then the chain rule
gives dw/dt = (2tet ) 1 + (t2 ) et + cos t, same as what we obtain by substitution into formula for w
and one-variable differentiation.
Can justify the chain rule in 2 ways:
1. dx = x� (t) dt, dy = y � (t) dt, dz = z � (t) dt, so substituting we get dw = fx dx + fy dy + fz dz =
fx x� (t) dt + fy y � (t) dt + fz z � (t) dt, hence dw/dt.
2. (more rigorous): Δw � fx Δx + fy Δy + fz Δz, divide both sides by Δt and take limit as
Δt → 0.
Applications of chain rule:
Product and quotient formulas for derivatives: f = uv, u = u(t), v = v(t), then d(uv)/dt =
fu u� + fv v � = vu� + uv � . Similarly with g = u/v, d(u/v)/dt = gu u� + gv v � = (1/v) u� + (−u/v 2 ) v � =
(u� v − uv � )/v 2 .
Chain rule with more variables: for example w = f (x, y), x = x(u, v), y = y(u, v). Then
dw = fx dx + fy dy = fx (xu du + xv dv) + fy (yu du + yv dv) = (fx xu + fy yu ) du + (fx xv + fy yv ) dv.
Identifying coefficients of du and dv we get ∂f /∂u = fx xu + fy yu and similarly for ∂f /∂v.
It's not legal to “simplify by ∂x”.
Example: polar coordinates: x = r cos θ, y = r sin θ. Then fr = fx xr + fy yr = cos θ fx + sin θ fy ,
and similarly fθ .

18.02 Lecture 12. – Thu, Oct 4, 2007


Handouts: PS4 solutions, PS5.
Gradient.
dw dx dy dz dw d�r
Recall chain rule: = wx + wy + wz . In vector notation: = �w · .
dt dt dt dt dt dt
Definition: �w = �wx , wy , wz � – GRADIENT VECTOR.
Theorem: �w is perpendicular to the level surfaces w = c.
Example 1: w = ax + by + cz, then w = d is a plane with normal vector �w = �a, b, c�.
Example 2: w = x2 + y 2 , then w = c are circles, �w = �2x, 2y� points radially out so ⊥ circles.
Example 3: w = x2 − y 2 , shown on applet (Lagrange multipliers applet with g disabled).

1
2

�w is a vector whose value depends on the point (x, y) where we evaluate w.

Proof: take a curve �r = �r(t) contained inside level surface w = c. Then velocity �v = d�r/dt is in
the tangent plane, and by chain rule, dw/dt = �w · d�r/dt = 0, so �v ⊥ �w. This is true for every �v
in the tangent plane.
Application: tangent plane to a surface. Example: tangent plane to x2 + y 2 − z 2 = 4 at (2, 1, 1):
gradient�is �2x, 2y, −2z� = �4, 2, −2�; tangent plane is 4x + 2y − 2z = 8. (Here we could also solve
for z = x2 + y 2 − 4 and use linear approximation formula, but in general we can’t.)
(Another way to get the tangent plane: dw = 2x dx + 2y dy − 2z dz = 4dx + 2dy − 2dz. So
Δw ≈ 4Δx + 2Δy − 2Δz. The level surface is Δw = 0, its tangent plane approximation is
4Δx + 2Δy − 2Δz = 0, i.e. 4(x − 2) + 2(y − 1) − 2(z − 1) = 0, same as above).
Directional derivative. Rate of change of w as we move (x, y) in an arbitrary direction.
Take a unit vector û = �a, b�, and look at straight line trajectory �r(s) with velocity û, given by
x(s) = x0 + as, y(s) = y0 + bs. (unit speed, so s is arclength!)
dw
Notation: .
ds |û
Geometrically: slice of graph by a vertical plane (not parallel to x or y axes anymore). Directional
derivative is the slope. Shown on applet (Functions of two variables), with w = x2 + y 2 + 1, and
rotating slices through a point of the graph.
dw d�r
Know how to calculate dw/ds by chain rule: = �w · = �w · û.
ds |û ds
Geometric interpretation: dw/ds = �w · û = |�w| cos θ. Maximal for cos θ = 1, when û is in
direction of �w. Hence: direction of �w is that of fastest increase of w, and |�w| is the directional
derivative in that direction. We have dw/ds = 0 when û ⊥ �w, i.e. when û is tangent to direction
of level surface.

18.02 Lecture 13. – Fri, Oct 5, 2007 (estimated – written before lecture)
Practice exams 2A and 2B are on course web page.
Lagrange multipliers.
Problem: min/max when variables are constrained by an equation g(x, y, z) = c.

Example: find point of xy = 3 closest to origin ? I.e. minimize x2 + y 2 , or better f (x, y) =
x2 + y 2 , subject to g(x, y) = xy = 3. Illustrated using Lagrange multipliers applet.
Observe on picture: at the minimum, the level curves are tangent to each other, so the normal
vectors �f and �g are parallel.
So: there exists λ (“multiplier”) such that �f = λ�g. We replace the constrained min/max
problem in 2 variables with equations involving 3 variables x, y, λ:
⎧ ⎧
⎨fx = λgx
⎪ ⎨2x = λy

fy = λgy i.e. here 2y = λx
⎪ ⎪
g=c xy = 3.
⎩ ⎩
3

2x − λy = 0
In general solving may be hard and require a computer. Here, linear algebra:
−λx + 2y = 0
2
requires either x = y = 0 (impossible,
√ √ since xy =√3), or√ det = 4 − λ = 0. So λ = ±2. No solutions
for λ = −2, while λ = 2 gives ( 3, 3) and (− 3, − 3). (Checked on applet that �f = 2�g at
minimum).
Why the method works: at constrained min/max, moving in any direction along the constraint
df
surface g = c should give df /ds = 0. So, for any û tangent to {g = c}, ds |û
= �f · û = 0, i.e.
û ⊥ �f . Therefore �f is normal to tangent plane to g = c, and so is �g, hence the gradient
vectors are parallel.
Warning: method doesn’t say whether we have a min or a max, and second derivative test doesn’t
apply with constrained variables. Need to answer using geometric argument or by comparing values
of f .
Advanced example: surface-minimizing pyramid.
Triangular-based pyramid with given triangle as base and given volume V , using as little surface
area as possible.
Note: V = 13 Abase h, so height h is fixed, top vertex moves in a plane z = h.
We can set up problem in coordinates: base vertices P1 = (x1 , y1 , 0), P2 , P3 , and top vertex
P = (x, y, h). Then areas of faces = 12 |P�P1 × P�P2 |, etc. Calculations to find critical point of
function of (x, y) are very hard.
Key idea: use variables adapted to the geometry, instead of (x, y): let a1 , a2 , a3 = lengths of
sides of the base triangle; u1 , u2 , u3 = distances in the xy-plane from the projection of�
P to the
sides of the base triangle. Then each face is a triangle with base length ai and height u2i + h2
(using Pythagorean theorem).
� � �
So we must minimize f (u1 , u2 , u3 ) = 12 a1 u21 + h2 + 12 a2 u22 + h2 + 12 a3 u23 + h2 .
Constraint? (asked using flashcards; this was a bad choice, very few students responded at
all.) Decomposing base into 3 smaller triangles with heights ui , we must have g(u1 , u2 , u3 ) =
1 1 1
2 a1 u1 + 2 a2 u2 + 2 a3 u3 = Abase .
Lagrange multiplier method: �f = λ�g gives
a1 u a1
� 1 = λ , similarly for u2 and u3 .
2 u21 + h2 2
u1 u2 u3
We conclude λ = � 2 = � 2 = � 2 , hence u1 = u2 = u3 , so P lies above the
u1 + h 2 u2 + h 2 u 3 + h2
incenter.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 14. – Thu, Oct 11, 2007
Handouts: PS5 solutions, PS6, practice exams 2A and 2B.
Non-independent variables.
Often we have to deal with non-independent variables, e.g. f (P, V, T ) where P V = nRT .
Question: if g(x, y, z) = c then can think of z = z(x, y). What are ∂z/∂x, ∂z/∂y?
Example: x2 + yz + z 3 = 8 at (2, 3, 1). Take differential: 2x dx + z dy + (y + 3z 2 ) dz = 0, i.e.
4 dx + dy + 6 dz = 0 (constraint g = c), or dz = − 46 dx − 16 dy. So ∂z/∂x = −4/6 = −2/3 and
∂z/∂y = −1/6 (taking the coefficients of dx and dy). Or equivalently: if y is held constant then
we substitute dy = 0 to get dz = −4/6 dx, so ∂z/∂x = −4/6 = −2/3.
In general: g(x, y, z) = c ⇒ gx dx + gy dy + gz dz = 0. If y held fixed, get gx dx + gz dz = 0, i.e.
dz = −gx /gz dx, and ∂z/∂x = −gx /gz .
Warning: notation can be dangerous! For example:
f (x, y) = x + y, ∂f /∂x = 1. Change of variables x = u, y = u + v then f = 2u + v, ∂f /∂u = 2.
x = u but ∂f /∂x �= ∂f /∂u !!
This is because ∂f /∂x means change x keeping y fixed, while ∂f /∂u means change u keeping v
fixed, i.e. change x keeping y − x fixed.
� �
∂f
When there’s ambiguity, we must precise what is held fixed: = deriv. / x with y held
∂x y
� �
∂f
fixed, = deriv. / u with v held fixed.
∂u v
� � � � � �
∂f ∂f ∂f
We now have = �
= .
∂u v ∂x v ∂x y
In above example, we computed (∂z/∂x)y . When there is no risk of confusion we keep the old
notation, by default ∂/∂x means we keep y fixed.
Example: area of a triangle with 2 sides a and b making an angle θ is A = 12 ab sin θ. Suppose
it’s a right triangle with b the hypothenuse, then constraint a = b cos θ.
3 ways in which rate of change of A w.r.t. θ makes sense:
∂A
1) view A = A(a, b, θ) independent variables, usual = Aθ (with a and b held fixed). This
∂θ
answers the question: a and b fixed, θ changes, triangle stops being a right triangle, what happens
to A?
2) constraint
� a� = b cos θ, keep a fixed, change θ, while b does what it must to satisfy the
∂A
constraint: .
∂θ a
3) constraint
� a� = b cos θ, keep b fixed, change θ, while a does what it must to satisfy the
∂A
constraint: .
∂θ b
How to compute e.g. (∂A/∂θ)a ? [treat A as function of a and θ, while b = b(a, θ).]
0) Substitution: a = b cos θ so b = a sec θ, A = 12 ab sin θ = 12 a2 tan θ, ( ∂A 1 2 2
∂θ )a = 2 a sec θ. (Easiest
here, but it’s not always possible to solve for b)
1) Total differentials: da = 0 (a fixed), dA = Aθ dθ + Aa da + Ab db = 12 ab cos θ dθ + 12 b sin θ da +
1
and constraint ⇒ da = cos θ db − b sin θ dθ. Plugging in da = 0, we get db = b tan θ dθ
2 a sin θ db,
1
2

and then
� �
1 1 ∂A 1 1 1
dA = ( ab cos θ + a sin θ b tan θ)dθ, = ab cos θ + a sin θ b tan θ = ab sec θ.
2 2 ∂θ a 2 2 2
2) Chain rule: (∂A/∂θ)a = Aθ (∂θ/∂θ)a + Aa (∂a/∂θ)a + Ab (∂b/∂θ)b = Aθ + Ab (∂b/∂θ)a . We
find (∂b/∂θ)a by using the constraint equation. [Ran out of time here]. Implicit differentiation of
constraint a = b cos θ: we have 0 = (∂a/∂θ)a = (∂b/∂θ)a cos θ − b sin θ, so (∂b/∂θ)a = b tan θ, and
hence � �
∂A 1 1 1
= ab cos θ + a sin θ b tan θ = ab sec θ.
∂θ a 2 2 2
The two systematic methods essentially involve calculating the same quantities, even though
things are written differently.

18.02 Lecture 15. – Fri, Oct 12, 2007


Review topics.
– Functions of several variables, contour plots.
– Partial derivatives, gradient; approximation formulas, tangent planes, directional derivatives.
Note: partial differential equations (= equations involving partial derivatives of an unknown
function) are very important in physics. E.g., heat equation: ∂f /∂t = k(∂ 2 f /∂x2 + ∂ 2 f /∂y 2 +
∂ 2 f /∂z 2 ) describes evolution of temperature over time.
– Min/max problems: critical points, 2nd derivative test, checking boundary.
(least squares won’t be on the exam)
– Differentials, chain rule, change of variables.
– Non-independent variables: Lagrange multipliers, and constrained partial derivatives.
Re-explanation of how to compute constrained partials: say f = f (x, y, z) where g(x, y, z) = c.
To find (∂f /∂z)y :
1) using differentials: df = fx dx + fy dy + fz dz. We set dy = 0 since y held constant, and want
to eliminate dx. For this we use the constraint: dg = gx dx + gy dy + gz dz = 0, so setting dy = 0
we get dx = −gz /gx dz. Plug into df : df = −fx gz /gx dz + gz dz, so (∂f /∂z)y = −fx gz /gx + gz .
� � � � � � � � � �
∂f ∂f ∂x ∂f ∂y ∂f ∂z ∂x
2) using chain rule: = + + = fx + fz , while
∂z y ∂x ∂z y ∂y ∂z y ∂z ∂z y ∂z y
� � � � � � � � � �
∂g ∂g ∂x ∂g ∂y ∂g ∂z ∂x
0= = + + = gx + gz
∂z y ∂x ∂z y ∂y ∂z y ∂z ∂z y ∂z y
which gives (∂x/∂z)y and hence the answer.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 16. – Thu, Oct 18, 2007
Handouts: PS6 solutions, PS7.

Double integrals.
�b
Recall integral in 1-variable calculus: a f (x) dx = area below graph y = f (x) over [a, b].
��
Now: double integral R f (x, y) dA = volume below graph z = f (x, y) over plane region R.

Cut��R into small pieces ΔA ⇒ the volume is approximately f (xi , yi ) ΔAi . Limit as ΔA → 0
gives R f (x, y) dA. (picture shown)
How to compute the integral? By taking slices: S(x) = area of the slice by a plane parallel to
yz-plane (picture shown): then
� xmax �
volume = S(x) dx, and for given x, S(x) = f (x, y) dy.
xmin
In the inner integral, x is a fixed parameter, y is the integration variable. We get an iterated
integral.
Example 1: z = 1 − x2 − y 2 , region 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 (picture shown):
� 1� 1
(1 − x2 − y 2 ) dy dx.
0 0
(note: dA = dy dx, limit of ΔA = Δy Δx for small rectangles).
How to evaluate:
1 3 1
� 1 � �
2 2 2 1 2
1) inner integral (x is constant): (1 − x − y ) dy = (1 − x )y − y = (1 − x2 ) − = − x2 .
0 3 0 3 3
� 1 � �1
2 2 1 2 1 1
2) outer integral: ( − x2 ) dx = x − x3 = − = .
0 3 3 3 0 3 3 3
Example 2: same function over the quarter disc R : x2 + y 2 < 1 in the first quadrant.
How to find the bounds of √ integration? Fix x constant: what is a slice parallel to y-axis? bounds
for y = from y = 0 to y = 1 − x2 in the inner integral. For the outer integral: first slice is x = 0,
last slice is x = 1. So we get:
� 1 � √1−x2
(1 − x2 − y 2 ) dy dx.
0 0
(note the inner bounds depend on the outer variable x; the outer bounds are constants!)
2 3
�√1−x2 2
= (1 − x2 )3/2 .

Inner: (1 − x )y − y /3 0
3
� 1
2 π
Outer: (1 − x2 )3/2 dx = · · · = .
0 3 8
(. . . = trig. substitution x = sin θ, dx = cos θ dθ, (1 − x2 )3/2 = cos3 θ. Then use double angle
formulas... complicated! I carried out part of the calculation to show how it would be done but
then stopped before the end to save time; students may be confused about what happened exactly.)
Exchanging order of integration.
�1�2 �2�1
0 0 dx dy = 0 0 dy dx, since region is a rectangle (shown). In general, more complicated!

1
2

1� x
ey

Example 3: dy dx: inner integral has no formula. To exchange order:
0 x y

1) draw the region (here: x < y < x for 0 ≤ x ≤ 1 – picture drawn on blackboard).
2) figure out bounds in other direction: fixing a value of y, what are the bounds for x? here: left
border is x = y 2 , right is x = y; first slice is y = 0, last slice is y = 1, so we get
� 1� y y � 1 y � 1
e e
dx dy = 2
(y − y ) dy = ey − yey dy = [−yey + 2ey ]10 = e − 2.
0 y2 y 0 y 0
(the last integration can be done either by parts, or by starting from the guess −yey and adjusting;).

18.02 Lecture 17. – Fri, Oct 19, 2007


Integration in polar coordinates. (x = r cos θ, y = r sin θ): useful if either integrand or
region have a simpler expression in polar coordinates.
Area element: ΔA � (rΔθ) Δr (picture drawn of a small element with sides Δr and rΔθ).
Taking Δθ, Δr → 0, we get dA = r dr dθ.
�� � π/2 � 1
Example (same as last time): (1 − x2 − y 2 ) dx dy = (1 − r2 ) r dr dθ.
x2 +y 2 ≤1, x≥0, y≥0 0 0
� �1 � π/2
1 2 1 4 1 1 π1 π
Inner: r − r
= . Outer: dθ = = .
2 04 4 0 4 24 8
��
In general: when setting up f r dr dθ, find bounds as usual: given a fixed θ, find initial and
final values of r (sweep region by rays).
Applications.
��
1) The area of the region R is R 1 dA. Also, the total mass of a planar object with density
δ = lim Δm/ΔA (mass per unit area, δ = δ(x, y) – if uniform material, constant) is given by:
ΔA=0
��
M= δ dA.
R
��
1
2) recall the average value of f over R is f¯ = f dA. The center of mass, or centroid,
Area R
of a plate with density δ is given by weighted average
�� ��
1 1
x̄ = x δ dA, ȳ = y δ dA
mass R mass R
3) moment of inertia: physical equivalent of mass for rotational motion. (mass = how hard
it is to impart translation motion; moment of inertia about some axis = same for rotation motion
around that axis)
Idea: kinetic energy for a single mass m at distance r rotating at angular speed ω = dθ/dt (so
velocity v = rω) is 12 mv 2 = 12 mr2 ω 2 ; I0 = mr2 is the moment of inertia.
��
For a solid with density δ, I0 = r2 δ dA (moment of inertia / origin). (the rotational energy
R
is 12 I0 ω 2 ).
3
��
Moment of inertia about an axis: I = (distance to axis)2 δ dA. E.g. about x-axis, distance
R
is |y|, so ��
Ix = y 2 δ dA.
R
Examples: 1) disk of radius a around its center (δ = 1):
� 2π � a � 4 �a
2 r πa4
I0 = r r dr dθ = 2π = .
0 0 4 0 2
2) same disk, about a point on the circumference?
Setup: place origin at point so integrand is easier; diameter along x-axis; then polar equation of
circle is r = 2a cos θ (explained on a picture). Thus
� π/2 � 2a cos θ
3
I0 = r2 r dr dθ = ... = πa4 .
−π/2 0 2
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 18. – Tue, Oct 23, 2007
Change of variables.
Example 1: area of ellipse with semiaxes a and b: setting u = x/a, v = y/b,
�� �� ��
dx dy = ab du dv = ab du dv = πab.
(x/a)2 +(y/b)2 <1 u2 +v 2 <1 u2 +v 2 <1

(substitution works here as in 1-variable calculus: du = dx, dv = 1b dy, so du dv = ab


1
a
1
dx dy.
In general, must find out the scale factor (ratio between du dv and dx dy)?
Example 2: say we set u = 3x−2y, v = x+y to simplify either integrand or bounds of integration.
What is the relation between dA = dx dy and dA� = du dv? (area elements in xy- and uv-planes).
Answer: consider a small rectangle of area ΔA = ΔxΔy, it becomes in uv-coordinates a paral­
lelogram of area ΔA� . Here the answer is independent of which rectangle we take, so we can take
e.g. the unit square in xy-coordinates.
� � � �� �
u 3 −2 x
In the uv-plane, = , so this becomes a parallelogram with sides given by
v 1 1 y � � � � ��
� 3 1 � � 3 −2 �
vectors �3, 1� and �−2, 1� (picture drawn), and area = det = � � � =5 =� � � .
−2 1 � 1 1 �
� = 5ΔA, in the limit dA� = 5dA, i.e. du dv = 5dx dy. So
��
For any rectangle ΔA . . . dx dy =
1
��
. . . 5 du dv.
General case: approximation formula Δu ≈ ux Δx + uy Δy, Δv ≈ vx Δx + vy Δy, i.e.
� � � �� �
Δu ux uy Δx
≈ .
Δv vx vy Δy
A small xy-rectangle is approx. a parallelogram in uv-coords, but scale factor depends on x and y
now. By the same argument as before, the scale factor is the determinant.
� �
∂(u, v) �� ux uy ��
Definition: the Jacobian is J = = . Then du dv = |J | dx dy.
∂(x, y) � vx vy �
(absolute value because area is the absolute value of the determinant).
Example 1: polar coordinates x = r cos θ, y = r sin θ:
� � � �
∂(x, y) �� xr xθ �� �� cos θ −r sin θ ��
=� = = r cos2 θ + r sin2 θ = r.
∂(r, θ) yr yθ � � sin θ r cos θ �
So dx dy = r dr dθ, as seen before.
�1�1
Example 2: compute 0 0 x2 y dx dy by changing to u = x, v = xy (usually motivation is to
simplify either integrand or region; here neither happens, but we just illustrate the general method).
� � � �
∂(u, v) � ux uy � � 1 0 �
1) Area element: Jacobian is = �� � = �� � = x, so du dv = x dx dy, i.e.
∂(x, y) vx vy � y x �
dx dy = x1 du dv.
2) Express integrand in terms of u, v: x2 y dx dy = x2 y x1 du dv = xy du dv = v du dv.
3) Find bounds (picture drawn): if we integrate du dv, then first we keep v = xy constant, slice
looks like portion of hyperbola (picture shown), parametrized by u = x. The bounds are: at the
top boundary y = 1, so v/u = 1, i.e. u = v; at the right boundary, x = 1, so u = 1. So the inner

1
2
�1
integral is v . The first slice is v = 0, the last is v = 1; so we get
� 1� 1
v du dv.
0 v

Besides the picture in xy coordinates (a square sliced by hyperbolas), I also drew a picture in uv
coordinates (a triangle), which some students may find is an easier way of getting the bounds for
u and v.

18.02 Lecture 19. – Thu, Oct 25, 2007


Handouts: PS7 solutions; PS8.
Vector fields.
F� = Mı̂ + Nĵ, where M = M (x, y), N = N (x, y): at each point in the plane we have a vector

F which depends on x, y.
Examples: velocity fields, e.g. wind flow (shown: chart of winds over Pacific ocean); force fields,
e.g. gravitational field.
Examples drawn on blackboard: (1) F� = 2ı̂ + ĵ (constant vector field); (2) F� = xı̂; (3) F� =
xı̂ + yĵ (radially outwards); (4) F� = −yı̂ + xĵ (explained using that �−y, x� is �x, y� rotated 90◦
counterclockwise).
Work and line integrals.
W = (force).(distance) = F� · Δ�r for a small motion Δ�r. Total work is obtained by summing these
along a trajectory C: get a “line integral”
� � �

W = F� · d�r = lim F� · Δ�ri .
C r →0
Δ�
i
To evaluate
� the line integral, we observe C is parametrized by time, and give meaning to the
notation C F� · d�r by
� � t2
d�r �
F� · d�r = F� ·

dt.
C t1 dt
Example: F� = −yı̂ + xĵ, C is given by x = t, y = t2 , 0 ≤ t ≤ 1 (portion of parabola y = x2 from
(0,0) to (1,1)). Then we substitute expressions in terms of t everywhere:
d�r dx dy
F� = �−y, x� = �−t2 , t�, = � , � = �1, 2t�,
dt dt dt
� � 1 � 1 � 1
d�r 1
so F� · d�r = F� · dt = �−t2 , t� · �1, 2t� dt = t2 dt = . (in the end things always reduce
C 0 dt 0 0 3
to a one-variable integral.)
In fact, the definition of the line integral does not involve the parametrization: so the result is
the same no matter which parametrization we choose. For example we could choose to parametrize
� π/2
the parabola by x = sin θ, y = sin2 θ, 0 ≤ θ ≤ π/2. Then we’d get C F� · d�r = 0 . . . dθ, which

would be equivalent to the previous one under the substitution t = sin θ and would again be equal
to 31 . In practice we always choose the simplest parametrization!
New notation for line integral: F� = �M, N �, and d�r = �dx, dy� (this is in fact a differential: if we
divide both sides by dt we get the component formula for the velocity d�r/dt). So the line integral
3

becomes � �
F� · d�r = M dx + N dy.
C C
The notation is dangerous: this is not a sum of integrals w.r.t. x and y, but really a line integral
along C. To evaluate one must express everything in terms of the chosen parameter.
In the above example, we have x = t, y = t2 , so dx = dt, dy = 2t dt by implicit differentiation;
then � � 1 � 1
2 1
−y dx + x dy = −t dt + t (2t) dt = t2 dt =
C 0 0 3
(same calculation as before, using different notation).
Geometric approach.
d�r ds
Recall velocity is = T̂ (where s = arclength, T̂ = unit tangent vector to trajectory).
dt
� dt �
So d�r = T̂ ds, and �
F · d�r = F� · T̂ ds. Sometimes the calculation is easier this way!
C C
Example: C = circle of radius a centered at origin, F� = xı̂ + yĵ, then F� · T̂ = 0 (picture drawn),
so C F� · T̂ ds = 0 ds = 0.
� �

Example: same C, F� = −yı̂ + xĵ, then F� · T̂ = |F� | = a, so C F� · T̂ ds = a ds = a (2πa) = 2πa2 ;


� �
checked that we get the same answer if we compute using parametrization x = a cos θ, y = a sin θ.

18.02 Lecture 20. – Fri, Oct 26, 2007


Line integrals continued.
� � �

Recall: line integral of F = Mı̂ + Nĵ along a curve C: �
F · d�r = M dx + N dy = F� · T̂ ds.
C C C
Example: F� = yı̂ + xĵ, C F� · d�r for C

� = C1 + C2 + C3 enclosing sector of unit disk from 0 to
π/4. (picture shown). Need to compute Ci y dx + x dy for each portion:
� �1
1) x-axis: x = t, y = 0, dx = dt, dy = 0, 0 ≤ t ≤ 1, so C1 y dx + x dy = 0 0 dt = 0. Equivalently,
geometrically: along x-axis, y = 0 so F� = xĵ while T̂ = ı̂ so F� · T̂ ds = 0.

C1
2) C2 : x = cos θ, y = sin θ, dx = − sin θ dθ, dy = cos θ dθ, 0 ≤ θ ≤ π4 . So
� � π/4 � π/4 � �π/4
1 1
y dx + x dy = sin θ(− sin θ)dθ + cos θ cos θ dθ = cos(2θ)dθ = sin(2θ) = .
C2 0 0 2 0 2
3) C3 : line segment from ( √12 , √12 ) to (0, 0): could take x = √1
2
− √1 t,
2
y = same, 0 ≤ t ≤ 1, ...
but easier: C3 backwards (“−C3 ”) is y = x = t, 0 ≤ t ≤ √1 .
Work along −C3 is opposite of work
2
along C3 .
� � 0 � 1/√2 √
2 1/ 2 1
y dx + x dy = √ t dt + t dt = − 2t dt = −[t ]0 =− .
C3 1/ 2 0 2
If F� is a gradient field, F� = �f = fx ı̂ + fy ĵ (f is called “potential function”), then we can
simplify evaluation of line integrals by using the fundamental theorem of calculus.
Fundamental theorem of calculus for line integrals:
4

�f · d�r = f (P1 ) − f (P0 ) when C runs from P0 to P1 .
C � �
Equivalently with differentials: fx dx + fy dy = df = f (P1 ) − f (P0 ). Proof:
� � t1 C � t1 C
dx dy d
�f · d�r = (fx + fy ) dt = (f (x(t), y(t)) dt = [f (x(t), y(t))]tt10 = f (P1 ) − f (P0 ).
C t0 dt dt t0 dt
E.g., in the above example, if we set f (x, y) = xy then �f = �y, x� = F� . So

Ci can be calculated
just by evaluating f = xy at end points. Picture shown of C, vector field, and level curves.
Consequences: for a gradient field, we have:
� �
• Path independence: if C1 , C2 have same endpoints then C1 �f · d�r = C2 �f · d�r (both equal

to f (P1 ) − f (P0 ) by the theorem). So the line integral C �f · d�r depends only on the end points,
not on the actual trajectory.

• Conservativeness: if C is a closed loop then C �f · d�r = 0 (= f (P ) − f (P )).
(e.g. in above example, C = 0 + 12 − 12 = 0.)

WARNING: this is only for gradient fields!


Example: F� = −yı̂ + xĵ� is not a gradient field: as seen Thursday, along C = circle of radius a
counterclockwise (F� //Tˆ ), F� · d�r = 2πa2 . Hence F� is not conservative, and not a gradient field.
C

Physical interpretation.
If the force field F� is the gradient of a potential f , then work of F� = change in value of potential.
E.g.: 1) F� = gravitational field, f = gravitational potential; 2) F� = electrical field; f = electrical
potential (voltage). (Actually physicists use the opposite sign convention, F� = −�f ).
Conservativeness means that energy comes from change in potential f , so no energy can be
extracted from motion along a closed trajectory (conservativeness = conservation of energy: the
change in kinetic energy equals the work of the force equals the change in potential energy).
We have four equivalent properties:
(1) F� is conservative ( C F� · d�r = 0 for any closed curve C)


(2) F · d�r is path independent (same work if same end points)
(3) F� is a gradient field: F� = �f = fx ı̂ + fy ĵ.
(4) M dx + N dy is an exact differential (= fx dx + fy dy = df .)
((1) is equivalent to (2) by considering C1 , C2 with same endpoints, C = C1 − C2 is a closed loop.
(3) ⇒ (2) is the FTC, ⇐ will be key to finding potential function: if we have path independence
� (x,y)
then we can get f (x, y) by computing (0,0) F� · d�r. (3) and (4) are reformulations of the same
property).
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 21. – Tue, Oct 30, 2007
Test for gradient fields.
Observe: if F� = Mı̂ + Nĵ is a gradient field then Nx = My . Indeed, if F� = �f then M = fx ,
N = fy , so Nx = fyx = fxy = My .
Claim: Conversely, if F� is defined and differentiable at every point of the plane, and Nx = My ,
then F� = Mı̂ + Nĵ is a gradient field.
Example: F� = −yı̂ + xĵ: Nx = 1, My = −1, so F� is not a gradient field.
Example: for which value(s) of a is F� = (4x2 + axy)ı̂ + (3y 2 + 4x2 )ĵ a gradient field? Answer:
Nx = 8x, My = ax, so a = 8.

Finding the potential: if above test says F� is a gradient field, we have 2 methods to find the
potential function f . Illustrated for the above example (taking a = 8):
Method 1: using line integrals (FTC backwards):
We know that if C starts at (0, 0) and ends at (x1 , y1 ) then f (x1 , y1 ) − f (0, 0) = C F� · d�r. Here

f (0, 0) is just an integration constant (if f is a potential then so is f + c). Can also choose the
simplest curve C from (0, 0) to (x1 , y1 ).
Simplest choice: take C = portion of x-axis from (0, 0) to (x1 , 0), then vertical segment from
(x1 , 0) to (x1 , y1 ) (picture drawn).
� �
Then �
F · d�r = (4x2 + 8xy) dx + (3y 2 + 4x2 ) dy:
C C1 +C2
4 3 x1
� � x1 � �
2 4
Over C1 , 0 ≤ x ≤ x1 , y = 0, dy = 0: = (4x + 8x · 0) dx = x = x31 .
C 0 3 0 3
�1 � y1
y
(3y 2 + 4x21 ) dy = y 3 + 4x21 y 01 = y13 + 4x21 y1 .
� �
Over C2 , 0 ≤ y ≤ y1 , x = x1 , dx = 0: =
C2 0
4
So f (x1 , y1 ) = x31 + y13 + 4x21 y1 (+constant).
3
Method 2: using antiderivatives:
We want f (x, y) such that (1) fx = 4x2 + 8xy, (2) fy = 3y 2 + 4x2 .
Taking antiderivative of (1) w.r.t. x (treating y as a constant), we get f (x, y) = 43 x3 + 4x2 y+
integration constant (independent of x). The integration constant still depends on y, call it g(y).
So f (x, y) = 43 x3 + 4x2 y + g(y). Take partial w.r.t. y, to get fy = 4x2 + g � (y).
Comparing this with (2), we get g � (y) = 3y 2 , so g(y) = y 3 + c.
Plugging into above formula for f , we finally get f (x, y) = 43 x3 + 4x2 y + y 3 + c.
Curl.
Now we have: Nx = My ⇔∗ F� is a gradient field ⇔ F� is conservative: C F� · d�r = 0 for any

closed curve.
(*): ⇒ only holds if F� is defined everywhere, or in a “simply-connected” region – see next week.
Failure of conservativeness is given by the curl of F� :
Definition: curl(F� ) = Nx − My .
Interpretation of curl: for a velocity field, curl = (twice) angular velocity of the rotation
component of the motion.
1
2

(Ex: F� = �a, b� uniform translation, F� = �x, y� expanding motion have curl zero; whereas
F� = �−y, x� rotation at unit angular velocity has curl = 2).
For a force field, curl F� = torque exerted on a test mass, measures how F� imparts rotation motion.
Force d
For translation motion: = acceleration = (velocity).
Mass dt
Torque d
For rotation effects: = angular acceleration = (angular velocity).
Moment of inertia dt
18.02 Lecture 22. – Thu, Nov 1, 2007
Handouts: PS8 solutions, PS9, practice exams 3A and 3B.
Green’s theorem.
If C is a positively oriented closed curve enclosing a region R, then
� �� � ��

F · d�r = �
curl F dA which means M dx + N dy = (Nx − My ) dA.
C R C R

��
Example (reduce a complicated line integral to an easy ):
Let C = unit circle centered at (2,0), counterclockwise. R = unit disk at (2, 0). Then
� �� �� ��
−x 1 2 −x −x −x
ye dx + ( x − e ) dy = Nx − My dA = (x + e ) − e dA = x dA.
C 2 R R R
This is equal to area · x̄ = π · 2 = 2π (or by direct computation of the iterated integral). (Note:
direct calculation of the line integral would probably involve setting x = 2 + cos θ, y = sin θ, but
then calculations get really complicated.)
Application: proof of our criterion for gradient fields.
Theorem: if F� = Mı̂ + Nĵ is defined and continuously differentiable in the whole plane, then
Nx = My ⇒ F� is conservative (⇔ F� is a gradient field).
If Nx = My then by Green, C F� · d�r = R curl F� dA = R 0 dA = 0. So F� is conservative.
� �� ��

Note: this only works if F� and its curl are defined everywhere inside R. For the vector field on
PS8 Problem 2, we can’t do this if the region contains the origin – for example, the line integral
along the unit circle is non-zero even though curl(F� ) is zero wherever it’s defined.
Proof of Green’s theorem. 2 preliminary remarks:
� �� � ��
1) the theorem splits into two identities, C M dx = − R My dA and C N dy = R Nx dA.
2) additivity:
� � if theorem
� is true for R1 and R2 then it’s true for the union R �� = R1 ∪��
R2 (picture
��
shown): C = C1 + C2 (the line integrals along inner portions cancel out) and R = R1 + R2 .
� ��
Main step in the proof: prove C M dx = − R My dA for “vertically simple” regions: a < x < b,
f0 (x) < y < f1 (x). (picture drawn). This involves calculations similar to PS5 Problem 3.
LHS: break
� C into �four sides (C1 lower, C2 right vertical segment, C3 upper, C4 left vertical
segment); C2 M dx = C4 M dx = 0 since x = constant on C2 and C4 . So
� � � � b � b
= + = M (x, f0 (x)) dx − M (x, f1 (x)) dx
C C1 C3 a a
(using along C1 : parameter a ≤ x ≤ b, y = f0 (x); along C2 , x from b to a, hence − sign; y = f1 (x)).
3

�� � b� f1 (x) � b
RHS: − My dA = − My dy dx = − (M (x, f1 (x)) − M (x, f0 (x)) dx (= LHS).
R a f0 (x) a
Finally observe:
� any region
�� R can be subdivided into �vertically simple
�� pieces (picture shown);
for each piece Ci M dx = − Ri My dA, so by additivity C M dx = − R My dA.
� ��
Similarly C N dy = R Nx dA by subdividing into horizontally simple pieces. This completes
the proof.

�� Example. The area of a region R can be evaluated using a line integral: for example, C x dy =
R 1dA = area(R).
This idea was used to build mechanical devices that measure area of arbitrary regions on a piece
of paper: planimeters (photo of the actual object shown, and principle explained briefly: as one
moves its arm along a closed curve, the planimeter calculates the line integral of a suitable vector
field by means of an ingenious mechanism; at the end of the motion, one reads the area).

18.02 Lecture 23. – Fri, Nov 2, 2007


Flux. The flux of a vector field F� across a plane curve C is C F� · n̂ ds, where n̂ = normal vector

to C, rotated 90◦ clockwise from T̂ .


We now have two types of line integrals: work, F� · T̂ ds, sums F� · T̂ = component of F� in

direction of C, along the curve C. Flux, F� · n̂ ds, sums F� · n̂ = component of F� perpendicular to



C, along the curve.
� �
If we break C into small pieces of length Δs, the flux is (F · n̂) Δsi .
i

Physical interpretation: if F� is a velocity field (e.g. flow of a fluid), flux measures how much
matter passes through C per unit time.
Look at a small portion of C: locally F� is constant, what passes through portion of C in unit
time is contents of a parallelogram with sides Δs and F� (picture shown with F� horizontal, and
portion of curve = diagonal line segment). The area of this parallelogram is Δs · height = Δs (F� · n̂).
(picture shown rotated with portion of C horizontal, at base of parallelogram). Summing these
contributions along all of C, we get that (F� · n̂) ds is the total flow through C per unit time;

counting positively what flows towards the right of C, negatively what flows towards the left of C,
as seen from the point of view of a point travelling along C.
Example: C = circle of radius a counterclockwise, F� = xı̂ + yĵ (picture shown): along C,
F� //n̂, and |F� | = a, so F� · n̂ = a. So
� �

F · n̂ ds = a ds = a length(C) = 2πa2 .
C C
Meanwhile, the flux of −yı̂ + xĵ across C is zero (field tangent to C).
That was a geometric argument. What about the general situation when calculation of the line
integral is required?
Observe: d�r = T̂ ds = �dx, dy�, and n̂ is T̂ rotated 90◦ clockwise; so n̂ ds = �dy, −dx�.
So, if F� = P ı̂ + Qĵ (using new letters to make things look different; of course we could call the
components M and N ), then
� � �

F · n̂ ds = �P, Q� · �dy, −dx� = −Q dx + P dy.
C C C
4

(or if F� = �M, N �, C −N dx + M dy).


So we can compute flux using the usual method, by expressing x, y, dx, dy in terms of a parameter
variable and substituting (no example given).

Green’s theorem for flux. If C encloses R counterclockwise, and F� = P ı̂ + Qĵ, then


� ��
F� · n̂ ds = div(F� ) dA, where div(F� ) = Px + Qy is the divergence of F� .
C R

Note: the counterclockwise orientation of C means that we count flux of F� out of R through C.
� �
Proof: �
F · n̂ ds = −Q dx + P dy. Call M = −Q and N = P , then apply usual Green’s
� C C ��
theorem M dx + N dy = (Nx − My ) dA to get
C R
� �� ��
−Q dx + P dy = (Px − (−Qy )) dA = div(F� ) dA.
C R R

This proof by “renaming” the components is�why we called the components


�� P, Q instead of M, N .

If we call F = �M, N � the statement becomes −N dx + M dy = (Mx + Ny ) dA.
C R

Example: in the above example (xı̂ + yĵ across circle), div F� = 2, so flux = R 2 dA =
��

2 area(R) = 2πa2 . If we translate C to a different position (not centered at origin) (picture shown)
then direct calculation of flux is harder, but total flux is still 2πa2 .
Physical interpretation: in an incompressible fluid flow, divergence measures source/sink den­
sity/rate, i.e. how much fluid is being added to the system per unit area and per unit time.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 24. – Tue, Nov 6, 2007
Simply connected regions. [slightly different from the actual notations used]
Recall Green’s theorem: if C is a closed curve around R counterclockwise then line integrals can
be expressed as double integrals:
� �� � ��

F · d�r = �
curl(F ) dA, �
F · n̂ ds = div(F� ) dA,
C R C R
where curl(Mı̂ + Nĵ) = Nx − My , div(P ı̂ + Qĵ) = Px + Qy .
For Green’s theorem to hold, F� must be defined on the entire region R enclosed by C.
−y ı̂ + xĵ
Example: (same as in pset): F� = 2 , C = unit circle counterclockwise, then curl(F� ) =
x + y2
∂ x ∂ −y
( 2 2
)− ( 2 ) = · · · = 0. So, if we look at both sides of Green’s theorem:
∂x x + y ∂y x + y 2
� �� ��
F� · d�r = 2π (from pset), curlF� dA = 0 dA = 0 ?
C R R

The problem is that R includes 0, where F� is not defined.


Definition: a region R in the plane is simply connected if, given any closed curve in R, its interior
region is entirely contained in R.
Examples shown.
So: Green’s theorem applies safely when the domain in which F� is defined and differentiable is
simply connected: then we automatically know that, if F� is defined on C, then it’s also defined in
the region bounded by C.
In the above example, can’t apply Green to the unit circle, because the domain of definition
of F� is not simply connected. Still, we can apply Green’s theorem to an annulus (picture shown
of a curve C � = unit circle counterclockwise + segment along x-axis + small circle around origin
clockwise + back to the unit circle allong the x-axis, enclosing an annulus R� ). Then Green applies
and says C � F� · d�r = R� 0 dA = 0; but line integral simplifies to C � = C − C2 , where C = unit
� �� � � �

circle, C2 = small circle / origin; so line integral is actually the same on C and C2 (or any other
curve encircling the origin).
Review for Exam 3.
2 main objects: double integrals and line integrals. Must know how to set up and evaluate.
Double integrals: drawing picture of region, taking slices to set up the iterated integral.

Also in polar coordinates, with dA = r dr dθ (see e.g. Problem 2; not done)


Remember: mass, centroid, moment of inertia.
For evaluation, need to know: usual basic integrals (e.g. dx

� 1 � 2 x ); integration by substitution (e.g.
t dt du
√ = √ , setting u = 1 + t2 ). Don’t need to know: complicated trigonometric
� 1 4 u
2
1+t 2
0
integrals (e.g. cos θ dθ), integration by parts.
Change of variables: recall method:
� �
∂(u, v) �� ux uy ��
1) Jacobian: = . Its absolute value gives ratio between du dv and dx dy.
∂(x, y) � cx vy �
2) express integrand in terms of u, v.
1
2

3) set up bounds in uv-coordinates by drawing picture. The actual example on the test will be
reasonably simple (constant bounds, or circle in uv-coords).

Line integrals: C F� · d�r = C F� · T̂ ds = C M dx + N dy. To evaluate, express both x, y in


� � �
terms of a single parameter and substitute.
Special case: gradient fields. Recall: F� is conservative ⇔ F� · d�r is path independent ⇔ F� is

the gradient of some potential f ⇔ curl F� = 0 (i.e. Nx = My ).


If this is the case, then we can look for a potential using one of the two methods (antiderivatives,
or line integral); and we can then use the FTC to avoid calculating the line integral. (cf. Problem 3).
F� · n̂ ds (=
� �
Flux: C C −Q dx + P dy). Geometric interpretation.
Green’s theorem (in both forms) (already written at beginning of lecture).

18.02 Lecture 25. – Fri, Nov 9, 2007


Handouts: Exam 3 solutions.

���
Triple integrals: f dV (dV = volume element).
R
Example 1: region between paraboloids z = x2 + y 2 and z = 4 − x2 − y 2 (picture drawn), e.g.
��� � ? � ? � 4−x2 −y2
volume of this region: 1 dV = dz dy dx.
R ? ? x2 +y 2
To set up bounds, (1) for fixed (x, y) find bounds for z: here lower limit is z = x2 +y 2 , upper limit
is z = 4 − x2 − y 2 ; (2) find the shadow of R onto the xy-plane, i.e. set of values of (x, y) above which
region lies. Here: R is widest at intersection of paraboloids, which is in plane z = 2; general method:
for which (x, y) is z on top surface > z on bottom surface?
√ Answer: when 4 − x2 − y 2 > x2 − y 2 ,
2 2
i.e. x + y < 2. So we integrate over a disk of radius 2 in the xy-plane. By usual method to set
up double integrals, we finally get:
� √2 � √2−x2 � 4−x2 −y2
V = √ √ dz dy dx.
− 2 − 2−x2 x2 +y 2

Evaluation would be easier if we used polar coordinates x = r cos θ, y = r sin θ, x2 + y 2 = r2 : then


� 2π � √2 � 4−r2
V = dz r dr dθ.
0 0 r2
(evaluation easy, not done).
Cylindrical coordinates. (r, θ, z), x = r cos θ, y = r sin θ. r measures distance from z-axis, θ
measures angle from xz-plane (picture shown).
Cylinder of radius a centered on z-axis is r = a (drawn); θ = 0 is a vertical half-plane (not
drawn).
Volume element: in rect. coords., dV = dx dy dz; in cylindrical coords., dV = r dr dθ dz. In both
cases this is justified by considering a small box with height Δz and base area ΔA, then volume is
ΔV = ΔA Δz.
���
Applications: Mass: M = R δ dV .
3
��� ���
1 1
Average value of f over R: f¯ = f dV ; weighted average: f¯ = f δ dV .
V ol R M ass R
���
1
In particular, center of mass: (x̄, y,
¯ z)
¯ where x ¯= x δ dV.
M ass R
(Note: can sometimes avoid calculation using symmetry, e.g. in above example x̄ = ȳ = 0).
���
Moment of inertia around an axis: I = (distance from axis)2 δ dV .
��� ��� R
2
About z-axis: Iz = r δ dV = (x + y 2 ) δ dV . (consistent with I0 in 2D case)
2
R
�R
�� ���
2 2
Similarly, about x and y axes: Ix = (y + z ) δ dV, Iy = (x2 + z 2 ) δ dV
R R
(setting z = 0, this is consistent with previous definitions of Ix and Iy for plane regions).
Example 2: moment of inertia Iz of solid cone between z = ar and z = b (δ = 1) (picture drawn):
� b � 2π � z/a
πb5
��� � �
2 2
Iz = r dV = r r dr dθ dz = .
R 0 0 0 10a4
(I explained how to find bounds in order dr dθ dz: first we fix z, then slice for given z is the disk
bounded by r = z/a; the first slice is z = 0, the last one is z = b).
Example 3: volume of region where z > 1 − y and x2 + y 2 + z 2 < 1? Pictures drawn: in space,
slice by yz-plane, and projection to xy-plane.

The bottom
√ surface is the plane z = 1 − y, the upper one is the sphere z = 1 − x2 − y 2 . So
� 1−x2 −y2 �
inner is dz. The shadow on the xy-plane = points where 1 − y < 1 − x2 − y 2 , i.e.
1−y � �
squaring both sides, (1 − y)2 < 1 − x2 − y 2 i.e. x2 < 2y − 2y 2 , i.e. − 2y − 2y 2 < x < 2y − 2y 2 .
So we get:
� 1 � √2y−2y2 � √1−x2 −y2
√ dz dx dy.
0 − 2y−2y 2 1−y
Bounds for y: either by observing that x2 < 2y − y 2
has solutions iff 2y − y 2 > 0, i.e. 0 < y < 1,
or by looking at picture where clearly leftmost point is on z-axis (y = 0) and rightmost point is at
y = 1.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 26. – Tue, Nov 13, 2007
Spherical coordinates (ρ, φ, θ).
ρ = rho = distance to origin. φ = ϕ = phi = angle down from z-axis. θ = same as in cylindrical
coordinates. Diagram drawn in space, and picture of 2D slice by vertical plane with z, r coordinates.
Formulas to remember: z = ρ cos φ, r = ρ sin φ (so x = ρ sin φ cos θ, y = ρ sin φ sin θ).
� √
ρ = x2 + y 2 + z 2 = r2 + z 2 . The equation ρ = a defines the sphere of radius a centered at 0.
On the surface of the sphere, φ is similar to latitude, except it’s 0 at the north pole, π/2 on the
equator, π at the south pole. θ is similar to longitude.

φ = π/4 is a cone (asked using flash cards) (z = r = x2 + y 2 ). φ = π/2 is the xy-plane.
Volume element: dV = ρ2 sin φ dρ dφ dθ.
To understand this formula, first study surface area on sphere of radius a: picture shown of a
“rectangle” corresponding to Δφ, Δθ, with sides = portion of circle of radius a, of length aΔφ, and
portion of circle of radius r = a sin φ, of length rΔθ = a sin φΔθ. So ΔS ≈ a2 sin φ ΔφΔθ, which
gives the surface element dS = a2 sin φ dφdθ.
The volume element follows: for a small “box”, ΔV = ΔS Δρ, so dV = dρ dS = ρ2 sin φ dρdφdθ.
Example: recall the complicated example at end of Friday’s lecture (region sliced by a plane
inside unit sphere). After rotating coordinate
√ system, the question becomes: volume of the portion
of unit sphere above the plane z = 1/ 2? (picture drawn). This can be set up in cylindrical (left
as exercise) or spherical coordinates.
For fixed φ, θ we √are slicing our region by rays straight out of the origin; ρ ranges from its value
on the plane z =√1/ 2 to its value√on the sphere ρ = 1. Spherical coordinate equation of the plane:
z = ρ cos φ = 1/ 2, so ρ = sec φ/ 2. The volume is:
� 2π � π/4 � 1
ρ2 sin φ dρ dφ dθ.
1
0 0 √ sec φ
2

(Bound for φ explained by looking at a slice by vertical plane θ = constant: the edge of the region
is at z = r = √12 ).
2π 5π
Evaluation: not done. Final answer: − √ .
3 6 2
Application to gravitation.
Gravitational force exerted on mass m at origin by a mass ΔM at (x, y, z) (picture shown)
G ΔM m �x, y, z� G ΔM m
is given by |F� | = , dir(F� ) = , i.e. F� = �x, y, z�. (G = gravitational
ρ2 ρ ρ3
constant).
If instead of a point mass we have a solid with density δ, then we must integrate contributions
to gravitational attraction from small pieces ΔM = δ ΔV . So
Gm �x, y, z�
��� ���
z
F� = 3
δ dV, i.e. z-component is Fz = Gm 3
δ dV, . . .
R ρ R ρ
If we can set up to use symmetry, then Fz can be computed nicely using spherical coordinates.
General setup: place the mass m at the origin (so integrand is as above), and place the solid
so that the z-axis is an axis of symmetry. Then F� = �0, 0, Fz � by symmetry, and we have only one

1
2

component to compute. Then


��� ��� ���
z ρ cos φ 2
Fz = Gm 3
δ dV = Gm δ ρ sin φ dρ dφ dθ = Gm δ cos φ sin φ dρ dφ dθ.
R ρ R ρ3 R

Example: Newton’s theorem: the gravitational attraction of a spherical planet with uniform
density δ is the same as that of the equivalent point mass at its center.

[[Setup: the sphere has radius a and is centered on the positive z-axis, tangent to xy-plane at
the origin; the test mass is m at the origin. Then
��� � 2π � π/2 � 2a cos φ
z 4 GM m
Fz = Gm 3
δ dV = Gm δ cos φ sin φ dρ dφ dθ = · · · = Gmδ πa =
R ρ 0 0 0 3 a2
where M = mass of the planet = 43 πa3 δ. (The bounds for ρ and φ need to be explained carefully,
by drawing a diagram of a vertical slice with z and r coordinate axes, and the inscribed right
triangle with vertices the two poles of the sphere + a point on its surface, the hypothenuse is the
diameter 2a and we get ρ = 2a cos φ for the spherical coordinate equation of the sphere).]]

18.02 Lecture 27. – Thu, Nov 15, 2007


Handouts: PS10 solutions, PS11
Vector fields in space.
At every point in space, F� = P ı̂ + Qĵ + Rk̂, where P, Q, R are functions of x, y, z.
Examples: force fields (gravitational force F� = −c�x, y, z�/ρ3 ; electric field E, magnetic field B);
velocity fields (fluid flow, v = v(x, y, z)); gradient fields (e.g. temperature and pressure gradients).
Flux.
Recall: in 2D, flux of a vector field F� across a curve C = C F� · n̂ ds.

In 3D, flux of a vector field is a double integral: flux through a surface, not a curve!
F� vector field, S surface, n̂ unit normal vector: F� · n̂ dS.
��
Flux =
� = n̂ dS. (We’ll see that dS
Notation: dS � is often easier to compute than n̂ and dS).
Remark: there are 2 choices for n̂ (choose which way is counted positively!)
Geometric interpretation of flux:
As in 2D, if F� = velocity of a fluid flow, then flux = flow per unit time across S.
Cut S into small pieces, then over each small piece: what passes through ΔS in unit time is the
contents of a parallelepiped with base ΔS and third side given by F� .
Volume of box = base × height = (F� · n̂) ΔS.
• Examples:
1) F� = xı̂ + yĵ + zk̂ through sphere of radius a centered at 0.
n̂ = a1 �x, y, z� (other choice: − a1 �x, y, z�; traditionally choose n̂ pointing out).
F� · n̂ = �x, y, z� · n̂ = a1 (x2 + y 2 + z 2 ) = a, so S F� · n̂dS = S a dS = a (4πa2 ).
�� ��
3

� · n̂ = z 2 .
� = zk̂: H
2) Same sphere, H a
�� 2 � 2π � π 2 � π
a cos2 φ 2
��
� · dS
�= z 4
H dS = a sin φ dφdθ = 2πa3 cos2 φ sin φ dφ = πa3 .
S S a 0 0 a 0 3

Setup. Sometimes we have an easy geometric argument, but in general we must compute the
surface integral. The setup requires the use of two parameters to describe the surface, and F� · n̂ dS
must be expressed in terms of them. How to do this depends on the type of surface. For now,
formulas to remember:
0) plane z = a parallel to xy-plane: n̂ = ±k̂, dS = dx dy. (similarly for planes // xz or yz-plane).
1) sphere of radius a centered at origin: use φ, θ (substitute ρ = a for evaluation); n̂ = a1 �x, y, z�,
dS = a2 sin φ dφ dθ.
2) cylinder of radius a centered on z-axis: use z, θ (substitute r = a for evaluation): n̂ is radially
out in horizontal directions away from z-axis, i.e. n̂ = a1 �x, y, 0�; and dS = a dz dθ (explained by
drawing a picture of a “rectangular” piece of cylinder, ΔS = (Δz) (aΔθ)).
3) graph z = f (x, y): use x, y (substitute z = f (x, y)). We’ll see on Friday that n̂ and dS
separately are complicated, but n̂ dS = �−fx , −fy , 1� dx dy.

18.02 Lecture 28. – Fri, Nov 16, 2007


Last time, we defined the flux of F� through surface S as F� · n̂ dS, and saw how to set up in
��
various cases. Continue with more:
Flux through a graph. If S is the graph of some function z = f (x, y) over a region R of
xy-plane: use x and y as variables. Contribution of a small piece of S to flux integral?
Consider portion of S lying above a small rectangle Δx Δy in xy-plane. In linear approximation
it is a parallelogram. (picture shown)
The vertices are (x, y, f (x, y)); (x + Δx, y, f (x + Δx, y)); (x, y + Δy, f (x, y + Δy)); etc. Linear
approximation: f (x + Δx, y) � f (x, y) + Δx fx (x, y), and f (x, y + Δy) � f (x, y) + Δy fy (x, y).
So the sides of the parallelogram are �Δx, 0, Δx fx � and �0, Δy, Δy fy �, and
� �
� ı̂ ĵ k̂ �
� = (Δx �1, 0, fx �) × (Δy �0, 1, fy �) = ΔxΔy � 1 0 fx � = �−fx , −fy , 1�ΔxΔy.
� �
ΔS � �
� 0 1 fy �
� = ±�−fx , −fy , 1�dx dy.
So dS
�−fx , −fy , 1�
�) = �

� | = fx2 + fy2 + 1 dx dy. The
(From this we can get n̂ = dir(dS and dS = |dS
fx2 + fy2 + 1

conversion factor · · · between dS and dA relates area on S to area of projection in xy-plane.)

• Example: flux of F� = zk̂ through S = portion of paraboloid z = x2 + y 2 above unit disk,


oriented with normal pointing up (and into the paraboloid): geometrically flux should be > 0
(asked using flashcards). We have n̂ dS = �−2x, −2y, 1� dx dy, and
�� �� �� � 2π � 1
� �
F · dS = z dx dy = 2 2
(x + y ) dx dy = r2 r dr dθ = π/2.
S S S 0 0

Parametric surfaces. If we can describe S by parametric equations x = x(u, v), y = y(u, v),
�,
z = z(u, v) (i.e. �r = �r(u, v)), then we can set up flux integrals using variables u, v. To find dS
4

consider a small portion of surface corresponding to changes Δu and Δv in parameters, it’s a


parallelogram with sides �r(u + Δu, v) − �r(u, v) ≈ (∂�r/∂u) Δu and (∂�r/∂v) Δv, so
� � � � � �
� ∂�r ∂�r � ∂�r ∂�r
ΔS = ± Δu × Δv , dS = ± × du dv.
∂u ∂v ∂u ∂v
(This generalizes all formulas previously seen; but won’t be needed on exam).
Implicit surfaces: If we have an implicitly defined surface g(x, y, z) = 0, then we have a (non­
unit) normal vector N = �g. (similarly for a slanted plane, from equation ax + by + cz = d we get
N = �a, b, c�).
Unit normal n̂ = ±N/|N|; surface element ΔS = ? Look at projection to xy-plane: ΔA =
ΔS cos α = (N · k̂/|N|) ΔS (where α = angle between slanted surface element and horizontal:
projection shrinks one direction by factor cos α = (N · k̂)/|N|, preserves the other).
|N| |N|n̂ N
Hence dS = dA, and n̂ dS = dx dy = ± dx dy.
N · k̂ N · k̂ N · k̂
|N|
(In fact the first formula should be dS = dA, I forgot the absolute value).
|N · k̂|
Note: if S is vertical then the denominator is zero, can’t project to xy-plane any more (but one
could project e.g. to the xz-plane).
Example: if S is a graph, g(x, y, z) = z − f (x, y) = 0, then N = �gx , gy , gz � = �−fx , −fy , 1�,
N · k̂ = 1, so we recover the formula dS� = �−fx , −fy , 1�dx dy seen before.

Divergence theorem. (“Gauss-Green theorem”) – 3D analogue of Green theorem for flux.


If S is a closed surface bounding a region D, with normal pointing outwards, and F� vector field
defined and differentiable over all of D, then
�� ���
F� · dS
�= div F� dV, where div (P ˆı + Qˆj + Rk̂) = Px + Qy + Rz .
S D

Example: flux of F� = zk̂ out of sphere of radius a (seen Thursday): div F� = 0 + 0 + 1 = 1, so


� � 3
��
S F · dS = 3 vol(D) = 4πa /3.

Physical interpretation (mentioned very quickly and verbally only): div F� = source rate =
flux generated per unit volume. So the divergence theorem says: the flux outwards through S (net
amount leaving D per unit time) is equal to the total amount of sources in D.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 29. – Tue, Nov 20, 2007

�=
�� ���
Recall statement of divergence theorem: S F · dS D div F dV .
Del operator. � = �∂/∂x, ∂/∂y, ∂/∂z� (symbolic notation!)
�f = �∂f /∂x, ∂f /∂y, ∂f /∂z� = gradient.
� · F = �∂/∂x, ∂/∂y, ∂/∂z� · �P, Q, R� = Px + Qy + Rz = divergence.
Physical interpretation. div F = source rate = flux generated per unit volume. Imagine
an incompressible��fluid flow (i.e. a given mass occupies a fixed volume) with velocity F, then
���
D div F dV = S F · n̂ dS = flux through S is the net amount leaving D per unit time = total
amount of sources (minus sinks) in D.
�=
�� ���
Proof of divergence theorem. To show S �P, Q, R� · dS (P + Qy + Rz ) dV , we can
��� D x
�=
��
separate into sum over components and just show S Rk̂ · dS D z dV & same for P and Q.
R
If the region D is vertically simple, i.e. top and bottom surfaces are graphs, z1 (x, y) ≤ z ≤
z2 (x, y), with (x, y) in some region U of xy-plane: r.h.s. is
��� � � � z2 (x,y) ��
� �
Rz dV = Rz dz dx dy = (R(x, y, z2 (x, y)) − R(x, y, z1 (x, y)) dx dy.
D U z1 (x,y) U

� = �−∂z2 /∂x, −∂z2 /∂y, 1�dx dy, so �


�� ��
Flux through top: dS top Rk̂ ·dS = R(x, y, z2 (x, y)) dx dy.
� = −�−∂z1 /∂x, −∂z1 /∂y, 1�dx dy, so �
�� ��
Bottom: dS bottom Rk̂ · dS = −R(x, y, z1 (x, y)) dx dy.
Sides: sides are vertical, n̂ is horizontal, F is vertical so flux = 0.
���Given any region D, decompose �� it into vertically simple pieces (illustrated for a donut). Then
D = sum of pieces (clear), and S = sum of pieces since the internal boundaries cancel each
other.
Diffusion equation: governs motion of smoke in (immobile) air (dye in solution, ...)
� 2
∂ u ∂2u ∂2u

∂u 2
The equation is: = k� u = k + 2 + 2 ,
∂t ∂x2 ∂y ∂z
where u(x, y, z, t) = concentration of smoke; we’ll also introduce F = flow of the smoke. It’s also
the heat equation (u = temperature).
Equation uses two inputs:
1) Physics: F = −k�u (flow goes from highest to lowest concentration, faster if concentration
changes more abruptly).
��
2) Flux and quantity of smoke are related: if D bounded by closed surface S, then S F · n̂ dS =
d
���
− dt D u dV . (flux out of D = - variation of total amount of smoke inside D)
��� ∂
By differentiation under integral sign, the r.h.s. is − D ∂t u dV
(This can be explained in terms of
integral as a sum of u(x
���i , yi , zi , t)ΔVi and derivative of sum is sum of derivatives) and by divergence
theorem the l.h.s. is D div F dV . Dividing by volume of D, we get
��� ���
1 ∂u 1
− dV = div F dV.
vol(D) D ∂t vol(D) D
Same average values over any region; taking limit as D shrinks to a point, get ∂u/∂t = −div F.
Combining, we get the diffusion equation: ∂u/∂t = −div F = +kdiv (�u) = k�2 u.

1
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 30. – Tue, Nov 27, 2007
Handouts: practice exams 4A and 4B.
Clarification from end of last lecture: we derived the diffusion equation from 2 inputs. u =
concentration, F = flow, satisfy:
1) from physics: F = −k�u,
2) from divergence theorem: ∂u/∂t = −div F.
Combining, we get the diffusion equation: ∂u/∂t = −div F = +kdiv (�u) = k�2 u.
Line integrals in space.
Force field F = �P, Q, R�, curve C in space, d�r = �dx, dy, dz�
� �
⇒ Work = C F · d�r = C P dx + Q dy + R dz.
Example: F = �yz, xz, xy�. C: x = t3 , y = t2 , z = t. 0 ≤ t ≤ 1. Then dx = 3t2 dt, dy = 2tdt,
dz = dt and substitute:
� � � 1
F · d�r = yzdx + xzdy + xydz = 6t5 dt = 1
C C 0
(In general, express (x, y, z) in terms of a single parameter: 1 degree of freedom)
Same F, curve C � = segments from (0, 0, 0) to (1, 0, 0) to (1, 1, 0) to (1, 1, 1). In the xy-plane,
z = 0 =⇒ F = xyk̂, so F · d�r = 0, no �work. For the last segment, x = y = 1, dx = dy = 0, so
1
F = �z, z, 1� and d�r = �0, 0, dz�. We get 0 1 dz = 1.
Both give the same answer because F is conservative, in fact F = �(xyz).
Recall the fundamental theorem of calculus for line integrals:
� P1
�f · d�r = f (P1 ) − f (P0 ).
P0

Gradient fields.
F = �P, Q, R� = �fx , fy , fz � ?
Then fxy = fyx , fxz = fzx , fyz = fzy , so Py = Qx , Pz = Rx , Qz = Ry .
Theorem: F is a gradient field if and only if these equalities hold (assuming defined in whole
space or simply connected region)
Example: for which a, b is axyı̂ + (x2 + z 3 )ĵ + (byz 2 − 4z 3 )k̂ a gradient field?
Py = ax = 2x = Qx so a = 2; Pz = 0 = 0 = Rx ; Qz = 3z 2 = bz 2 = Ry so b = 3.
Systematic method to find a potential: (carried out on above example)
fx = 2xy, fy = x2 + z 3 , fz = 3yz 2 − 4z 3 :
fx = 2xy ⇒ f (x, y, z) = x2 y + g(y, z).
fy = x2 + gy = x2 + z 3 ⇒ gy = z 3 ⇒ g(y, z) = yz 3 + h(z), and f = x2 y + yz 3 + h(z).
fz = 3yz 2 + h� (z) = 3yz 2 − 4z 3 ⇒ h� (z) = −4z 3 ⇒ h(z) = −z 4 + c, and f = x2 y + yz 3 − z 4 + c.
�P
Other method: f (x1 , y1 , z1 ) = f (0, 0, 0) + P01 F · d�r (use a curve that gives an easy computation,
e.g. 3 segments parallel to axes).
Curl: encodes by how much F fails to be conservative.
curl �P, Q, R� = (Ry − Qz )ı̂ + (Pz − Rx )ĵ + (Qx − Py )k̂.

1
2

How to remember the formula? Use the del operator � = �∂/∂x, ∂/∂y, ∂/∂z�.
Recall from last week that � · F = �∂/∂x, ∂/∂y, ∂/∂z� · �P, Q, R� = Px + Qy + Rz = div F.
� �
� ı̂ ĵ k̂ ��
� ∂ ∂ ∂ �
Now we have: � × F = �� ∂x ∂y ∂z �
= curl F.
� P Q R �
Interpretation of curl for velocity fields: curl measures angular velocity.
Example: rotation around z-axis at constant angular velocity ω (trajectories are circles centered
on z-axis): v = �−ωy, ωx, 0�.
Then � × v = ... = 0ı̂ + 0ĵ + (ω + ω)k̂ = 2ωk̂. So length of curl = twice angular velocity, and
direction = axis of rotation.
A general motion can be complicated, but decomposes into various effects.
• curl measures the rotation component of a complex motion.

18.02 Lecture 31. – Thu, Nov 29, 2007


Handouts: PS11 solutions, PS12.
Stokes’ theorem is the 3D analogue of Green’s theorem for work (in the same sense as the
divergence theorem is the 3D analogue of Green for flux).
� �
� ı̂ ĵ k̂ ��
� ∂ ∂ ∂ �
Recall curl F = � × F = �� ∂x ∂y ∂z �
= �Ry − Qz , Pz − Rx , Qx − Py �.
� P Q R �
Stokes’ theorem: if C is a closed curve, and S any surface bounded by C, then
� ��
F · d�r = (� × F) · n̂ dS.
C S
Orientation: compatibility of an orientation of C with an orientation of S (changing orientation
changes sign on both sides of Stokes).
Rule: if I walk along C in positive direction, with S to my left, then n̂ is pointing up. (Various
examples shown.)
Another formulation (right-hand rule): if thumb points along C (1-D object), index finger towards
S (2-D object), then middle finger points along n̂ (3-D object).
More examples shown.
Example: Stokes � vs. Green. � If S is a portion of xy-plane bounded��by a curve C coun­
terclockwise, then C F · d�r = C P dx + Q dy, by Green this is equal to S (Qx − Py ) dx dy =
�� ��
S � × F · k̂ dx dy = S � × F · n̂ dS, so Green and Stokes say the same thing in this example.
Remark. In Stokes’ theorem we are free to choose any surface S bounded by C! (e.g. if C =
circle, S could be a disk, a hemisphere, a cone, ...)
“Proof ” of Stokes.
1) if C and S are in the xy-plane then the statement follows from Green.
2) if C and S are in an arbitrary plane: this also reduces to Green in the given plane. Green/Stokes
works in any plane because of geometric invariance of work, curl and flux under rotations of space.
They can be defined in purely geometric terms so as not to depend on the coordinate system
(x, y, z); equivalently, we can choose coordinates (u, v, w) adapted to the given plane, and work
3

with those coordinates, the expressions of work, curl, flux will be the familiar ones replacing x, y, z
with u, v, w.
3) in general, we can decompose S into small pieces, each piece is nearly flat (slanted plane); on
each piece we have approximately work = flux by Green’s theorem. When adding pieces, the line
integrals over the inner boundaries cancel each other and we get the line integral over C; the flux
integrals add up to flux through S.
Example: verify Stokes for F = zı̂ + xĵ + yk̂, C = unit circle in xy-plane (counterclockwise),
S = piece of paraboloid z = 1 − x2 − y 2 .
� � �
Direct calculation: x = cos θ, y = sin θ, z = 0, so C F · d�r = C z dx + x dy + y dz = C x dy =
� 2π 2
0 cos θ dθ = π.
By Stokes: curl F = �1, 1, 1�, and n̂ dS = �−fx , −fy , 1�dx dy = �2x, 2y, 1� dx dy.
�� �� ��

(� × F) · dS = �(2x + 2y + 1) dx dy = 1 dx dy = area(disk) = π.
S
��
( x dx dy = 0 by symmetry and similarly for y).

18.02 Lecture 32. – Fri, Nov 30, 2007


Stokes and path independence.
Definition: a region is simply connected if every closed loop C inside it bounds some surface S
inside it.
Example: the complement of the z-axis is not simply connected (shown by considering a loop
encircling the z-axis); the complement of the origin is simply connected.
Topology: uses these considerations to classify for example surfaces in space: e.g., the mathemat­
ical proof that a sphere and a torus are “different” surfaces is that the sphere is simply connected,
the torus isn’t (in fact it has two “independent” loops that don’t bound).
Recall: if F is a gradient field then curl(F) = 0.

Conversely, Theorem: if �×F = 0 in a simply connected region then F is conservative (so F · d�r
is path-independent and we can find a potential).
Proof: Assume R simply connected, � × F = 0, and consider two curves� C1 and C�2 with same
end points. Then C = C1 − C2 is a closed curve so bounds some S; C1 F · d�r − C2 F · d�r =
� ��
C F · d�
r = S � × F · n̂ dS = 0.
Orientability. We can apply Stokes’ theorem to any surface S bounded by C... provided that
it has a well-defined normal vector! Counterexample shown: the Möbius strip. It’s a one-sided
surface, so we can’t compute flux through it (no possible consistent choice of orientation of n̂).
Instead, if we want to apply Stokes to the boundary curve C, we must find a two-sided surface with
boundary C. (pictures shown).
Stokes and surface independence.
� In Stokes��we can choose any �� S bounded by C: so if a same C bounds two surfaces S1 , S2 , then
C F · d�
r = S1 curl F · n̂ dS = S2 curl F · n̂ dS? Can we prove directly that the two flux integrals
are equal?
Answer: change orientation of S2 ,��then S = S1 − S2 is ���a closed surface with n̂ outwards; so we
can apply the divergence theorem: S curl F · n̂ dS = D div(curl F) dV . But div(curl F) = 0,
4

always. (Checked by calculating in terms of components of F; also, symbolically: � · (� × F) = 0,


much like u · (u × v) = 0 for genuine vectors).
Review for Exam 4.
We’ve seen three types of integrals, with different ways of evaluating:
���
1) f dV in rect., cyl., spherical coordinates (I re-explained the general setup and the formulas
for dV ); applications: center of mass, moment of inertia, gravitational attraction.
��
2) surface integrals, flux. Setting up S F · n̂ dS, by knowing formulas for n̂ dS.
We have seen: planes parallel to coordinate planes (e.g. yz-plane: n̂ = ±ı̂, dS = dy dz); spheres
and cylinders (n̂ = straight out/in from center or axis; dS = a dz dθ for cylinders, a2 sin φ dφdθ
for spheres); if we can express z = f (x, y), n̂ dS = ±�−fx , −fy , 1�dx dy (recall �. . . � is not n̂
and dx dy is not dS); if S has a given normal vector N � (e.g. if S is given by g(x, y, z) = 0),
n̂ dS = ±N � /(N ˆ dx dy.
� · k)
� �
3) line integrals C F · d�r (= C P dx + Q dy + R dz), evaluate by parameterizing C and expressing
in terms of a single variable.
While these various types of integrals are completely different in terms of interpretation and
method of evaluation, we’ve seen some theorems that establish bridges between them:
�� ��� �� ���
a) ( vs ) divergence theorem: S closed surface, n̂ outwards, then S F·n̂ dS = (div F) dV .
� �� �D
�� b) ( vs ) Stokes’ theorem: C closed curve bounding S compatibly oriented, then C F · d�r =
S (� × F) · n̂ dS.
Both sides of these theorems are integrals of the types discussed above, and are evaluated by the
usual methods! (even if the integrand happens to be a div or a curl).
In fact, another conceptually similar bridge exists between
� no integral at all and line integral:
the fundamental theorem of calculus, f (P1 ) − f (P0 ) = C �f · d�r.
One more topic: given F with curl F = 0, finding a potential function.
MIT OpenCourseWare
http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 33. – Thu, Dec 6, 2007

Handouts: PS12 solutions; exam 4 solutions; review sheet and practice final.
Applications of div and curl to physics.
Recall: curl of velocity field = 2· angular velocity vector (of the rotation component of motion).
E.g., for uniform rotation about z-axis, v = ω(−yı̂ + xĵ), and � × v = 2ωk̂.
Curl singles out the rotation component of motion (while div singles out the stretching compo­
nent).
Interpretation of curl for force fields.
If we have a solid in a force field (or rather an acceleration field!) F such that the force exerted
on Δm at (x, y, z) is F(x, y, z) Δm:��� recall the torque of the force about the origin is defined as
τ = �r × F (for the entire solid, take . . . δ dV ), and measures how F imparts rotation motion.
Force d
For translation motion: = acceleration = (velocity).
Mass dt
Torque d
For rotation effects: = angular acceleration = (angular velocity).
Moment of inertia dt
Force Torque
Hence: curl( )=2 .
Mass Moment of inertia
Consequence: if F derives from a potential, then �×F = �×(�f ) = 0, so F does not induce any
rotation motion. E.g., gravitational attraction by itself does not affect Earth’s rotation. (not strictly
true: actually Earth is deformable; similarly, friction and tidal effects due to Earth’s gravitational
attraction explain why the Moon’s rotation and revolution around Earth are synchronous).
Div and curl of electrical field. – part of Maxwell’s equations for electromagnetic fields.
1) Gauss-Coulomb law: � · E � = ρ (ρ = charge density, �0 = physical constant).
�0
�� ���
By divergence theorem, can reformulate as: � · n̂ dS =
E �·E � dV = Q , where Q =
S D �0
total charge inside the closed surface S.
This formula tells how charges influence the electric field; e.g., it governs the relation between
voltage between the two plates of a capacitor and its electric charge.

2) Faraday’s law: � × E � = − ∂B (B � = magnetic field).
∂t
So in presence of a varying magnetic field, E � is no longer conservative: if we have a closed loop
� ��
of wire, we get a non-zero voltage (“induction” effect). By Stokes, � · d�r = − d
E � · n̂ dS.
B
C dt S
This principle is used e.g. in transformers in power adapters: AC runs through a wire looped
around a cylinder, which creates an alternating magnetic field; the flux of this magnetic field
through another output wire loop creates an output voltage between its ends.
There are two more Maxwell equations, governing div and curl of B �: � · B � = 0, and � × B � =

∂E
µ0 J� + �0 µ0 (where J� = current density).
∂t

You might also like