Apply the Mean Value Theorem again to the function g(t)=fx(a+θ1h,t) on [b,b+k]. There exists θ2∈(0,1) such that
Δ(h,k)=hk⋅fxy(a+θ1h,b+θ2k)
Similarly, by reversing the order of application, there exist θ3,θ4∈(0,1) such That
Δ(h,k)=hk⋅fyx(a+θ3h,b+θ4k)
For h,k=0 we have
fxy(a+θ1h,b+θ2k)=fyx(a+θ3h,b+θ4k)
Taking the limit as (h,k)→(0,0) and using continuity of fxy and fyxWe obtain fxy(a,b)=fyx(a,b). ■
Intuition. Clairaut’s theorem tells us that, under a mild regularity condition (continuity of the Mixed second partials), the order in which we differentiate does not matter. Without this Condition, the mixed partials may differ.
1.3 Differentiability
Definition.f:D⊆Rn→R is differentiable at a if There exists a linear map L:Rn→R such that
limh→0∥h∥f(a+h)−f(a)−L(h)=0
When f is differentiable at aThe linear map L is given by the gradient.
Remark. Existence of all partial derivatives at a point does not imply differentiability at That point. The canonical counterexample is
Both fx(0,0) and fy(0,0) exist (and equal 0), yet f is not even continuous at the origin, Hence not differentiable.
1.4 The Gradient
The gradient of f at a is
∇f(a)=(∂x1∂f(a),…,∂xn∂f(a))
The linear approximation of f near a is
f(a+h)≈f(a)+∇f(a)⋅h
Theorem 1.2. If all partial derivatives of f exist and are continuous in a neighbourhood of aThen f is differentiable at a.
Remark. Functions whose partial derivatives exist and are continuous on an open set U are called C1(U). Theorem 1.2 says C1⟹ differentiable. The converse is false: there exist Differentiable functions whose partial derivatives are not continuous.
Proposition. If f is differentiable at aThen f is continuous at a.
Proof. From the definition of differentiability:
f(a+h)−f(a)=L(h)+ε(h)∥h∥
Where L is linear and ε(h)→0 as h→0. As h→0 Both terms on the right vanish, so f(a+h)→f(a). ■
1.5 Directional Derivatives
The directional derivative of f at a in the direction of a unit vector u is
Duf(a)=limh→0hf(a+hu)−f(a)
Theorem 1.3. If f is differentiable at aThen
Duf(a)=∇f(a)⋅u
Proof. Since f is differentiable at a
hf(a+hu)−f(a)=h∇f(a)⋅(hu)+ε(hu)∥hu∥
=∇f(a)⋅u+ε(hu)∥u∥
Where ε(h)→0 as h→0. Taking h→0 gives the result. ■
Corollary 1.4. The gradient points in the direction of steepest ascent, and ∥∇f∥ Is the rate of steepest ascent.
Proof. By the Cauchy—Schwarz inequality, ∣∇f⋅u∣≤∥∇f∥⋅∥u∥=∥∇f∥ With equality when u is parallel to ∇f. ■
1.6 Chain Rule
Theorem 1.5 (Multivariable Chain Rule). If g:Rm→Rn is Differentiable at a and f:Rn→R is differentiable at g(a)Then
∇(f∘g)(a)=Jg(a)T∇f(g(a))
Where Jg is the Jacobian matrix of g.
Proof. Write h(t)=f(g(a+tv)) for a fixed direction v. Then
th(t)−h(0)=tf(g(a+tv))−f(g(a))
Let k=g(a+tv)−g(a). By differentiability of gk=Jg(a)(tv)+o(t)And k→0 as t→0. By Differentiability of f:
f(g(a)+k)−f(g(a))=∇f(g(a))⋅k+o(∥k∥)
=∇f(g(a))⋅[Jg(a)(tv)+o(t)]+o(t)
Dividing by t and taking t→0:
h′(0)=∇f(g(a))⋅Jg(a)v=[Jg(a)T∇f(g(a))]⋅v
Since v was arbitrary, ∇h(0)=Jg(a)T∇f(g(a)). ■
1.7 Chain Rule Worked Example
Problem. Let f(x,y)=x2y and let x=cost, y=sint. Find dtdf(cost,sint) Using the chain rule, and verify by direct substitution.
Solution
Via the chain rule:
dtdf(x(t),y(t))=fx⋅x′(t)+fy⋅y′(t)
=2xy⋅(−sint)+x2⋅cost=−2costsin2t+cos3t
Via direct substitution:f(cost,sint)=cos2tsint.
dtd[cos2tsint]=−2costsin2t+cos3t
Both methods agree. ■
1.8 Worked Example
Problem. Let f(x,y)=x2y+sin(xy). Compute ∇f and find the directional derivative At (1,π) in the direction u=(1/2,1/2).
Solution.
∂x∂f=2xy+ycos(xy)
∂y∂f=x2+xcos(xy)
∇f(1,π)=(2π+πcos(π),1+cos(π))=(2π−π,1−1)=(π,0)
Duf(1,π)=∇f(1,π)⋅u=π⋅21+0=2π■
1.9 Additional Worked Examples
Problem. Let f(x,y,z)=x2yez+sin(xz). Compute ∇f and evaluate it at (1,0,π).
Problem. Find the directional derivative of f(x,y)=x2y3 at (1,−1) in the direction of v=(3,−4).
Solution
First normalise v: ∥v∥=9+16=5So u=(3/5,−4/5).
∇f=(2xy3,3x2y2)
∇f(1,−1)=(2⋅1⋅(−1),3⋅1⋅1)=(−2,3)
Duf(1,−1)=(−2)(3/5)+(3)(−4/5)=5−6−12=−518
■
1.10 Implicit Differentiation
Suppose F(x,y,z)=0 defines z implicitly as a function of x and y near a point (a,b,c) with Fz(a,b,c)=0. By the Implicit Function Theorem, there exists a C1 function φ defined on a neighbourhood of (a,b) such that φ(a,b)=c and F(x,y,φ(x,y))=0.
Differentiating F(x,y,φ(x,y))=0 with respect to x:
Fx+Fz⋅∂x∂z=0⟹∂x∂z=−FzFx
Similarly, ∂y∂z=−FzFy.
Proposition 1.6 (Implicit Function Theorem, special case). If F:R3→R is C1 and F(a,b,c)=0 with Fz(a,b,c)=0Then there exist neighbourhoods U of (a,b) and V of c and a unique C1 function φ:U→V with φ(a,b)=c and F(x,y,φ(x,y))=0 for all (x,y)∈U.
Problem. If x2y+y2z+z2x=3Find ∂x∂z and ∂y∂z at the point (1,1,1).
Solution
Let F(x,y,z)=x2y+y2z+z2x−3. Then Fx=2xy+z2Fy=x2+2yz, Fz=y2+2zx.
At (1,1,1): Fx=3, Fy=3, Fz=3.
∂x∂z=−FzFx=−33=−1,∂y∂z=−FzFy=−33=−1
■
1.11 Taylor’s Theorem for Multivariable Functions
Theorem 1.7 (Taylor’s Theorem). Let f:U⊆Rn→R be of class Ck+1 On an open convex set UAnd let a∈U. Then for all x∈U:
f(x)=f(a)+∇f(a)⋅(x−a)+2!1(x−a)THf(a)(x−a)+⋯+Rk
Where Hf is the Hessian matrix and the remainder Rk can be written in Lagrange form:
Rk=(k+1)!1∑∣α∣=k+1α!(k+1)!Dαf(c)(x−a)α
For some c on the line segment joining a and x.
For n=2 and k=2The second-order Taylor expansion is:
For some τ∈(0,1). By the multivariable chain rule, ϕ′(t)=∇f(a+t(x−a))⋅(x−a)And higher Derivatives involve higher-order partial derivatives of f. Substituting c=a+τ(x−a) yields the result. ■
1.12 Common Pitfalls
:::caution Common Pitfalls
Existence = continuity of partials. A function can have all partial derivatives at a point yet fail to be continuous (hence not differentiable) there.
Existence = differentiability. Even if all partials exist at a point, the function need not be differentiable. Continuity of the partials in a neighbourhood (i.e., C1) is sufficient but not necessary.
Clairaut’s theorem requires continuity. Without continuity of the mixed partials, the equality fxy=fyx can fail.
Normalise the direction vector. The formula Duf=∇f⋅u assumes ∥u∥=1. If the direction is given by a non-unit vector vDivide by ∥v∥ first. :::
2. Multiple Integrals
2.1 Double Integrals
The double integral of f over a rectangle R=[a,b]×[c,d] is defined as the limit of Riemann sums:
∬Rf(x,y)dA=lim∥P∥→0∑i,jf(xij∗,yij∗)ΔAij
Theorem 2.1 (Fubini’s Theorem). If f is continuous on R=[a,b]×[c,d]Then
Proof (sketch). For a continuous function f on the compact rectangle RDefine
F(x)=∫cdf(x,y)dy
Since f is continuous, F is continuous on [a,b]. For each partition P=(x0,…,xm) of [a,b]Define Riemann sums for the outer integral:
S(P)=∑i=1mF(xi∗)Δxi=∑i=1m∫cdf(xi∗,y)dyΔxi
By Fubini’s theorem for Riemann integrals (proven via uniform continuity of f on the compact set R), As ∥P∥→0 these sums converge to both ∬RfdA and ∫abF(x)dx. The Reversal of integration order follows by symmetry. ■
2.2 General Regions
For a general region D in R2:
Type I region: D=(x,y):a≤x≤b,g1(x)≤y≤g2(x)
∬DfdA=∫ab∫g1(x)g2(x)f(x,y)dydx
Type II region: D=(x,y):c≤y≤d,h1(y)≤x≤h2(y)
∬DfdA=∫cd∫h1(y)h2(y)f(x,y)dxdy
Problem. Evaluate ∬DxydA where D is the region bounded by y=x2 and y=x+2.
Solution
The curves intersect when x2=x+2I.e., x2−x−2=0So (x−2)(x+1)=0Giving x=−1 and x=2. As a Type I region, D=(x,y):−1≤x≤2,x2≤y≤x+2.
∬DxydA=∫−12∫x2x+2xydydx=∫−12x[2y2]x2x+2dx
=∫−122x[(x+2)2−x4]dx=21∫−12[x(x+2)2−x5]dx
=21∫−12[x3+4x2+4x−x5]dx
=21[4x4+34x3+2x2−6x6]−12
=21[(4+332+8−664)−(41−34+2−61)]
=21[336−129]=21[12−43]=845
■
Problem. Evaluate ∬DxdA where D is the region bounded by y=x, y=2xAnd x+y=2.
Solution
First, find the intersections. The lines y=x and y=2x intersect at (0,0). The line x+y=2 intersects y=x at (1,1) and y=2x at (2/3,4/3).
As a Type I region, we must split: for 0≤x≤2/3, x≤y≤2x; for 2/3≤x≤1, x≤y≤2−x.
∬DxdA=∫02/3∫x2xxdydx+∫2/31∫x2−xxdydx
=∫02/3x(x−x)dx...
Wait, this is getting messy. Let me use Type II instead. For each y, x ranges from y/2 to y (for 0≤y≤4/3) and from y/2 to 2−y (for 4/3≤y≤1). Actually, the simplest approach is to split D at y=4/3.
For 0≤y≤1: y/2≤x≤y (between y=x and y=2xBut only up to x+y=2). Actually y=2x gives x=y/2And y=x gives x=y. But x+y=2 gives x=2−y. For y≤1: both y≤2−y (since y≤1) and y/2≤ySo the right boundary is y. But we also need x+y≤2I.e., x≤2−y. For y≤1: y≤2−ySo the constraint x≤y is tighter.
Theorem 2.2 (Change of Variables). Let T:D⊆Rn→Rn be a C1 diffeomorphism with Jacobian determinant JT. Then
∫T(D)f(u)du=∫Df(T(x))∣JT(x)∣dx
Derivation of the Jacobian factor (for n=2). Let T(x,y)=(u(x,y),v(x,y)) be a C1 Diffeomorphism. Partition D into small rectangles Rij of area ΔxΔy. The image T(Rij) is approximately a parallelogram spanned by the vectors
a=T(x+Δx,y)−T(x,y)≈(∂x∂uΔx,∂x∂vΔx)
b=T(x,y+Δy)−T(x,y)≈(∂y∂uΔy,∂y∂vΔy)
The area of this parallelogram is ∣a×b∣Which equals
∂x∂u∂y∂v−∂y∂u∂x∂vΔxΔy=∣JT∣ΔxΔy
Summing over all subrectangles and taking the limit gives the change of variables formula. ■
Problem. Evaluate ∬De−(x2+y2)dA where D is the entire R2 plane.
Solution
Use polar coordinates. The region D′ is 0≤r<∞, 0≤θ≤2π.
∬De−(x2+y2)dA=∫02π∫0∞e−r2rdrdθ
The inner integral: ∫0∞re−r2dr=[−21e−r2]0∞=21.
=∫02π21dθ=π
■
Remark. This is the classic Gaussian integral computation, yielding ∫−∞∞e−x2dx=π.
Problem. Evaluate ∭EzdV where E is the solid bounded above by the sphere x2+y2+z2=2 and below by the paraboloid z=x2+y2.
Solution
The surfaces intersect when x2+y2+(x2+y2)2=2. Let r2=x2+y2. Then r2+r4=2I.e., (r2+2)(r2−1)=0So r=1 (positive root). Use Cylindrical coordinates. The region E′ is
Remark. This integral cannot be evaluated in the original order because ey2 has no elementary Antiderivative with respect to y. Swapping the order was essential.
2.7 Common Pitfalls
:::caution Common Pitfalls
Order of integration limits. When setting up ∫ab∫g1(x)g2(x)fdydxVerify that g1(x)≤g2(x) for all x∈[a,b]. If the region is described as “between two curves,” determine which curve is above the other.
Forgetting the Jacobian. In a change of variables, the Jacobian determinant ∣J∣ must be included. For polar coordinates, this factor is r; omitting it is one of the most common errors.
Spherical coordinate conventions. Different texts use different conventions for ϕ and θ. Here, ϕ∈[0,π] is the polar angle (from the positive z-axis) and θ∈[0,2π] is the azimuthal angle.
Region description. When swapping integration order, carefully redraw the region and re-derive the bounds. The new bounds may require splitting the integral into multiple pieces. :::
3. Vector Calculus
3.1 Vector Fields
A vector field on Rn is a function F:D⊆Rn→Rn.
A vector field F=(P,Q,R) on R3 is conservative if there exists a scalar Potential ϕ such that F=∇ϕ.
Theorem 3.1.F is conservative (on a connected domain) if and only if ∇×F=0.
Proof. (⇒) If F=∇ϕ with ϕ∈C2Then by Clairaut’s theorem fxy=fyxEtc., which directly gives ∇×(∇ϕ)=0.
(⇐) If ∇×F=0 on a connected domain DThen for any Closed curve C in DStokes’ theorem gives ∮CF⋅dr=∬S(∇×F)⋅dS=0. This means line integrals are path-independent, so we can define ϕ(x)=∫x0xF⋅dr (independent of path), And one verifies that ∇ϕ=F. ■
3.2 Line Integrals
Definition. The line integral of a vector field F along a curve C parameterised by r(t) for a≤t≤b is
∫CF⋅dr=∫abF(r(t))⋅r′(t)dt
Theorem 3.2 (Fundamental Theorem for Line Integrals). If F=∇ϕ and C is a Piecewise smooth curve from A to BThen
∫CF⋅dr=ϕ(B)−ϕ(A)
Proof. Parameterise C by r(t) for t∈[a,b] with r(a)=Ar(b)=B.
Corollary 3.3. The line integral of a conservative field around any closed curve is zero.
Problem. Evaluate ∫CF⋅dr where F=(y,x+ey,z+1) and C is the Curve r(t)=(t,t2,t3) for 0≤t≤1.
Solution
First check if F is conservative. Compute the curl:
(∇×F)x=∂y∂(z+1)−∂z∂(x+ey)=0−0=0
(∇×F)y=∂z∂y−∂x∂(z+1)=0−0=0
(∇×F)z=∂x∂(x+ey)−∂y∂y=1−1=0
Since ∇×F=0, F is conservative. Find ϕ:
∂x∂ϕ=y⟹ϕ=xy+g(y,z)
∂y∂ϕ=x+gy=x+ey⟹gy=ey⟹g=ey+h(z)
∂z∂ϕ=h′(z)=z+1⟹h(z)=2z2+z+C
ϕ(x,y,z)=xy+ey+2z2+z
Now apply the fundamental theorem:
∫CF⋅dr=ϕ(1,1,1)−ϕ(0,0,0)=(1+e+21+1)−(1+1)=e+21
■
3.3 Green’s Theorem
Theorem 3.4 (Green’s Theorem). Let C be a positively oriented, piecewise smooth, simple closed Curve bounding a region D. If P and Q have continuous partial derivatives on an open set Containing DThen
∮CPdx+Qdy=∬D(∂x∂Q−∂y∂P)dA
Proof (for a Type I region). Assume D is a Type I region: D=(x,y):a≤x≤b,g1(x)≤y≤g2(x). The boundary C consists of Four pieces: bottom C1Right C2Top C3And left C4.
We first prove ∮CPdx=−∬D∂y∂PdA.
On C1: y=g1(x), x goes from a to bSo ∫C1Pdx=∫abP(x,g1(x))dx.
On C3: y=g2(x), x goes from b to aSo ∫C3Pdx=∫baP(x,g2(x))dx=−∫abP(x,g2(x))dx.
On C2 and C4: x is constant, so dx=0Hence ∫C2Pdx=∫C4Pdx=0.
An identical argument (using Type II regions) proves ∮CQdy=∬D∂x∂QdA. Adding the two equalities gives the result. For general regions, decompose D into finitely many Type I and Type II regions and note that the line integrals along shared boundaries cancel. ■
Worked Example. Evaluate ∮C(x2−y)dx+(y2+x)dy where C is the unit circle Traversed counterclockwise.
Solution. By Green’s theorem with P=x2−y and Q=y2+x:
∂x∂Q=1,∂y∂P=−1
∮CPdx+Qdy=∬D(1−(−1))dA=2∬DdA=2⋅π⋅12=2π
■
3.4 Curl and Divergence
Definition. Let F=(P,Q,R) be a C1 vector field on R3.
The curl of F is
∇×F=(∂y∂R−∂z∂Q,∂z∂P−∂x∂R,∂x∂Q−∂y∂P)
The divergence of F is
∇⋅F=∂x∂P+∂y∂Q+∂z∂R
Physical interpretation. If F represents the velocity field of a fluid:
Curl∇×F measures the local rotational tendency (vorticity) of the fluid. At a point pThe component (∇×F)⋅n gives twice the angular velocity of a small paddle wheel placed at p with axis along n.
Divergence∇⋅F measures the net rate of outward flux per unit volume at a point. If ∇⋅F>0 at pThere is a net source at p; if ∇⋅F<0There is a net sink.
Proposition 3.5. For any C2 vector field F:
∇⋅(∇×F)=0(divofcurliszero)
∇×(∇ϕ)=0(curlofgradientiszero)
Proof. Both follow from Clairaut’s theorem on equality of mixed partials. For the first:
Each pair cancels by Clairaut: ∂x∂y∂2R=∂y∂x∂2REtc. ■
3.5 Stokes’ Theorem
Theorem 3.6 (Stokes’ Theorem). Let S be an oriented surface with piecewise smooth boundary curve C (positively oriented). If F has continuous partial derivatives on an open set containing SThen
∮CF⋅dr=∬S(∇×F)⋅dS
Where dS=ndS is the vector surface element with unit normal n.
Proof (sketch). Parametrise S by r(u,v) over a region D in the uv-plane. The boundary C of S corresponds to the boundary ∂D of D. The left-hand side becomes:
∮CF⋅dr=∮∂DF(r(u,v))⋅(∂u∂rdu+∂v∂rdv)
Define P~(u,v)=F(r(u,v))⋅ru and Q~(u,v)=F(r(u,v))⋅rv. Applying Green’s theorem in the uv-plane:
∮∂DP~du+Q~dv=∬D(∂u∂Q~−∂v∂P~)dudv
Expanding the partial derivatives and using the identity ru×rv=n∥ru×rv∥One Verifies that the integrand equals (∇×F)⋅n∥ru×rv∥ Which gives ∬S(∇×F)⋅dS. ■
Remark. Green’s theorem is the special case of Stokes’ theorem where S is a planar region in R2.
Problem. Use Stokes’ theorem to evaluate ∮CF⋅dr where F=(y2,xz,x2) and C is the triangle with vertices (1,0,0), (0,1,0)(0,0,1) traversed counterclockwise when viewed from above.
Solution
The triangle lies in the plane x+y+z=1. Compute ∇×F:
(∇×F)x=∂y∂(x2)−∂z∂(xz)=0−x=−x
(∇×F)y=∂z∂(y2)−∂x∂(x2)=0−2x=−2x
(∇×F)z=∂x∂(xz)−∂y∂(y2)=z−2y
So ∇×F=(−x,−2x,z−2y).
Parametrise the triangle in the xy-plane: 0≤x≤1, 0≤y≤1−x. On the plane z=1−x−yThe surface element dS=3dxdy.
Theorem 3.7 (Divergence Theorem / Gauss’s Theorem). Let E be a solid region bounded by a closed Surface S with outward normal n. If F has continuous partial derivatives on an Open set containing EThen
∬SF⋅dS=∭E∇⋅FdV
Where ∇⋅F=∂x∂P+∂y∂Q+∂z∂R Is the divergence of F.
Proof (sketch for a Type I region). Assume E is a Type I region: E=(x,y,z):(x,y)∈D,g1(x,y)≤z≤g2(x,y). The boundary consists of Bottom surface S1 (normal pointing downward), top surface S2 (normal pointing upward), And the lateral surface S3 (where the normal is horizontal).
We prove the result for the R-component, i.e., ∬SRk⋅dS=∭E∂z∂RdV.
On S2 (top): dS=(−g2x,−g2y,1)dA (upward), so Rk⋅dS=R(x,y,g2)dA.
On S1 (bottom): dS=(g1x,g1y,−1)dA (downward), so Rk⋅dS=−R(x,y,g1)dA.
On S3: k⋅n=0 (the normal is horizontal), so Rk⋅dS=0.
Therefore ∬SRk⋅dS=∬D[R(x,y,g2)−R(x,y,g1)]dAMatching the Volume integral. The P and Q components follow by an identical argument for Type II and Type III Regions. For general regions, decompose into finitely many regions of each type. ■
Worked Example. Compute the flux of F=(x3,y3,z3) through the unit sphere S.
Solution. By the divergence theorem:
∇⋅F=3x2+3y2+3z2=3(x2+y2+z2)=3ρ2
Using spherical coordinates:
∭E3ρ2⋅ρ2sinϕdρdϕdθ=3∫02π∫0π∫01ρ4sinϕdρdϕdθ
=3⋅2π⋅2⋅51=512π
■
Problem. Compute the flux of F=(x2,y2,z2) outward through the surface of the Cylinder x2+y2≤1, 0≤z≤2.
Solution
By the divergence theorem:
∇⋅F=2x+2y+2z
Use cylindrical coordinates. The region E′ is 0≤r≤1, 0≤θ≤2π0≤z≤2.
∭E(2x+2y+2z)dV=∭E2zdV
Since ∬ExdV=∬EydV=0 by symmetry (odd functions over a symmetric domain).
=2∫02π∫01∫02z⋅rdzdrdθ=2∫02π∫01r[2z2]02drdθ
=2∫02π∫012rdrdθ=2∫02π1dθ=2⋅2π=4π
■
3.7 Conservative Fields and Potential Functions
Definition. A vector field F on a domain D⊆Rn is conservative if There exists a scalar function ϕ:D→R (called a potential function) such that F=∇ϕ.
Proposition 3.8 (Equivalent conditions for conservative fields). Let F=(P,Q) be a C1 vector field on a connected domain D⊆R2. The following are equivalent:
F is conservative: F=∇ϕ for some ϕ.
∮CF⋅dr=0 for every closed curve C in D.
∫CF⋅dr is path-independent in D.
∂y∂P=∂x∂Q everywhere in D.
Procedure for finding a potential function. Given F=(P,Q,R) with ∇×F=0:
Integrate P with respect to x: ϕ=∫Pdx+g(y,z).
Differentiate with respect to y and set equal to Q to determine gy.
Integrate gy with respect to y: g=∫gydy+h(z).
Differentiate with respect to z and set equal to R to determine h′(z).
Integrate to find h(z) and assemble ϕ.
Problem. Determine whether F=(2xy+z2,x2+2yz,2xz+y2) is conservative, And if so, find a potential function.
Singularities. When applying Green’s, Stokes’, or the Divergence theorem, verify that the field has continuous partial derivatives on the region (including interior). If there are singularities inside the region, the theorems do not apply directly; the singularity must be handled separately.
** connected domains.** The condition ∇×F=0 guarantees that F is conservative only on a connected domain. For example, F=x2+y2(−y,x) has zero curl on R2∖(0,0) but is not conservative there (the domain is not connected).
Orientation. Green’s and Stokes’ theorems require positive orientation (counterclockwise for planar curves, right-hand rule for surfaces). The divergence theorem requires the outward normal. Reversing orientation changes the sign of the result. :::
3.9 Relationships Among the Fundamental Theorems
The three major integral theorems of vector calculus are deeply connected:
Remark. Green’s theorem is the planar special case of Stokes’ theorem. Stokes’ theorem relates the Circulation around a curve to the curl through the surface it bounds. The divergence theorem relates The flux through a closed surface to the divergence inside the volume it encloses. Together, these Form the higher-dimensional analogues of the Fundamental Theorem of Calculus:
∫abf′(x)dx=f(b)−f(a)(FTC)
∫C∇ϕ⋅dr=ϕ(B)−ϕ(A)(FTLI)
∮CF⋅dr=∬S(∇×F)⋅dS(Stokes)
∬SF⋅dS=∭E(∇⋅F)dV(Divergence)
In each case, the integral of a “derivative” over a region equals the integral of the original function Over the boundary of that region. This is the generalised Stokes’ theorem:
∫∂Ωω=∫Ωdω
Where Ω is a k-dimensional manifold with boundary ∂Ω, ω is a (k−1)-form, And dω is its exterior derivative.
4. Optimization
4.1 Local Extrema
Theorem 4.1 (First Derivative Test). If f has a local extremum at an interior point a And ∇f(a) exists, then ∇f(a)=0.
Points where ∇f=0 are called critical points (or stationary points).
Remark. Not all critical points are extrema. A critical point can be a local minimum, local maximum, Or saddle point. The second derivative test (Section 4.2) distinguishes these cases.
4.2 Second Derivative Test
Theorem 4.2 (Second Derivative Test). Let f have continuous second partial derivatives near a Critical point (a,b) with fx(a,b)=fy(a,b)=0. Let
D=fxx(a,b)fyy(a,b)−[fxy(a,b)]2
Be the Hessian determinant. Then:
If D>0 and fxx(a,b)>0: local minimum.
If D>0 and fxx(a,b)<0: local maximum.
If D<0: saddle point.
If D=0: the test is inconclusive.
Proof. By Taylor’s theorem to second order, for small h,k:
f(a+h,b+k)−f(a,b)=21[fxxh2+2fxyhk+fyyk2]+R2
Where the remainder R2=o(h2+k2) and all partials are evaluated at (a,b). The sign of the Right-hand side is determined by the quadratic form
Q(h,k)=fxxh2+2fxyhk+fyyk2=(hk)H(hk)
Where H=(fxxfxyfxyfyy) is the Hessian matrix.
By Sylvester’s criterion for 2×2 symmetric matrices:
If det(H)=D>0 and fxx>0Then H is positive definite, so Q>0 for all (h,k)=(0,0)Giving a local minimum.
If det(H)=D>0 and fxx<0Then H is negative definite, so Q<0 for all (h,k)=(0,0)Giving a local maximum.
If det(H)=D<0Then H is indefinite, so Q takes both positive and negative values, giving a saddle point.
When D=0The quadratic form is degenerate and the sign is determined by higher-order terms. ■
4.3 Lagrange Multipliers
Theorem 4.3 (Method of Lagrange Multipliers). To find the extrema of f(x,y,z) subject to the Constraint g(x,y,z)=0Solve the system:
∇f=λ∇g,g=0
More generally, for k constraints g1=0,…,gk=0:
∇f=λ1∇g1+⋯+λk∇gk
Proof (single constraint, geometric justification). Let M=(x,y,z):g(x,y,z)=0 be the constraint surface. If f has a local extremum on M at pThen the directional derivative Dvf(p)=0 for every tangent Vector v to M at p. Since ∇f(p)⋅v=0 for all Such vThe gradient ∇f(p) must be orthogonal to the tangent space of M At p. But the tangent space of M is orthogonal to ∇g(p) (by the implicit Function theorem). Therefore ∇f(p) must be parallel to ∇g(p)I.e., ∇f(p)=λ∇g(p) for some scalar λ. ■
4.4 Worked Example
Problem. Find the maximum of f(x,y)=xy subject to x2+y2=1.
Solution. Set g(x,y)=x2+y2−1. The Lagrange multiplier equations:
∇f=λ∇g⟹(y,x)=λ(2x,2y)
This gives y=2λx and x=2λy. Multiplying: xy=4λ2xy.
Case 1: xy=0. Then 4λ2=1So λ=±1/2.
λ=1/2: y=xAnd x2+x2=1So x=±1/2. Points: (1/2,1/2) and (−1/2,−1/2) with f=1/2.
λ=−1/2: y=−xAnd x2+x2=1So x=±1/2. Points: (1/2,−1/2) and (−1/2,1/2) with f=−1/2.
Case 2: xy=0. Then either x=0 or y=0. From the constraint: (0,±1) or (±1,0) with f=0.
Maximum: f=1/2 at (±1/2,±1/2). Minimum: f=−1/2 at (±1/2,∓1/2). ■
4.5 Additional Worked Examples
Problem. Find and classify all critical points of f(x,y)=x4+y4−4xy.
Solution
Compute the gradient:
∇f=(4x3−4y,4y3−4x)
Set ∇f=(0,0):
x3=y,y3=x
Substituting y=x3 into y3=x: (x3)3=xI.e., x9=xGiving x(x8−1)=0. So x=0 or x=±1.
x=0: y=0. Critical point: (0,0).
x=1: y=1. Critical point: (1,1).
x=−1: y=−1. Critical point: (−1,−1).
Second derivatives: fxx=12x2, fyy=12y2, fxy=−4.
At (0,0): D=0⋅0−16=−16<0. Saddle point.
At (1,1): D=12⋅12−16=144−16=128>0 and fxx=12>0. Local minimum with f(1,1)=1+1−4=−2.
At (−1,−1): D=12⋅12−16=128>0 and fxx=12>0. Local minimum with f(−1,−1)=1+1−4=−2. ■
Problem. Find and classify all critical points of f(x,y)=x3+y3−3xy.
Solution
Compute the gradient:
∇f=(3x2−3y,3y2−3x)
Set ∇f=(0,0):
3x2−3y=0⟹y=x2,3y2−3x=0⟹y2=x
Substituting: (x2)2=xSo x4−x=0Giving x(x3−1)=0So x=0 or x=1.
x=0: y=0. Critical point: (0,0).
x=1: y=1. Critical point: (1,1).
Second derivatives: fxx=6x, fyy=6y, fxy=−3.
At (0,0): D=fxxfyy−fxy2=0⋅0−9=−9<0. Saddle point.
At (1,1): D=6⋅6−9=27>0 and fxx=6>0. Local minimum with f(1,1)=−1. ■
Problem. Find the point on the plane x+2y+3z=6 closest to the origin.
Solution
Minimise f(x,y,z)=x2+y2+z2 subject to g(x,y,z)=x+2y+3z−6=0.
∇f=λ∇g:
(2x,2y,2z)=λ(1,2,3)
This gives x=λ/2, y=λ, z=3λ/2. Substituting into the constraint:
2λ+2λ+29λ=6⟹2λ+4λ+9λ=6⟹7λ=6⟹λ=76
Therefore x=3/7, y=6/7, z=9/7. The closest point is (3/7,6/7,9/7) with Distance 9/49+36/49+81/49=126/49=7314. ■
4.6 Multiple Constraints
Problem. Maximise f(x,y,z)=xyz subject to x+y+z=1 and x2+y2+z2=1/3.
Solution
Set g1=x+y+z−1 and g2=x2+y2+z2−1/3. The Lagrange multiplier system is:
∇f=λ1∇g1+λ2∇g2
(yz,xz,xy)=λ1(1,1,1)+λ2(2x,2y,2z)
This gives three equations:
yz=λ1+2λ2x,xz=λ1+2λ2y,xy=λ1+2λ2z
Subtracting the first two: z(y−x)=2λ2(x−y)Giving (y−x)(z+2λ2)=0.
Similarly, (z−y)(x+2λ2)=0 and (x−z)(y+2λ2)=0.
If x=y=z: From g1: 3x=1So x=1/3. From g2: 3(1/9)=1/3. This satisfies both constraints.
At (1/3,1/3,1/3): f=1/27.
If x=y: Then z+2λ2=0. If also y=z: x+2λ2=0So x=z.
With x=z: from x+y+z=1: 2x+y=1. From 2x2+y2=1/3: Substituting y=1−2x: 6x2−4x+2/3=0I.e., (3x−1)2=0So x=1/3y=1/3. This reduces to the symmetric case.
Therefore the only critical point is (1/3,1/3,1/3)Which gives f=1/27.
Since the constraint set is compact (intersection of a plane and a sphere in R3), the Extreme value theorem guarantees both a maximum and minimum exist. The maximum of xyz is 1/27 at (1/3,1/3,1/3). ■
4.7 Common Pitfalls
:::caution Common Pitfalls
Lagrange multipliers find candidates only. The method produces candidates for constrained extrema but does not guarantee they are extrema. Always evaluate f at all candidates and use additional reasoning (e.g., compactness of the constraint set via the extreme value theorem) to determine which gives the max/min.
Boundary vs. Interior. For unconstrained problems on a closed, bounded domain, check both interior critical points and boundary points separately.
Degenerate Hessian. When the Hessian determinant D=0The second derivative test is inconclusive. Use higher-order Taylor expansions or direct analysis of the function near the critical point.
Non-normalised constraint gradients. Ensure the constraint functions are written in the form g=0; multiplying g by a constant changes λ but not the critical points. :::
5. Curves and Surfaces
5.1 Parametric Curves
A parametric curve in R3 is a C1 function r:[a,b]→R3 Written r(t)=(x(t),y(t),z(t)).
Definition. The arc length of r over [a,b] is
L=∫ab∥r′(t)∥dt=∫ab(dtdx)2+(dtdy)2+(dtdz)2dt
Proposition 5.1. The arc length function s(t)=∫at∥r′(τ)∥dτ Satisfies dtds=∥r′(t)∥And reparametrising by arc length gives a Unit-speed curve: ∥dsdr∥=1.
Proof. By the Fundamental Theorem of Calculus, dtds=∥r′(t)∥. If we reparametrise by sI.e., write r(s)=r(t(s))Then by the chain rule dsdr=r′(t)⋅dsdtSo ∥dsdr∥=∥r′(t)∥⋅dsdt=1. ■
Problem. Find the arc length of the curve r(t)=(etcost,etsint,et) for 0≤t≤ln2.
Problem. Find the arc length of the helix r(t)=(cost,sint,t) for 0≤t≤4π.
Solution
r′(t)=(−sint,cost,1)So ∥r′(t)∥=sin2t+cos2t+1=2.
L=∫04π2dt=42π
■
5.2 Curvature and Torsion
Definition. Let r(s) be a unit-speed curve (∥r′(s)∥=1). Define:
Unit tangent vector:T(s)=r′(s)
Curvature:κ(s)=∥T′(s)∥=∥r′′(s)∥
Principal normal:N(s)=∥T′(s)∥T′(s) (when κ=0)
Binormal:B(s)=T(s)×N(s)
Torsion:τ(s)=−B′(s)⋅N(s)
The vectors T, N, B form the Frenet—Serret frame, an orthonormal Basis that moves with the curve.
Theorem 5.2 (Frenet—Serret Formulas).
T′=κN,N′=−κT+τB,B′=−τN
Proof. Since T is a unit vector, T⋅T=1So T′⋅T=0. Therefore T′ is orthogonal to TSo T′ is parallel to N (when κ=0). This gives T′=κN.
Similarly, B=T×N is a unit vector, so B′⋅B=0. Also B⋅T=0So B′⋅T+B⋅T′=0 Giving B′⋅T=−B⋅κN=0. So B′ is Parallel to NGiving B′=−τN.
For N′: since {T,N,B} is an orthonormal basis, N′=(N′⋅T)T+(N′⋅N)N+(N′⋅B)B. From N⋅T=0: N′⋅T=−N⋅T′=−κ. From N⋅N=1: N′⋅N=0. From N⋅B=0: N′⋅B=−N⋅B′=τ. This gives N′=−κT+τB. ■
Intuition. The curvature κ measures how sharply the curve bends (deviation from a straight line). The torsion τ measures how sharply the curve twists out of the osculating plane (deviation from a Plane curve). A curve lies in a plane if and only if τ=0 everywhere.
For a curve parameterised by an arbitrary parameter t (not necessarily unit-speed):
κ=∥r′(t)∥3∥r′(t)×r′′(t)∥
τ=∥r′(t)×r′′(t)∥2[r′(t)×r′′(t)]⋅r′′′(t)
Problem. Find the curvature and torsion of the helix r(t)=(acost,asint,bt) where a,b>0.
For the graph z=f(x,y)The normal is n=1+fx2+fy2(−fx,−fy,1).
5.4 Surface Area
Definition. The area of a parametric surface r:D→R3 is
A(S)=∬D∥ru×rv∥dudv
Derivation. Partition D into small rectangles Dij of area ΔuΔv. The image r(Dij) is approximately a parallelogram spanned by ruΔu and rvΔvWith area ∥ru×rv∥ΔuΔv. Summing and taking the limit gives the formula. ■
Problem. Find the surface area of the part of the paraboloid z=x2+y2 that lies below The plane z=4.
Solution
Parametrise by r(x,y)=(x,y,x2+y2) where x2+y2≤4.
rx=(1,0,2x), ry=(0,1,2y).
rx×ry=i10j01k2x2y=(−2x,−2y,1)
∥rx×ry∥=4x2+4y2+1
A=∬x2+y2≤44x2+4y2+1dxdy
Use polar coordinates: x=rcosθ, y=rsinθ, 0≤r≤2, 0≤θ≤2π.
A=∫02π∫024r2+1rdrdθ
Let u=4r2+1, du=8rdr:
=2π⋅81∫117udu=4π[32u3/2]117=6π(173/2−1)
■
5.5 Surface Integrals
Definition (Scalar surface integral). The integral of a scalar function f over a parametric Surface S is
∬SfdS=∬Df(r(u,v))∥ru×rv∥dudv
Definition (Vector surface integral / flux). The flux of a vector field F through an Oriented surface S is
∬SF⋅dS=∬DF(r(u,v))⋅(ru×rv)dudv
Where the orientation is determined by the choice of normal ru×rv vs. rv×ru.
Problem. Evaluate ∬SF⋅dS where F=(x,y,z2) and S is the hemisphere x2+y2+z2=4, z≥0With Upward orientation.
Solution
Use the divergence theorem on the closed hemisphere plus the disk at z=0. Let E be the solid hemisphere. Then:
∬closedSF⋅dS=∭E∇⋅FdV=∭E(1+1+2z)dV
=2V+2∭EzdV
Where V=21⋅34π(23)=316π.
By symmetry, the centroid of a hemisphere of radius R=2 is at z=3R/8=3/4So
∭EzdV=zˉ⋅V=43⋅316π=4π
=2⋅316π+2⋅4π=332π+8π=356π
The flux through the disk z=0, x2+y2≤4 (with downward normal −k): ∬diskF⋅(−k)dS=∬disk0dS=0.
So the flux through the hemisphere alone is 356π. ■
Problem. Evaluate ∬SzdS where S is the part of the plane 2x+2y+z=4 in the First octant.
Solution
Parametrise the surface. Solve for z=4−2x−2y where x≥0, y≥0, z≥0 I.e., 2x+2y≤4 or x+y≤2.
Parameterisation domain. Always verify that the parameterisation covers the entire surface and that the map is one-to-one (except possibly on the boundary).
Normal orientation. The cross product ru×rv determines the orientation. Swapping the order changes the sign of the flux integral.
Surface area vs. Flux. Surface area uses ∥ru×rv∥ (scalar), while flux uses ru×rv (vector, oriented).
6. Problem Set
Problem 1
Compute ∇f for f(x,y,z)=ln(x2+y2)+exz and evaluate at (1,0,0).
Solution
fx=x2+y22x+zexz, fy=x2+y22y, fz=xexz.
At (1,0,0): fx=2+0=2, fy=0, fz=1.
∇f(1,0,0)=(2,0,1).
If you get this wrong, revise: Section 1.4 The Gradient.
Problem 2
Let f(x,y)=x3−3xy2+y3. Find all critical points and classify them using the second Derivative test.
Solution
fx=3x2−3y2=0 and fy=−6xy+3y2=3y(−2x+y)=0.
From fx=0: x2=y2So y=±x.
If y=x: fy=3x(−2x+x)=−3x2=0So x=0. Point: (0,0).
If y=−x: fy=3(−x)(2x+x)=−9x2=0So x=0. Point: (0,0).
The only critical point is (0,0). Now fxx=6x, fyy=−6x+6y, fxy=−6y.
At (0,0): D=0⋅0−0=0. The second derivative test is inconclusive.
To classify, note f(x,y)=x3−3xy2+y3. Along y=0: f(x,0)=x3Which changes sign At 0. Along x=y: f(x,x)=−x3Which also changes sign but with opposite sign. Since the behaviour differs by direction, (0,0) is a saddle point.
If you get this wrong, revise: Section 4.2 Second Derivative Test.
Problem 3
Find the directional derivative of f(x,y)=excosy at (0,π/2) in the direction v=(1,1).
Solution
Normalise: ∥v∥=2So u=(1/2,1/2).
fx=excosy, fy=−exsiny.
∇f(0,π/2)=(e0cos(π/2),−e0sin(π/2))=(0,−1).
Duf=(0,−1)⋅(1/2,1/2)=−21
If you get this wrong, revise: Section 1.5 Directional Derivatives.
Problem 4
If x2z+y2z2=5Find ∂x∂z at (1,1,1).
Solution
Let F(x,y,z)=x2z+y2z2−5. Then Fx=2xz, Fy=2yz2, Fz=x2+2y2z.
At (1,1,1): Fx=2, Fz=1+2=3.
∂x∂z=−FzFx=−32
If you get this wrong, revise: Section 1.9 Implicit Differentiation.
Problem 5
Write the second-order Taylor expansion of f(x,y)=sin(x+y) at (0,0).