Winter 2017

Solutions to Math 51 Second Exam — February 23, 2017
1. (12 points)
(a) Let B be a 2 × 2 matrix such that Bv is given by rotating v ∈ R2 by 45 degrees clockwise.
Determine, with reasoning, the matrix B 4 = BBBB; simplify your answer as much as possible.
(3 points) If B rotates by 45 degrees, B 2 rotates by 90 degrees in the same
direction,
B 3 by 135,
x
−x
and B 4 by 180 degrees. A 180 degree rotation sends every vector [ y ] to −y . This corresponds
−1 0
to the matrix
.
0 −1
(b) Let P be a 3 × 3 matrix for which:
• P v = v whenever v ∈ R3 belongs to the xy-plane; and
• det(P ) = 0.
Determine, with reasoning, as much of the matrix of P as you can. (The information you have
been given is not enough to determine all the matrix entries; you can denote any matrix entry
that you can’t figure out by a “?”)
(3 points) Let ei be the coordinate vectors. Since e1 , e2 belong to the xy-plane, we know
P e1 = e1 , and P e2 = e2 . Since det(P ) = 0, the rank of P is not 3. This means that the column
space of P has dimension 2 or less; since it contains e1 , e2 , it must be exactly the span of e1 and
e2 . Therefore, P e3 = ae1 + be2 . The matrix is thus:


1 0 a
0 1 b  .
0 0 0
In the desired format of the question, we would write this as


1 0 ?
0 1 ? ,
0 0 0
since a and b are unknown.
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 2 of 14
(Problem continuation: this page does not depend on the previous one.)
(c) For this and part (d), let T : R4 → R4 be the function which shifts each entry of a vector
to the succeeding one, and puts the fourth component into the first component. For example,
T(1, 2, 3, 4) = (4, 1, 2, 3) and T(5, −3, 1, 2) = (2, 5, −3, 1). It is a fact, which you do not have to
prove, that T is a linear transformation. Determine, showing your steps, the matrix A of T.
(3 points) Here we have T e1 = e2 , T e2 = e3 , T e3 = e4 and T e4 = e1 . This determines the
columns of the matrix A:

0
1
A=
0
0
0
0
1
0
0
0
0
1

1
0

0
0
(d) Is the matrix A of part (c) invertible? Justify your answer.
(3 points) T is invertible, because we can get an inverse transformation T −1 by shifting the
entires of a vector the other way:
T (x, y, z, w) = (w, x, y, z) and T −1 (x, y, z, w) = (y, z, w, x).
So its matrix A is also

0

0
(c): we get A−1 = 
0
1
−1 as in
invertible.
 (To get an explicit inverse, we derive the matrix of T
1 0 0
0 1 0
.)
0 0 1
0 0 0
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 3 of 14
2. (10 points) Match the following functions f (x, y) to their level curves by writing the plot number in the
blank to the right of the function. (In each diagram, lighter shades correspond to larger values of the
function.) Every function has a matching picture, but two pictures will be unmatched; no justification
is needed.
(1 point each) See next page for detailed reasoning.
(a)
2x + |y − 2x|
9
(e) sin(x) sin(y)
6
(i)
11
(j)
(b) y −
(x + 4)(x − 4)x
30
1
(f)
(c)
sin(|x + y|)
3
(g)
1
|x + y| + 1
2
(d)
sin(x + cos(y))
12
(h)
x + cos(y)
8
x2
x
+ y2 + 1
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
p
|x| + |y|
x2
xy
+ y2 + 1
5
10
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 4 of 14
(a): Examine the function in each “phase.” In particular, if y − 2x ≥ 0, then the function equals
2x + (y − 2x) = y, so level sets in the region y ≥ 2x (i.e. above the line y = 2x) are horizontal
lines y = c. This is enough to determine the answer. (If y − 2x ≤ 0, then the function equals
2x − (y − 2x) = 4x − y, so level sets in the region y ≤ 2x (i.e. below the line y = 2x) are of the form
4x − y = c, or y = 4x − c.
(One sees the line y = 2x in 9 as the line passing through the corner in each level set. In fact, this
“phase change locus” (i.e. where the argument y − 2x of absolute value changes sign) alone is enough
for single out 9. Note that the other piecewise linear option 7 shows a “phase change” across the lines
x = 0 and y = 0, suggesting that the function it represents involves |x| and |y|.)
(b): Rewriting y − (x+4)(x−4)x
= c as y = (x+4)(x−4)x
+ c, we see that each level set is the graph of
30
30
(x+4)(x−4)x
the cubic function g(x) =
+ c. Changing c shifts the graph vertically.
30
(c) and (g): Using the inside function x + y, we see that each level set of the form x + y = c0 , i.e. a
line of slope −1. This is enough to narrow down the answer to 2 or 3. For (c), the outside function
sin indicates a periodicity in both the spacing between these level sets and the value of the function.
Either properties allows us to rule out 2. (The absolute value indicates symmetric under reflection
across x + y = 0, but both 2 and 3 have this property.) For (g), note that as |x + y| increases (i.e. as
1
one moves NE or SW), |x+y|+1
decreases but ever more slowly, asymptotically tending to the value
1. Only 2 is consistent with this behavior.
(d) and (h): Using the inside function x+cos(y), we see that each level set is of the form x+cos(y) = c0 ,
or x = − cos(y) + c0 , which is the graph of the function g(y) = − cos(y) + c0 . Note that the roles of x
and y are flipped from the usual convention. This corresponds to reflecting the graph of the function
h(x) = − cos(x) + c0 across the diagonal y = x. Changing c0 now shifts the graph horizontally. This is
enough to narrow down the answer to 8 or 12. For (d), the outside function sin indicates a periodicity
in both the spacing between these level sets and the value of the function. The second property allows
us to rule out 8. Note that 8 fits (h) since the function increases linearly as you increase x.
(e): The function is 2π-periodic in both x and y. This narrows down the answer to 4 or 6. One can
be more precise: since sin(x + π) = − sin(x), the function changes sign under π translation in either
x or y. Only 6 is consistent with this behavior.
(f): Rewrite x2 +yx2 +1 = c as x2 + y 2 + 1 = 1c x. This can be further rewritten as (x − a)2 + y 2 = r2
(for some a and r depending on c), so each level set is a circle with center on the y-axis.
(Though unnecessary for determining the answer here, one can find a and r explicitly by completing
the square; this gives more precise information about the size of and spacing between the circles:
1 2
1 2
x2 − 1c x + 2c
+ y 2 = 2c
−1
2
2
1
1
⇐⇒
x − 2c
+ y 2 = 2c
− 1.
(i): We expect a “phase change” (see (a)) across y = 0 and x = 0, and a “square root behavior”
in each quadrant. Only 5 fits this description. (More explicitly: for instance, in the first quadrant
√
√
√
x, y ≥ 0, the function becomes x + y. Rewriting x + y = c as y = c − x, we see that each level
√
set is the graph of a function g(x) = c − x in the first quadrant.)
xy
1
2
2
2
2
(j): Rewrite x2 +y
2 +1 = c as x + y + 1 = c xy. Because x and y have the same coefficient, this can
be further rewritten as A(x + y)2 + B(x − y)2 = 1 for some A and B depending on c. This is the
equation of an ellipse, parabola, or a hyperbola, but more importantly, in standard form with respect
to the coordinates x + y and x − y, i.e. 45 degrees rotated from the xy-axes. (We can tell that it’s a
hyperbola by computing A and B.)
Alternatively, we can consider asymptotes to level sets. For |x|, |y| 0, a level set is where
xy
x2 +y 2
y/x
1+(y/x)2
=
asymptotes.
xy
x2 +y 2 +1
≈
is constant. This is true when y/x is constant, so lines through the origin are
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 5 of 14
3. (8 points) Below is a collection of level sets of a function f : R2 → R. You may assume that f and its
first and second derivatives are continuous, and the length scales in the x- and y-directions are equal.
For the questions below, you do not need to justify your answers; each has a unique best answer.
(1 point each)
(a) Draw, on the picture, a vector representing the direction of the gradient at point B.
The gradient is perpendicular to the level set at B, with negative y-component (since f increases
in this direction).
∂f
ZERO POSITIVE
at A is:
NEGATIVE
∂y
The function is decreasing in the y direction at point A.
(b) (Circle one)
∂f
POSITIVE
at D is: NEGATIVE
ZERO
∂y
At point D, as y increases, f is changing from increasing to decreasing (so fy must be zero).
−1
1
(d) (Circle one) Let v = √2
; then Dv f at A is:
NEGATIVE
ZERO POSITIVE
1
(c) (Circle one)
The function is decreasing at point A in the direction of v.
−1
1
√
(e) (Circle one) Let v = 2
; then Dv f at D is: NEGATIVE
1
ZERO
POSITIVE
The function is increasing at point D in the direction of v.
∂ 2f
at D is:
NEGATIVE
POSITIVE
∂x2
The graph of the function is concave downward in the x direction at point D.
(f) (Circle one)
∂ 2f
at C is:
NEGATIVE
POSITIVE
∂x2
The graph of the function is concave upward in the x direction at point C.
(g) (Circle one)
∂ 2f
at C is:
NEGATIVE
POSITIVE
∂x∂y
At point C, the first derivative of f with respect to y is decreasing as a function of x.
(h) (Circle one)
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 6 of 14
4. (12 points) Goldilocks has two dials which jointly control both the temperature t of her porridge (in
F) and the width w of her chair (in inches). Specifically, if the first dial is set to a value x and the
second dial is set to a value y, then
t(x, y) = 100yex−1 + 40 cos(y − 1)
w(x, y) = 6x2 + 6x + y .
Initially, both dials are set to 1.
(a) If F : R2 → R2 is the function
t(x, y)
F (x, y) =
w(x, y)
calculate DF (1, 1), the derivative matrix of F evaluated at the point (x, y) = (1, 1).
(4 points) We have that
∂t
∂t
= 100yex−1 ,
= 100ex−1 − 40 sin(y − 1)
∂x
∂y
∂w
∂w
= 12x + 6,
=1
∂x
∂t
Evaluating at (1, 1) we have that
100 100
.
DF (1, 1) =
18
1
(b) Calculate F (1, 1).
(2 points) We have that
100e0 + 40 cos(0)
140
F (1, 1) =
=
6+6+1
13
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 7 of 14
(Problem continuation: see the facing page for formulas for F , your responses, etc.)
(c) If Goldilocks moves the dials to 1.001 and 0.999, use linear approximation to estimate the new
values of t and w.
(3 points) We have that
1.001 − 1
F (1.001, 0.999) ≈ F (1, 1) + DF (1, 1)
.
0.999 − 1
Plugging in the values for F (1, 1) and DF (1, 1) from parts a) and b) we get that
140
F (1.001, 0.999) ≈
.
13.017
(d) Goldilocks determines that the values t = 140.8 and w = 13.1 are just right. Estimate the values
x and y she should set on the dials to achieve this.
(3 points) We have to solve the system
x−1
.
F (x, y) = F (1, 1) + DF (1, 1)
y−1
Plugging in all of the given values we we get that
140.8
140
100 100 x − 1
≈
+
13.1
13
18
1
y−1
Solving, we get that
1
x
1
1
−100 0.8
1.0054
≈
≈
−
y
1
0.1
1.0025
1700 −18 100
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 8 of 14
5. (10 points) A certain city has two basketball teams, the Frogs and the Toads. Each citizen of the
city is either a Frog supporter, a Toad supporter, or a non-watcher (doesn’t watch basketball at all).
Suppose the following:
• Every year, ten percent of Frog supporters give up on their team and become non-watchers;
• Every year, ten percent of Toad supporters give up on their team and become non-watchers;
• Yet hope springs eternal, for every year five percent of non-watchers become Frog supporters;
another ten percent of non-watchers become Toad supporters.
• You may also ignore births, deaths, and migration; so there is no other mechanism for the number
of each type of citizen to change.
Let F, T and N respectively be the number of Frog supporters, the number of Toad supporters, and
the number of Non-watchers.
(a) Suppose that you know F, T and N for the year 2015. Write down a formula (involving matrices,
vectors, and their operations) that tells you F, T and N for the year 2025. You do not need to
work out a numerical answer.
 
Fi

(4 points) Let Ti  be the F, T, N in the year i. Then we have
Ni


Fi+1 = 0.9Fi + 0.05Ni
Ti+1 = 0.9Ti + 0.1Ni


Ni+1 = 0.1Fi + 0.1Ti + 0.85Ni
.
We can write this in matrix form

 
 
Fi+1
0.9 0 0.05
Fi
 Ti+1  =  0 0.9 0.1   Ti  .
Ni+1
0.1 0.1 0.85
Ni
Hence we have
where




F2025
F2015
 T2025  = A10  T2015 
N2025
N2015


0.9 0 0.05
A =  0 0.9 0.1  .
0.1 0.1 0.85
(b) Again suppose that you know F, T and N for 2015. Is it possible to determine, from this information, F, T and N for 2010? You do not need to work out a numerical formula if so; just explain
completely whether it’s possible or not.
(3 points) Yes, it is possible. This is because A is invertible. It follows A5 is invertible, the
inverse being (A−1 )5 = A−5 . Since we have

 

F2010
F2015
A5  T2010  =  T2015  .
N2010
N2015
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 9 of 14
By multiplying A−5 on both side, we get




F2015
F2010
 T2010  = A−5  T2015  .
N2015
N2010
To verify that A is invertible, we

0.9
det( 0
0.1
can compute the determinant of A.



0 0.05
0.1 0.1 0.85
0.9 0.1 ) = det(0.9 0 0.05)
0.1 0.85
0 0.9 0.1


0.1 0.1 0.85
= det( 0 −0.9 −7.6)
0
0.9
0.1
−0.9 −7.6
= 0.1 · det(
)
0.9
0.1
= 0.675 6= 0.
(c) Suppose additionally that the numbers F, T and N are actually stable from one year to the next
(so there are the same number of Frog supporters in each year; same for Toads and non-watchers).
hF i
Write down a nonzero 3 × 3 matrix B whose nullspace contains T . You do not need to actually
N
compute the nullspace of B, but B should be given as a 3 × 3 matrix of numbers.
(3 points) Let A be as above. Then condition that F, T, N being stable means
 
 
F
F
T  = A T  .
N
N
Hence we have
 
F
(A − I3 )  T  = 0,
N
where I3 is the 3 × 3 identity matrix. Hence the matrix


−0.1
0
0.05
−0.1
0.1 
B = A − I3 =  0
0.1
0.1 −0.15
 
F

contains T  in its nullspace.
N
Any nonzero matrix B such that
   
1
0
B 2 = 0
2
0
is correct.
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
"
4
3
5x + 5y
− 45 x + 35 y
6. (10 points) Let f : R2 → R2 be the function f (x, y) =
Page 10 of 14
#
.
(a) Compute Df (x, y), the derivative matrix of f , at any point (x, y).
(2 points) For any (x, y) ∈ R2 ,
3/5 4/5
Df (x, y) =
.
−4/5 3/5
t3 + t2
. Calculate the derivative matrix D(f ◦ g),
−5 sin(t)
evaluated at t = 1. [Hint: your answer should be a matrix with one column and two rows.]
(b) Suppose g : R → R2 is the function g(t) =
(4 points) We use the chain rule. For any t ∈ R,
3/5 4/5
D(f ◦ g)(t) = Df (g(t)) ◦ Dg(t) =
−4/5 3/5
2
3t + 2t
.
−5 cos t
At t = 1, this gives
3/5 4/5
D(f ◦ g)(1) =
−4/5 3/5
3 − 4 cos(1)
5
.
=
−4 − 3 cos(1)
−5 cos(1)
7/5
. Compute the gradient
(c) Suppose h :
→ R is some function such that ∇h(2, −1) =
−1/5
vector ∇(h ◦ f ), evaluated at the point (x, y) = (2, 1).
R2
(4 points) Again, we use the chain rule. We also use the fact that for a function h : Rn → R,
∇h = (Dh)T . We have
D(h ◦ f )(2, 1) = Dh(f (2, 1)) ◦ Df (2, 1).
Note that
2
f (2, 1) =
,
−1
so
Dh(f (2, 1)) = Dh(2, −1) = (∇h(2, −1))T = 7/5 −1/5 .
Putting this all together, we have
D(h ◦ f )(2, 1) = Dh(f (2, 1)) ◦ Df (2, 1) = 7/5 −1/5
Thus
3/5 4/5
= 1 1 .
−4/5 3/5
T
1
∇(h ◦ f )(2, 1) = D(h ◦ f )(2, 1)T = 1 1 =
.
1
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 11 of 14
7. (10 points) A hill has elevation given by the function h(x, y) = 100 − 5x2 − 2xy − y 2 . Here (x, y)
measures position relative to the hill’s summit; thus (0, 0) is the summit, x measures the distance east
of the summit, and y measures distance north of the summit. x, y, h are all measured in meters.
(a) Compute Dh(x, y), the derivative matrix of h at any point (x, y).
(2 points) The derivative matrix is 1 × 2 in this case, given by
h
i ∂h
Dh(x, y) = ∂h
∂x
∂y = −10x − 2y −2x − 2y .
(b) Gary the bear, being unimaginative,
walks in a straight line, with his position at any time t ∈ R (in
t−5
. Gary’s elevation at any given time is denoted f (t) = h(g(t)).
minutes) given by g(t) =
−2t + 5
Compute df
dt , the rate of change of Gary’s elevation, as a function of t.
(4 points) Let x(t) and y(t) denote the components of g(t). Using the chain rule,
df
∂h ∂x ∂h ∂y
=
+
= (−10x − 2y)(1) + (−2x − 2y)(−2) = −6x + 2y.
dt
∂x ∂t
∂y ∂t
As a function of t, this becomes
df
= −6(t − 5) + 2(−2t + 5) = −10t + 40.
dt
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 12 of 14
(Problem continuation: see the facing page for formulas, your responses, etc.)
(c) Find a time t = t0 at which
df
dt
= 0; show your steps.
(2 points) Setting the expression from part (b) equal to zero, we find t0 = 4.
(d) For the time t0 of part (c), label Gary’s position at time t0 on the picture here (which depicts
Gary’s path and some level sets of h):
•
(2 points) See picture
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 13 of 14
8. (10 points) Shown below is a collection of level sets of the function f : R2 → R given by
f (x, y) = 20 + 6xy − 5x2 − 5y 2 .
In addition, the point (0, 2) is marked.
y
6
4
2
0
8
10
12
14
16
18
20
x
Math 51, Winter 2017
Solutions to Second Exam — February 23, 2017
Page 14 of 14
For easy reference, f (x, y) = 20 + 6xy − 5x2 − 5y 2 ; please refer to the diagram of level sets for f on
the facing page.
(a) Compute the unit vector v that makes the directional derivative Dv f (0, 2) as large as possible.
Draw this vector on the diagram on the facing page, with its tail at the marked point (0, 2).
[In your drawing, you need not worry about accurately depicting the length of the vector you’ve
computed.]
(4 point) The unit vector that maximizes the directional derivative will be in the direction of
gradient vector. The gradient vector
−10x + 6y
12
∇f (0, 2) =
=
−10y + 6x x=0,y=2
−20
√
√
√
has length 122 + 202 = 544 = 4 34 (however this simplification process is not necessary for
getting the full score of this part), so the unit vector should be
√ 3/ √34
.
−5/ 34
(See picture. The vector should at least point towards the “south-east” direction from the point
(0, 2).)
(b) Calculate the equation of the tangent line to the curve f (x, y) = 0 at (0, 2).
12
, which gives the normal vector to the tangent
(4 points) Note that the gradient from (a) is
−20
line. Thus we have
12(x − 0) − 20(y − 2) = 0.
(c) An ant starts at the point (0, 2) in the plane. Wherever the ant is — say, at position x — it
always walks in the direction of steepest ascent; i.e., in the unit direction w making the directional
derivative Dw f (x) as large as possible. If Dw f (x) = 0 for every unit vector w, the ant stops.
On the diagram on the facing page, draw the approximate path taken by the ant.
[You do not need to explain your reasoning, or comment on whether this behavior is typical of
ants.]
(2 points) The path (in green on the picture) should demonstrate following two properties: (1)
each intersection to the level set should be perpendicular, as the ant is always walking in the
gradient direction, which is orthogonal to the level set; (2) it should end at origin, which is the
”top” of the hill, where the directional derivative is 0.