UNIVERSITY OF TORONTO
Faculty of Arts & Science
MAT237 Multivariable Calculus with Proofs
Term Test 2 solutions
B. Abuelnasr, M. Khaqan, and A. Zaman
Friday January 12, 2024
Duration: 110 minutes
NO AIDS PERMITTED
How could I have prepared for this test?
As written in the Term Test 2 instructions, we suggested you complete all lecture worksheets including additional
exercises, review the problem sets, review the readings, and memorize definitions. Please read these comments
carefully and the detailed remarks in correspond solutions. Use them to reflect on the feedback from your test.
Q1) (1a) was similar to C6.2 and WW4 Q1.
(1b) was a routine computation, similar to WW4 Q4 and many problems from D1.
(1c) was similar to D4 additional problem 4.6.2.
(1d) was inspired by D3 additional problem 4.4.13.
(1e) was a standard computation, similar to D4.4, D4.5, and PS3 Q3.
Q2) (2a) was similar to D5.2.
(2b) was almost identical to E1.3.
(2c) was similar to E4.1 and many others.
(2d) was similar to E3.4, E3.5, and many others.
(2e) was almost identical to E6 additional exercise 5.6.3.
Q3) (3a) was similar to E2.3(b) and E2 additional exercises 5.25 and 5.2.8.
(3b) was identical to E3.7(b).
(3c) was inspired by E5.6 and WW5 Q10.
(3d) was similar to E5.7.
Q4) This was a standard optimization problem similar to many others from D3 or E7.
Q5) (5a) was similar to E7.2 as well as D3.4 and D3.5.
(5b) was similar to F1.3 and F1 additional exercise 6.1.3.
(5c) was a routine computation, similar to F2.2 and F2.3.
(5d) was similar to F2.1(d).
Q6) (6a) was similar to F3.1(e) and F3.2
(6b) was similar to F3.2.
(6c) was inspired by F3.2 and similar to F4.
(6d) was similar to F4.1(a).
Q7) This was similar to F3.7 and F3 additional exercise 6.3.6(b).
Do not tear this page off. This page is a formula sheet and will not be graded under any
circumstances. It can be used for rough work only.
Inverse function theorem. Let A, B ⊆ Rn be open sets. Fix a ∈ A. Let F : A→ B be a C1 map. The map F is a local
diffeomorphism at a if and only if the Jacobian DF(a) is an invertible matrix. If so, there exists an open set U ⊆ A
containing a such that F |U : U → F(U) is a diffeomorphism and the inverse map G = (F |U)−1 : F(U)→ U satisfies
DG(y) =
DF(x)
−1
for all x ∈ U and y = F(x).
Implicit function theorem. Let U ⊆ Rn ×Rk be an open set and let F : U → Rk be a C1 map. Let (a, b) ∈ U so
a ∈ Rn, b ∈ Rk. If F(a, b) = 0 and the k× k matrix
∂ F
∂ y
(a, b) =
∂ (F1, . . . , Fk)
∂ (y1, . . . , yk)
(a, b) :=
∂ Fi
∂ y j
(a, b)
i, j
is invertible, then the nonlinear system of equations F(x , y) = 0 locally defines y = (y1, . . . , yk) as a C1 function of
x = (x1, . . . , xn) near (a, b).
In particular, there exists an open set V ⊆ Rn containing a, an open set W ⊆ Rk containing b, a C1 functionφ : V →W
such that V ×W ⊆ U and for all (x , y) ∈ V ×W,
F(x , y) = 0 ⇐⇒ y = φ(x)
Moreover,
Dφ(v) = −
∂ F
∂ y
(v, w)
−1 ∂ F
∂ x
(v, w) for v ∈ V and w = φ(v),
where
∂ F
∂ x
(v, w) =
∂ (F1, . . . , Fk)
∂ (x1, . . . , xn)
(v, w) :=
∂ Fi
∂ x j
(v, w)
i, j
is a k× n matrix.
d
d x
(xa) = axa−1 d
d x
(ax) = ax ln a
d
d x
ln x =
1
x
d
d x
sin x = cos x
d
d x
cos x = − sin x d
d x
tan x = sec2 x
d
d x
sec x = sec x tan x
d
d x
arcsin x =
1p
1− x2
d
d x
arccos x =
−1p
1− x2
d
d x
arctan x =
1
1+ x2
cos 2θ = cos2 θ − sin2 θ = 2 cos2 θ − 1 = 1− 2 sin2 θ sin2θ = 2 sinθ cosθ tan 2θ = 2 tanθ
1− tan2 θ
cos2 θ =
1+ cos2θ
2
sin2 θ =
1− cos 2θ
2
tan2 θ =
1− cos 2θ
1+ cos 2θ
1
1− x =
∞∑
n=0
xn ex =
∞∑
n=0
xn
n!
log(1− x) =
∞∑
n=1
xn
n
sin x =
∞∑
n=0
(−1)n x2n+1
(2n+ 1)!
cos x =
∞∑
n=0
(−1)n x2n
(2n)!
det
a b
c d
= ad − bc det
a11 a12 a13a21 a22 a23
a31 a32 a33
= a11 deta22 a23a32 a33
− a21
a12 a13
a32 a33
+ a31
a12 a13
a22 a23
a · b = aT b = a1 b1+ · · ·+an bn = ||a||||b|| cosθ a× b = (a2 b3−a3 b2, a3 b1−a1 b3, a1 b2−a2 b1) e1× e2 = e3
|a · b| ≤ ||a||||b|| ||a + b|| ≤ ||a||+ ||b|| (AB)T = BT AT (AB)−1 = B−1A−1
(x , y, z) = (r cosθ , r sinθ , z) = (ρ cosθ sinφ,ρ sinθ sinφ,ρ cosφ)
MAT237 Term Test 2 solutions - Page 2 of 12 January 12, 2024
1. (5 points) The parts of this question are unrelated. No justification is necessary for any part.
(1a) Layla claims that if all directional derivatives of f : Rn → Rm exist everywhere, then the function is
continuous everywhere. She gives the following argument.
1. If all directional derivatives of f exist everywhere, then the partials of f exist everywhere.
2. If the partials of f exist everywhere, then f is differentiable everywhere.
3. This implies that f is continuous everywhere as every differentiable function is continuous.
Is there an error in Layla’s argument? If so, identify the corresponding line. Fill in EXACTLY ONE circle.
Line 1 Line 2 Line 3 The argument is essentially correct.
(1b) Let f : R2→ R be differentiable. Write u = f (x , y) and
(x , y) = (r cosθ , r sinθ )
Using Leibniz notation and chain rule express
∂ u
∂ r
in terms of
∂ u
∂ x
,
∂ u
∂ y
, r, and θ .
∂ u
∂ r
=
∂ u
∂ x
cos(θ ) +
∂ u
∂ y
sin(θ )
(1c) At which points A, B, C , D ∈ R2 is the given curve a 1-dimensional smooth manifold in R2?
Fill in ALL boxes that apply. If none apply, leave them blank.
A B C D
A
B C
D
(1d) Let f : Rn→ R be a C1 map. Which statement is FALSE? Fill in EXACTLY ONE circle.
If f has a minimum, then f has a critical point.
If f has a unique minimum, then f has exactly one critical point.
If f (x)→∞ as ||x || →∞, then f has a critical point.
If f (x)→∞ as ||x || →∞ and f has exactly one critical point, then f has a unique minimum.
None of the above are false.
(1e) Define S = {(x , y, z) ∈ R3 : x = y2 + z2}. Fix p = (5,2, 1). Which of the following are equal to the
tangent space of S at p? Fill in EXACTLY ONE circle.
TpS = R2
TpS = span{(0,1, 0), (0, 0,1)}
TpS = span{(1,4, 2), (5, 2,1)}
TpS = span{(4,1, 0), (2, 0,1)}
TpS = span{(1,4, 0), (1, 0,2)}
MAT237 Term Test 2 solutions - Page 3 of 12 January 12, 2024
2. (5 points) The parts of this question are unrelated. No justification is necessary for any part.
For each part below, fill in ALL boxes that apply. If none apply, leave them blank.
(2a) You want to prove that the set
S = {(x , y) ∈ R2 : x2 − 4y2 = 0}
is a smooth 1-dimensional manifold at (−2, 1). This requires you to show that S∩U is a graph for some
open set U ⊆ R2. Which choice(s) of set U can lead to a successful proof?
U = R2 U = (0,∞)2 U = R× (0,∞) U = (−∞, 0)× (0,∞)
(2b) Consider the function F : R→ R given by F(x) = sin x . Fix points a, b, c ∈ R as illustrated below.
x
y
a
b
c
At which points a, b, c ∈ R is F a local diffeomorphism? a b c
(2c) Define F : R3→ R by F(x , y, z) = x yz−6z for (x , y, z) ∈ R3. At which points does the implicit function
theorem show that the equation F(x , y, z) = 0 locally defines x as a C1 function of (y, z)?
a = (3,0, 0) b = (0,2, 1) c = (3,2, 1)
(2d) You want to prove that x2 − 4y2 = 0 locally defines x as a C1 function φ of y near (−2, 1).
Which choice of function φ can lead to a successful proof by definition?
φ : R→ R given by φ(y) = 2|y|
φ : (0,∞)→ (0,∞) given by φ(y) = 2y
φ : (0,∞)→ (−∞, 0) given by φ(y) = −2y
φ : (−∞, 0)→ (0,∞) given by φ(y) = −2y
(2e) Let g : R2 → R and f : R2 → R be C1. Define C = {x ∈ R2 : g(x) = 0}. Assume ∇g(x) 6= 0 for all
x ∈ C . Fix points P,Q, R, S belonging to the set C ⊆ R2.
Which points x ∈ R2 satisfy the system of equations given by
∇ f (x) = λ∇g(x), g(x) = 0
for some λ ∈ R?
x = P x = Q x = R x = S
MAT237 Term Test 2 solutions - Page 4 of 12 January 12, 2024
3. (4 points) The parts of this question are unrelated. No justification is necessary for any part.
For (3b), (3c), and (3d), fill in EXACTLY ONE circle.
(3a) Define F : R× (0,2pi)→ R2 by
F(x , y) = (ex cos y, ex sin y).
The map F is a diffeomorphism with inverse map G. Compute the Jacobian DG(F(1,pi)).
DG(F(1,pi)) =
−e−1 0
0 −e−1
(3b) Belal argues that x2 − y3 = 0 does not locally define y as a C1 function of x near (0,0).
1. Suppose for a contradiction that there exists a C1 function φ : R→ R such that
{(x , y) ∈ R2 : x2 − y3 = 0}= {(x ,φ(x)) : x ∈ R}.
2. This implies for x ∈ R that x2 − [φ(x)]3 = 0 so [φ(x)]3 = x2.
3. Then φ(x) = x2/3 but φ is not differentiable at 0.
4. Thus, φ is not C1, a contradiction.
Is there an error in Belal’s argument? If so, identify the corresponding line.
Line 1 Line 2 Line 3 Line 4 The argument is essentially correct.
(3c) Let F : R5→ R3 be a C1 map with components F = (F1, F2, F3). Assume the set
S = {x ∈ R5 : F(x) = 0}
is non-empty. Fix p ∈ S. Which condition IMPLIES that S is a 3-dimensional smooth manifold at p?
The Jacobian DF(p) has rank 3.
The differential dFp is surjective.
The set {∇F1(p),∇F2(p),∇F3(p)} is linearly independent.
The set {∂1F(p),∂2F(p),∂3F(p)} is linearly independent.
None of the above.
(3d) Fix p = (1,2, 3,4). Let F : R4→ R2 be a C1 map such that F(p) = (0,0). You compute
DF(p) =
1 −1 0 6
2 1 −3 9
and rref(DF(p)) =
1 0 −1 5
0 1 −1 −1
.
Define S = {(w, x , y, z) ∈ R4 : F(w, x , y, z) = (0, 0)}. Which set is equal to the tangent plane of S at p?
{(1,−1,0, 6) + (1,2, 3,4), (2,1,−3,9) + (1,2, 3,4)}
{s(1, 0,−1, 5) + t(0, 1,−1,−1) : s, t ∈ R}
{s(1, 0,−1, 5) + t(0, 1,−1,−1) + (1, 2,3, 4) : s, t ∈ R}
{(w, x , y, z) ∈ R4 : w+ 2x + 3y + 4z = 0}
{(w, x , y, z) ∈ R4 : w− y + 5z = 0 and x − y − z = 0}
{(w, x , y, z) ∈ R4 : w− y + 5z = 18 and x − y − z = −5}
MAT237 Term Test 2 solutions - Page 5 of 12 January 12, 2024
4. (5 points) Use multivariable calculus methods to minimize the function f : R2 → R given by f (x , y) = x y
subject to the constraint that x2 + 2y2 ≤ 8. Remember to justify your calculations.
• Define S = {(x , y) ∈ R2 : x2 + 2y2 ≤ 8}; we want to minimize f over S.
• First, note that S is compact and f is continuous, so f has a minimum over S by the extreme value theorem
(Theorem 2.8.7).
Step 1: Search for possible minima in the interior of S.
•
Since f is C1 on So = {(x , y) ∈ R2 : x2 + 2y2 < 8}, if f has a
minimum at a point (x0, y0) ∈ So, then∇ f (x0, y0) = 0 by the local
extreme value theorem (Theorem 4.3.6).
• Since ∇ f (x0, y0) = (y0, x0), we see that the only solution to this equation is at (x0, y0) = (0, 0) ∈ So. This
is our only candidate for a minimum in So.
Step 2: Search for possible minima on the boundary of S.
• Define g : R2→ R by g(x , y) = x2 + 2y2. Then g is C1, and ∂ S = {(x , y) ∈ R2 : g(x , y) = 8}.
• Since∇g(x , y) = (2x , 4y) vanishes only when (x , y) = (0,0), we see that∇g(x , y) 6= 0 for all (x , y) ∈ ∂ S.
• By Lagrange’s method (Theorem 5.6.8), if f has a minimum at a point (x0, y0) ∈ ∂ S, then there exists
λ ∈ R such that ∇ f (x0, y0) = λ∇g(x0, y0).
• Suppose (x0, y0) is a solution to Lagrange’s system
y0 = 2λx0,
x0 = 4λy0,
x20 + 2y
2
0 = 8.
Then from the first two equations, we see that x0 = 0 if and only if y0 = 0; since (0,0) 6∈ ∂ S, we deduce
that x0 6= 0 and y0 6= 0.
• We can therefore manipulate the first two equations to obtain
x0
y0
= 4λ= 2(2λ) = 2
y0
x0
,
so x20 = 2y
2
0 .
• Substituting this into the constraint equation yields 8 = x20 + 2y
2
0 = 2x
2
0 , so x0 = ±2 and y0 = ±
p
2. We
thus obtain four candidates for a minimum on ∂ S:
(2,
p
2), (2,−p2), (−2,p2), (−2,−p2).
Step 3: Compare candidates and conclude.
• Evaluating f at each of the five candidate extrema, we have
f (0, 0) = 0, f (2,
p
2) = 2
p
2, f (2,−p2) = −2p2, f (−2,p2) = −2p2, f (−2,−p2) = 2p2.
• We see that the minimum value of f over S is −2p2, which is achieved at the boundary points (2,−p2)
and (−2,p2).
Remark: Instead of using Lagrange’s method in Step 2, one can alternatively directly parametrize ∂ S. This
can be approached as follows: define γ: [0,2pi]→ R2 by γ(t) = (2p2cos t, 2 sin t). Then γ([0, 2pi]) = ∂ S, and
( f ◦γ)(t) = 4p2cos(t) sin(t) = 2p2 sin(2t). Thus ( f ◦γ)′(t) = 4p2 cos(2t), so the solutions to ( f ◦γ)′(t) = 0
for t ∈ [0, 2pi] are given by t = pi4 , 3pi4 , 5pi4 , 7pi4 . Evaluating γ at these values of t yields the same four candidate
points as above—however, with this method, you must additionally check the point γ(0) = γ(2pi) = (2
p
2,0).
MAT237 Term Test 2 solutions - Page 6 of 12 January 12, 2024
5. (5 points) The parts of this question are unrelated. No justification is necessary for any part.
For (5a), (5b), and (5d), fill in EXACTLY ONE circle.
(5a) Maryam wants to maximize a C1 map f : R2→ R subject to the constraint x2 + y2 = 25 with x , y ≥ 0.
She writes down the following argument in her notebook.
1. Define S = {(x , y) ∈ R2 : x2 + y2 = 25, x ≥ 0, y ≥ 0} and g(x , y) = x2 + y2.
2. I have computed that ∇ f (x , y) = (0,0) if and only if (x , y) = (2,1).
3. I have set up the system of equations
∇ f (x , y) = λ∇g(x , y), g(x , y) = 25
4. I have computed that the solutions are (x , y,λ) = (4,3, 2), (3, 4,−5) and (3,−4,−7)
5. I have calculated that f (4,3) = 111, f (3,4) = 222, f (3,−4) = 333, and f (2, 1) = 444.
Assume all of Maryam’s calculations are correct. What can she deduce from these calculations?
The maximum of f on S is 444.
The maximum of f on S is 333.
The maximum of f on S is 222.
The maximum of f on S is 111.
The maximum of f on S exists, but we cannot determine it with the given information.
(5b) Let φ : R2→ R be a C2 function. Below is a plot of its gradient vector field ∇φ.
Determine the sign of each quantity.
φx x(0,0) positive zero negative
φy y(0, 0) positive zero negative
φy x(0,0) positive zero negative
φx y(0,0) positive zero negative
(5c) Define g(x , y, z) = x2 y3z + x3 y2z + x y2z3 + x3 y2z2 + y sin(xz). Compute the following quantity.
∂ (3,2,1)g(x , y, z) = 12+ 24z
(5d) Let f : R3→ R be C∞. Which statement is TRUE?
∂ (1,2) f = ∂1∂ 22 f
∂ (1,2) f = ∂ (2,1) f
∂ (1,2,3) f = ∂1∂2∂3 f
∂ (1,2,3) f = ∂3∂2∂1 f
∂ (1,2,3) f = ∂ (3,2,1) f
∂ (1,2,3) f = ∂3∂2∂3∂1∂3∂2 f
MAT237 Term Test 2 solutions - Page 7 of 12 January 12, 2024
6. (5 points) The parts of this question are unrelated. No justification is necessary for any part.
(6a) Let f : R2→ R be C∞. You have computed the function, its gradient, and its Hessian at (0, 0).
f (0, 0) = 7, ∇ f (0,0) = (9,5), H f (0,0) =
4 1
1 6
Give an explicit formula for the 2nd Taylor polynomial of f at (0,0).
P(x , y) = 7+ 9x + 5y + 2x2 + x y + 3y2
(6b) Let g : R3→ R be C∞. You have confirmed that
lim
(x ,y,z)→(0,0,0)
g(x , y, z)− 9− 8x + 7x y − 6y2z − 5x2 yz − 4z3
||(x , y, z)||3 = 0
If possible, estimate g(0.1,−0.1,0.2) using the 2nd Taylor polynomial of g. Otherwise, write "N/A".
g(0.1,−0.1,0.2)≈ 9.87
If possible, compute the following quantities. If it is not possible, write "N/A".
∂ (0,2,1)g(0, 0,0) = 12 ∂ (2,1,1)g(0, 0,0) = N/A
(6c) Let f : R3→ R be C∞. Assume that its 3rd Taylor polynomial at (0, 0,0) is given by
P(x , y, z) = 4− x2 − 2y2 − 3z2 + x yz.
Which statement is necessarily TRUE? Fill in EXACTLY ONE circle.
f has a local maximum at (0, 0,0).
f has a local minimum at (0, 0,0).
f has a saddle point at (0, 0,0).
None of the above are necessarily true.
(6d) Let f : R3→ R. You have computed ∇ f (2,3, 7) = (0,0, 0) and det H f (2,3, 7) = 0.
What can you necessarily conclude about f at (2,3, 7)? Fill in EXACTLY ONE circle.
By the second derivative test, f has a local extremum at (2,3, 7).
By the second derivative test, f has a saddle point at (2,3, 7).
The second derivative test is inconclusive for f at (2,3, 7).
We need more information to decide whether or not the second derivative test is conclu-
sive.
None of the above.
MAT237 Term Test 2 solutions - Page 8 of 12 January 12, 2024
7. (5 points) Let f (x , y) = cos(x y2) which is C∞. Let P(x , y) be the 6th Taylor polynomial of f at (0, 0).
Use single variable Taylor’s theorem for g(t) = cos(t) to prove that
P(x , y) = 1− x2 y4
2
.
• Since P is clearly a polynomial with degree ≤ 6, by (multi-variable) Taylor’s Theorem, we need only to
check that
lim
(x ,y)→(0,0)
1− 12 x2 y4 − cos(x y2)
‖(x , y)‖6 = 0.
• Moreover, recall from single-variable calculus that the second Taylor polynomial of g(t) = cos(t) at 0 is
given by 1− t22 .
• Thus, by single variable Taylor’s Theorem,
lim
t→0
1− 12 t2 − cos(t)
t2
= 0.
• In other words, there exists a function R defined on an open interval I with 0 ∈ I ⊆ R such that cos(t) =
1− 12 t2 + R(t) and
lim
t→0
R(t)
t2
= 0.
• Define h : I → R by h(t) = R(t)t2 for t 6= 0 and h(0) = 0, so that h is continuous on I by the preceding
line. Moreover, define s : R2 → R by s(x , y) = x y2, and notice that, as a polynomial, s is continuous
everywhere.
• Thus, by Theorem 2.6.21, h ◦ s is continuous at (0,0), so that lim
(x ,y)→(0,0)h(s(x , y)) = h(s(0,0)) = h(0) = 0.
• By single variable Taylor’s Theorem, if ‖(x , y)‖ is sufficiently small, then we may write cos(x y2) = 1 −
1
2 x
2 y4 + R(x y2). Hence, we find that
lim
(x ,y)→(0,0)
1− 12 x y2 − cos(x y2)
‖(x , y)‖6 = lim(x ,y)→(0,0)
R(x y2)
‖(x , y)‖6 = lim(x ,y)→(0,0)h(s(x , y)) ·
x2 y4
‖(x , y)‖6 . (1)
• Notice that
x2 y4‖(x ,y)‖6 ≤ 1 as |x | ≤ ||(x , y)|| and |y| ≤ ||(x , y)||4.
• Thus, after applying the squeeze theorem, we conclude that
lim
(x ,y)→(0,0)
R(x y2)
‖(x , y)‖6 = lim(x ,y)→(0,0)h(s(x , y)) = 0,
as desired.
Remark: There is an alternative proof which is based on the fact that 1− t22 is also the third Taylor polynomial
of cos(x y2). In particular, for this proof, we would define the remainder function R so that limt→0 R(t)t3 = 0, then
extend it to 0 by defining h(t) = R(t)t3 for t 6= 0 and h(0) = 0. After doing so, we can use the limit product law
to rewrite Equation (1) as
lim
(x ,y)→(0,0)
R(x y2)
‖(x , y)‖6 =
lim
(x ,y)→(0,0)h(s(x , y))
lim
(x ,y)→(0,0)
x3 y6
‖(x , y)‖6
,
where lim(x ,y)→(0,0) h(s(x , y)) = 0 by Theorem 2.6.21, and where lim(x ,y)→(0,0) x
3 y6
‖(x ,y)‖6 = 0 by Lemma 6.3.8.
MAT237 Term Test 2 solutions - Page 9 of 12 January 12, 2024
Do not tear this page off. This page is for additional work and will not be
graded, unless you clearly indicate it on the original question page.
MAT237 Term Test 2 solutions - Page 10 of 12 January 12, 2024
Do not tear this page off. This page is for additional work and will not be
graded, unless you clearly indicate it on the original question page.
MAT237 Term Test 2 solutions - Page 11 of 12 January 12, 2024
Do not tear this page off. This page is for additional work and will not be
graded, unless you clearly indicate it on the original question page.
MAT237 Term Test 2 solutions - Page 12 of 12 January 12, 2024