Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Solutions To Tutorial 2 (Week 3) : Lecturers: Daniel Daners and James Parkinson

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

The University of Sydney

School of Mathematics and Statistics

Solutions to Tutorial 2 (Week 3)


MATH2961: Linear Mathematics and Vector Calculus (Advanced) Semester 1, 2011
Lecturers: Daniel Daners and James Parkinson

Topics covered and aims

In lectures last week:


 Partial and directional derivatives for functions f : Rn → R.
 Tangent planes to level surfaces (using ∇f ).
 Continuity of and differentiability.
 Chain rule and properties of the gradient vector ∇f .
 Higher order partials, The Mixed Derivatives Theorem.
 Taylor polynomials of order 1 and 2 for functions f : Rn → R.
 The Hessian matrix Hf (a).
 Taylor’s Theorem for functions f : Rn → R.
 Critical points of a function f : Rn → R.
After completing this tutorial sheet you will be able to:
 Compute tangent planes to implicitly defined surfaces and graphs of functions.
 Decide if a given function f : Rm → Rn is continuous.
 Decide if a given function f : Rn → R is differentiable at a point.
 Find Taylor polys and understand how to create higher order approximations.
 Be able to work with the remainder term.
 Apply properties of the gradient vector to solve problems.
 Construct proofs (Mixed Derivatives Thm).
 Find the critical points of a function f : Rn → R (more examples next week).

Preparation questions to do before class

1. Compute the second order Taylor polynomial of f (x, y) = cos(2x + y − 1) + yex


around (x, y) = (0, 1). Make a statement about the size of the remainder term.
Solution: Recall that the second order Taylor polynomial about (0, 1) is

T2 (x; (0, 1)) = f (0, 1) + fx (0, 1)x + fy (0, 1)(y − 1)


1 
+ fxx (0, 1)x2 + 2fxy (0, 1)x(y − 1) + fyy (0, 1)(y − 1)2 .
2
Calculating all of the partial derivatives gives
3 1
T2 (x; (0, 1)) = 2 + x + (y − 1) − x2 − x(y − 1) − (y − 1)2 .
2 2

Copyright
c 2011 The University of Sydney 1
By Taylor’s Theorem the remainder term R2 (x; (0, 1)) = f (x, y) − T2 (x; (0, 1))
satisfies
R2 (x; (0, 1))
lim = 0.
(x,y)→(0,1) x2 + (y − 1)2

2. Find the tangent plane to the surface z cos x − sin y + z 2 tan−1 x = 1 at the point
(x, y, z) = (0, π, 1)
Solution: The surface is implicitly defined by f (x, y, z) = 1. The gradient vector
is
z2
 
−1
∇f (x, y, z) = −z sin x + , − cos y, cos x + 2z tan x ,
1 + x2
and so ∇f (0, π, 1) = (1, 1, 1). Therefore we are looking for the equation of the
plane through (0, π, 1) with normal vector (1, 1, 1), and so the equation is

x + (y − π) + (z − 1) = 0, or x + y + z = π + 1.

3. I’m skiing on a mountain whose equation is z = 100−2x2 −3y 4 +x−2y. My current


location is (x, y) = (2, −1). Being adventurous I’d like to tackle the steepest slope
down the mountain. Which way should I ski initially? What is the gradient that
I will face if I take this path?
Solution: The gradient vector points in the direction of steepest ascent, and so
the negative of the gradient vector points in the direction of the steepest descent.
We have
∇f (x, y) = (−4x + 1, −12y 3 − 2),
and so I should ski in the
√ direction −∇f
√ (2, −1) = (7, −10). I’ll be tackling a slope
of −k∇f (2, −1)k = − 49 + 100 = − 149. This sounds pretty frightening – I’d
call this a cliff.

Questions to attempt in class

4. Find the equation of the tangent plane to the surface x3 − y 2 + xyz = 0 at the
point (1, 1, 0). Do this in two ways:
(a) by thinking of the surface as a level surface g(x, y, z) = 0, and
Solution: A surface defined by an equation g(x, y, z) = C is a level surface
of the function g. If a = (a, b, c) is a point on this surface then the gradient
vector of g at (a, b, c) is normal to the tangent plane of this level surface
at (a, b, c). So the tangent plane has equation

∇g(a) · (x − a) = 0.

In this case
∇g = (3x2 + yz, −2y + xz, xy).
Evaluating at (a, b, c) = (1, 1, 0), we get ∇g(a) = (3, −2, 1). So the plane
has equation

3(x − 1) − 2(y − 1) + (z − 0) = 0, equivalently 3x − 2y + z = 1.

2
(b) by thinking of the surface as the graph of a function z = f (x, y).
Solution: Solving the equation x3 − y 2 + xyz = 0 for z in terms of x and
y we get z = (y 2 − x3 )/xy = f (x, y) provided x, y 6= 0. Then
∂f 2x3 + y 2 ∂f x3 + y 2
=− and =
∂x x2 y ∂y xy 2
Using the formula for the tangent plane to a graph we see that
∂f ∂f
z = f (1, 1) + (1, 1)(x − 1) + (1, 1)(y − 1)
∂x ∂y
= 0 − 3(x − 1) + 2(y − 1)
= −3x + 2y + 1.
Rearranging this we get 3x − 2y + z = 1, as before.

5. Let f (x, y) = 2 cos(x + y 2 ) − y 2 + 3.


(a) Find all critical points of f .
Solution: We need to find the points where fx = 0 and fy = 0. Thus

fx = −2 sin(x + y 2 ) = 0
fy = −4y sin(x + y 2 ) − 2y = 0.

The first equation says that sin(x + y 2 ) = 0, and so x + y 2 = kπ for some


k ∈ Z. Then the second equation says that −2y = 0, and so y = 0. Thus
the critical points are (x, y) = (kπ, 0) with k ∈ Z.
(b) Compute the second order Taylor polynomial of f about one of these crit-
ical points. Have a guess: Do you think that the critical point is a local
maximum, local minimum, or a saddle point?
Solution: We have

f (x, y) = 2 cos(x + y 2 ) − y 2 + 3
fx (x, y) = −2 sin(x + y 2 )
fy (x, y) = −4y sin(x + y 2 ) − 2y
fxx (x, y) = −2 cos(x + y 2 )
fyy = −4 sin(x + y 2 ) − 8y 2 cos(x + y 2 ) − 2
fxy (x, y) = −4y cos(x + y 2 ).

Let’s choose the critical point (0, 0). Thus the Taylor polynomial is

T2 (x, 0) = f (0, 0) + fx (0, 0)x + fy (0, 0)y


1
fxx (0, 0)x2 + 2fxy (0, 0)xy + fyy (0, 0)y 2

+
2
= 5 − (x2 + y 2 ).

I’m guessing that (0, 0) is going to be a local maximum. This is because

f (x, y) = T2 (x, 0) + R2 (x, 0) = 5 − (x2 + y 2 ) + R2 (x, 0),

3
and Taylor’s Theorem tells us that R2 (x, 0) is small compared to x2 + y 2 .
More precisely, Taylor’s Theorem tells us that
R2 (x, 0)
lim = 0.
(x,y)→(0,0) x2 + y 2

Therefore the function f (x, y) behaves like 5 − (x2 + y 2 ) for (x, y) close to
(0, 0), and I know that this graph is an ‘upside down’ paraboloid, and so has
a maximum at (0, 0). This is all that was expected in the question. But to
make things rigorous, notice that by Taylor’s Theorem there is a δ > 0 such
that
1
|R2 (x, 0)| ≤ (x2 + y 2 ) once kxk ≤ δ
2
(this is using the definition of limits, with ǫ = 21 ). Thus if kxk < δ we have
f (x, y) = 5 − (x2 + y 2 ) + R2 (x, 0)
1
≤ 5 − (x2 + y 2 ) + (x2 + y 2 )
2
1 2 2
= 5 − (x + y )
2
≤ 5 = f (0, 0).
That is, f (x, y) ≤ f (0, 0) for all small x and y, and so f (0, 0) is a local
maximum. This result is confirmed by the second derivatives test (which we
are learning now). In fact the argument above is just a special case of how
the proof of the second derivatives test goes.
Of course you might have considered a different critical point. For the critical
point (kπ, 0) we see that
(
5 − ((x − kπ)2 + y 2 ) if k is even
T2 (x, (kπ, 0)) =
1 + ((x − kπ)2 − y 2 ) if k is odd.

This is telling us that (kπ, 0) with k even is a local maximum, and that
(kπ, 0) with k odd is a saddle point. This is because z = (x − α)2 − y 2 is a
classic example of a saddle, with the ‘centre’ of the saddle at (α, 0). Again,
this result can be easily verified once we learn the second derivatives test.
 2 2
 (x − y) if (x, y) 6= (0, 0)
6. Let f (x, y) = x4 + y 2
1 if (x, y) = (0, 0).

(a) Show that f (x, y) approaches 1 as (x, y) → (0, 0) along any straight line.
Solution: The possible lines are (0, y) and (x, mx). Along the first we
have f (0, y) = 1 → 1, and along the second
(x2 − mx)2 (x − m)2 m2
f (x, mx) = = → = 1.
x4 + m 2 x2 x2 + m 2 m2
(b) Does lim(x,y)→(0,0) f (x, y) exist? Is f continuous at (x, y) = (0, 0)?
Solution: Along the path y = x2 we have f (x, x2 ) = 0 → 0, and so the
limit does not exist, and therefore f is not continuous at (0, 0).

4
7. Find all points on the circle x2 + y 2 = 1 where the circle is tangent to a level curve
of the function x2 + 6xy + y 2 .
Solution: At a point with the required property ∇(x2 + y 2 − 1) = (2x, 2y) must
be a scalar multiple of ∇(x2 + 6xy + y 2 ) = (2x + 6y, 2y + 6x). Hence we need to
solve the system

2x = λ(2x + 6y), 2y = λ(2y + 6x), x2 + y 2 = 1.

We can rewrite the system as

0 = (λ − 1)x + 3λy, 0 = 3λx + (λ − 1)y, x2 + y 2 = 1.

For fixed λ the first two equations are a linear system for x, y. One obvious solution
is (x, y) = (0, 0), but this does not satisfy the third equation. To ensure the
existence of a non-trivial solution of the linear system we need that the determinant
of the coefficient matrix is zero. Hence we require that (λ − 1)2 − 9λ2 = 0. Solving
this quadratic equation for λ we get λ1 = −1/2 and λ2 = 1/4. Substituting
λ1 = −1/2 into √ the first equation we get x = −y, and so from the last equation
x√ = −y = ± 2/2. If λ2 = 1/4 then x = y, and by the last equation x = y =
2 2 2 2
± 2/2. Hence the contour
√ lines
√ of x +6xy+y √ are√tangent to the circle x +y = 1
at the four points ±( 2/2, − 2/2) and ±( 2/2, 2/2).

8. The temperature in Nemo’s tank at the point (x, y, z) is governed by the equation
T (x, y, z) = x2 + 2y 2 − xyz. Nemo is at (x, y, z) = (1, 2, −1). It is way too cold!
(T (1, 2, −1) = 11 degrees). Which way should he swim?
Solution: Nemo decides to swim in the direction of the gradient vector, because
he remembers that this vector points in the direction of the most rapid rate of
increase in temperature. He carefully calculates that

∇T (x, y, z) = (2x − yz, 4y − xz, −xy).

Unfortunately he dies mid-calculation. Had he been able to finish the computation,


he would have plugged in his current coordinates (x, y, z) = (1, 2, −1) and swam
in the direction
∇T (1, 2, −1) = (4, 9, −2).

Questions for extra practice

9. Find a point on the surface


√ x2 /9 + y 2 /4 + z 2 = 1 at which the tangent plane is
perpendicular to (1, 1, 3). Write down an equation of the tangent plane.
Solution: Set f (x, y, z) = x2 /9+y 2 /4+z 2 −1. Then ∇f (x, y, z) = (2/9x, 1/2y, 2z)
is perpendicular to the surface x2 /9 + y 2 /4 + z 2 = 1 at (x, y, z). We need to find a
point (x,
√ y, z) satisfying f (x, y, z) = 0 and for which ∇f (x, y, z) = (2/9x, 1/2y, 2z) =
λ(1, 1, 3) for some λ ∈ R. Hence we need to solve the following system of equa-
tions:
√ x2 y 2
2x = 9λ, y = 2λ, 2z = 3λ, + + z 2 = 1.
9 4

5
If we solve the first three equations for x, y and z, respectively, and substitute them
into the last we get
9 3
1 = λ2 + λ2 + λ2 = 4λ2 .
4 4
Solving for λ we get λ = ±1/2. Hence the √ tangent plane to the surface
√ x2 /9 +
y 2 /4 + z 2√= 1 is perpendicular to (1, 1, 3) at the points (9λ/2, √ 2λ, 3λ/2) =
±(9/4, 1,√ 3/4). An equation √ for the tangent plane at (9/4,√1, 3/4) is therefore
x + y + 3z = 4, at −(9/4, 1, 3/4) an equation is x + y + 3z = −4.

4
10. Find all critical points of the function f (x, y) = −xy + x
+ y2 .

Solution: We need to find the points for which ∇f (x, y) = (−y − 4/x2 , −x −
2/y 2 ) = (0, 0), that is,

y + 4/x2 = 0 and x + 2/y 2 = 0.

Note that x 6= 0 and y 6= 0 as otherwise the function is not defined. From the first
equation y = −4/x2 . Substituting this into the second equation we get x+2x4 /16 =
x(1 + x3 /8) = 0. As x 6= 0 we have 1 + x3 /8 = 0, so x3 = −8 and therefore x = −2.
Now y = −4/x2 = −4/4 = −1. Hence (−2, −1) is the only critical point of f .

11. (a) Let f , g : R → Rn be differentiable. Prove that (f · g)′ = f ′ · g + f · g ′ .


Solution: We have

(f · g)′ = (f1 g1 + · · · + fn gn )′
= (f1 g1 )′ + · · · + (fn gn )′
= f1′ g1 + · · · + fn′ gn + f1 g1′ + · · · + fn gn′ = f ′ · g + f · g ′ .
 

(b) Let f , g : R → R3 be differentiable. Prove that (f × g)′ = f ′ × g + f × g ′ .



Solution: We have f × g = f2 g3 − f3 g2 , f3 g1 − f1 g3 , f1 g2 − f2 g1 , and so

(f × g)′ = f2′ g3 − f3′ g2 , f3′ g1 − f1′ g3 , f1′ g2 − f2′ g1




+ f2 g3′ − f3 g2′ , f3 g1′ − f1 g3′ , f1 g2′ − f2 g1′




= f ′ × g + f × g′.

12. Are the following functions continuous on their natural domains?


(a) f (x, y) = sin |x2 − y| + 3ex/y
Solution: The natural domain of this function is {(x, y) ∈ R2 | y 6= 0}. If
(a, b) ∈ R2 with b 6= 0 then by limit laws and the continuity of the sine and
exponential functions we have

sin |x2 − y| + 3ex/y = sin |a2 − b| + 3ea/b = f (a, b)



lim
(x,y)→(a,b)

and so f is continuous on its natural domain.


(b) f (x, y, z) = (x/y, y 3 − z 2 )

6
Solution: The domain of definition is {(x, y, z) ∈ R3 : y = 6 0}. If (a, b, c)
is in this domain, then b 6= 0. By limit laws, if (x, y, z) → (a, b, c) then
x/y → a/b and y 3 − z 2 → b3 − c2 . Hence

lim f (x, y, z) = f (a, b, c),


(x,y,z)→(a,b,c)

and so f is continuous on its natural domain of definition.

13. Suppose that z = f (u, v) and that u = x + y and v = x − y. Show that

∂z ∂z  ∂z 2  ∂z 2 ∂ 2z ∂ 2z ∂ 2z
= − and = − .
∂x ∂y ∂u ∂v ∂x∂y ∂u2 ∂v 2
You may assume that the Mixed Derivatives Theorem holds.
Solution: By the Chain Rule,
∂z ∂z ∂u ∂z ∂v ∂z ∂z
= + = +
∂x ∂u ∂x ∂v ∂x ∂u ∂v
and
∂z ∂z ∂u ∂z ∂v ∂z ∂z
= + = −
∂y ∂u ∂y ∂v ∂y ∂u ∂v
The first result follows by multiplying both sides of the last two equations.
∂z
For the second formula we use the chain rule again to differentiate ∂y with respect
to x. Thus
∂ 2z
 
∂ ∂z ∂z
= −
∂x∂y ∂x ∂u ∂v
 2
∂ 2 z ∂v
  2
∂ z ∂u ∂ 2 z ∂v

∂ z ∂u
= + − +
∂u2 ∂x ∂v∂u ∂x ∂u∂v ∂x ∂v 2 ∂x
∂ 2z ∂ 2z ∂ 2z ∂ 2z
= + − − .
∂u2 ∂v∂u ∂u∂v ∂v 2
Assuming equality of the mixed derivatives the middle terms cancel.

14. A function f : RN → R is radial if f (x) depends only on kxk, i.e., if f (x) = g(kxk),
where g(r) is some function, which we shall assume to be differentiable. Show that
if f is radial then ∇f (x) is a scalar multiple of x.
p 
Solution: Write f (x) = g x21 + · · · + x2N . Then by the Chain Rule,

∂f q  ∂ q
= g′ x21 + · · · + x2N x21 + · · · + x2N
∂xj ∂xj
q  xj g ′ (kxk)
= g′ x21 + · · · + x2N p 2 = xj .
x1 + · · · + x2N kxk

g ′ (kxk)
Hence ∇f (x) = kxk
x.

7
15. Let f : R2 → R. Decide what the 3rd order Taylor polynomial of f centered at
(x, y) = (a, b) should be. Use your formula to give a cubic approximation to

f (x, y) = cos(2x + y − 1) + yex around the point (x, y) = (0, 1).

Solution: Let x = (x, y) and a = (a, b). Let

T3 (x; a) = T2 (x; a) + cubic terms,

where T2 (x; a) = f (a) + ∇f (a) · (x − a) + 12 (x − a)T Hf (a)(x − a), and

cubic terms = c30 (x − a)3 + c21 (x − a)2 (y − b) + c12 (x − a)(y − b)2 + c03 (y − b)3

for constants yet to be determined. If we try to write

f (x) = T3 (x; a) + higher terms

then repeated differentiation gives

fxxx (a) = 6c30


fxxy (a) = 2c21
fxyy (a) = 2c12
fyyy (a) = 6c03 .

Therefore we set
1
T3 (x; a) = T2 (x; a) + fxxx (a)(x − a)3 + 3fxxy (a)(x − a)2 (y − b)
6
+ 3fxyy (a)(x − a)(y − b)2 + fyyy (a)(y − b)3 .


In Question 1 you computed


3 1
T2 (x; a) = 2 + x + (y − 1) − x2 − x(y − 1) − (y − 1)2
2 2
and so computing all of the third order partial derivatives gives
3 1 1 1
T3 (x; a) = 2 + x + (y − 1) − x2 − x(y − 1) − (y − 1)2 + x3 + x2 (y − 1).
2 2 6 2

8
 2
 xy if (x, y) 6= (0, 0)
2
16. Define f : R → R by f (x, y) = x2 + y 2
0 if (x, y) = (0, 0).

(a) Show that f is continuous everywhere.


Solution: By limit laws we know that f is continuous for all (x, y) 6= (0, 0).
Then since
x2 y
lim f (x, y) = lim = lim r cos2 θ sin θ = 0 = f (0, 0)
(x,y)→(0,0) (x,y)→(0,0) x2 + y 2 r→0

we see that f is also continuous at (x, y) = (0, 0).


(b) Show that fx (0, 0) = fy (0, 0) = 0.
Solution: We have
f (h, 0) − f (0, 0) 0−0
fx (0, 0) = lim = lim = 0,
h→0 h h→0 h
and similarly for fy (0, 0).
(c) Is f differentiable at (0, 0)?
Solution: Note that
f (x, y) − (f (0, 0) + fx (0, 0)(x − 0) + fy (0, 0)(y − 0)) x2 y
= 2 .
(x + y 2 )3/2
p
x2 + y 2

The limit as (x, y) → (0, 0) of this expression does not exist. For exam-
ple, along the path (x, 0) → (0, 0) it approaches 0, whereas along the path
(x, x) → (0, 0) it approaches 2−3/2 . Therefore f is not differentiable at (0, 0).

Challenging problems

17. Let f : R2 → R and assume that the mixed partial derivatives fxy and fyx both
exist in a disc around (a, b). Let h, k > 0, and let

∆(h, k) = f (a + h, b + k) − f (a, b + k) − f (a + h, b) + f (a, b).

(a) Write ∆(h, k) as F (a + h) − F (a) where F (x) = f (x, b + k) − f (x, b). Use
the Mean Value Theorem twice to prove that
∆(h, k)
= fxy (α, β)
hk
where α = α(h, k) and β = β(h, k) with (α, β) → (a, b) as (h, k) → (0, 0).
Solution: We have

F ′ (x) = fx (x, b + k) − fx (x, b).

By the Mean Value Theorem, F (a + h) − F (a) = F ′ (α)h for some α between


a and a + h. Hence

∆(h, k) = F (a + h) − F (a) = F ′ (α)h = fx (α, b + k) − fx (α, b) h




9
Now apply the Mean Value Theorem again, this time to ϕ(y) = fx (α, y).
Thus ϕ(b + k) − ϕ(b) = ϕ′ (β)k for some β between b and b + k. But

ϕ′ (y) = fx (α, y) = fxy (α, y),
∂y
and so ∆(h, k) = fxy (α, β)hk, where (α, β) → (a, b) as (h, k) → (0, 0).
(b) Argue analogously to show that
∆(h, k)
= fyx (γ, δ)
hk
where γ = γ(h, k) and δ = δ(h, k) with (γ, δ) → (a, b) as (h, k) → (0, 0).
Solution: The same reasoning, starting with ∆(h, k) = G(b + k) − G(b)
where G(y) = f (a + h, y) − f (a, y).
(c) Deduce that if fxy and fyx are continuous at (a, b) then fxy (a, b) = fyx (a, b).
Solution: By parts (a) and (b) we have fxy (α, β) = fyx (γ, δ) where (α, β)
and (γ, δ) tend to (a, b) as (h, k) → (0, 0). Therefore by the assumed conti-
nuity of fxy and fyx at (a, b) we have fxy (a, b) = fyx (a, b).

18. Prove that if the first order partials of f (x, y) exist in a disc around (a, b) and are
continuous at (a, b) then f (x, y) is differentiable at (a, b). (We did this one in the
practice class last week I think).
Hint: Write f (x, y) − f (a, b) = f (x, y) − f (a, y) + f (a, y) − f (a, b).
Solution: Let T (x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b) be the first order
Taylor polynomial (i.e., the tangent plane). We need to show that
f (x, y) − T (x, y)
lim p = 0. (1)
(x,y)→(a,b) (x − a)2 + (y − b)2
By the Mean Value Theorem there is x′ between a and x and y ′ between b and y
such that
f (x, y)−f (a, b) = f (x, y)−f (a, y)+f (a, y)−f (a, b) = fx (x′ , y)(x−a)+fy (a, y ′ )(y−b).
Therefore
f (x, y) − T (x, y) (fx (x′ , y) − fx (a, b)) (x − a) (fy (a, y ′ ) − fy (a, b)) (y − b)
p = p + p .
(x − a)2 + (y − b)2 (x − a)2 + (y − b)2 (x − a)2 + (y − b)2
Since

x − a y − b
(x − a)2 + (y − b)2 ≤ 1 and (x − a)2 + (y − b)2 ≤ 1
p p

it follows that

f (x, y) − T (x, y)
≤ fx (x′ , y) − fx (a, b) + fy (a, y ′ ) − fy (a, b) .

p
(x − a)2 + (y − b)2

Since fx and fy are assumed to be continuous at (a, b), both terms on the right
hand side tend to 0 as (x, y) → (a, b), which establishes the limit (1).

10

You might also like