Module MA1132 (Frolov), Advanced Calculus Tutorial Sheet 6

advertisement
Module MA1132 (Frolov), Advanced Calculus
Tutorial Sheet 6
To be solved during the tutorial session Thursday/Friday, 25/26 February 2016
1. Consider the function
f (x, y) = −x4 + 2x2 y − 2y 2 + 2y + 5
Locate all relative maxima, relative minima, and saddle points, if any.
Solution: We first find all critical points
fx (x, y) = 4xy − 4x3 = 0 ,
fy (x, y) = 2x2 − 4y + 2 = 0 .
From the second equation we find y in terms of x
y=
x2 1
+ ,
2
2
and substituting it to the first equation, we derive the following equation for x
2x − 2x3 = 0 .
There are three solutions to this equation
x = 0 , x = −1 , x = 1 ,
and, therefore, three critical points
1
(x = 0 , y = ) ,
2
(x = −1 , y = 1) ,
(x = 1 , y = 1) .
Computing the values of f at critical points, we get
1
11
f (0, ) =
,
2
2
f (−1, 1) = 6 ,
f (1, 1) = 6 .
To find out if they are maximum, minimum or saddle points we use the second derivative
test. To this end we compute
∂ 2f
∂ 2f
∂ 2f
2
(x,
y)
=
4y
−
12x
,
(x,
y)
=
−4
,
(x, y) = 4x ,
∂x2
∂y 2
∂x∂y
and
∂ 2f ∂ 2f
D(x, y) =
−
∂x2 ∂y 2
1
∂ 2f
∂x∂y
2
= 32x2 − 16y ,
Computing D and
∂2f
∂x2
for the three critical points, we get
∂ 2f
3
(0, ) = 2 ,
2
∂x
2
1
D(0, ) = −8 ,
2
and therefore (0 , 12 ) is a saddle point.
D(−1, 1) = 16 ,
∂ 2f
(−1, 1) = −8 ,
∂x2
and therefore (−1, 2) is a relative maximum.
D(1, 1) = 16 ,
∂ 2f
(1, 2) = −8 ,
∂x2
and therefore (1, 2) is a relative maximum too.
The graph of the function is shown below
2. What is the volume of the largest box with edges parallel to the coordinate axes that fits
inside the ellipsoid
x2 y 2 z 2
+ 2 + 2 = 1.
(1)
a2
b
c
Solution: The volume of a box with edges parallel to the coordinate axes that fits inside the
ellipsoid is
V (x, y, z) = 8xyz ,
(2)
where x, y, z are coordinates of the vertex of the box in the first octant. The constraint is
x2 y 2 z 2
g(x, y, z) = 2 + 2 + 2 − 1 = 0 .
a
b
c
2
(3)
The maximum of V is therefore given by
8yz = λ
2x
,
a2
8xz = λ
2y
,
b2
8xy = λ
2z
,
c2
(4)
and therefore
λ
λ
λ
, y=
, z=
.
4bc
4ac
4ab
Substituting these into the constraint equation one gets
x=
λ2 3
=1
16 a2 b2 c2
=⇒
(5)
abc
λ
=√ .
4
3
(6)
Thus, the maximum volume V is
V =8
8
(λ/4)3
= √ abc .
2
2
2
abc
3 3
(7)
3. Let (xi , yi ) , xi 6= xj , i, j = 1, . . . , n be n points on the xy-plane.
(a) Find the least squares line of best fit, that is the line y = ax + b which minimises
the vertical distance f (a, b),
n
X
f (a, b) =
(axi + b − yi )2 ,
(8)
i=1
between the points (xi , yi ) and the line.
Solution: Let
n
1X
xi ,
x̄ ≡
n i=1
n
1X
ȳ ≡
yi ,
n i=1
n
x2
1X 2
≡
x ,
n i=1 i
n
y2
1X 2
≡
y ,
n i=1 i
n
1X
xy ≡
xi y i .
n i=1
(9)
Then one gets
∂a f (a, b) =
n
X
2xi (axi + b − yi ) = 2n(ax2 + bx̄ − xy) = 0 ,
i=1
∂b f (a, b) =
n
X
(10)
2(axi + b − yi ) = 2n(ax̄ + b − ȳ) = 0
=⇒
b = ȳ − ax̄ .
i=1
Substituting b into the first equation, one finds
a=
x̄ȳ − xy
,
x̄2 − x2
b=
x̄ xy − ȳ x2
.
x̄2 − x2
(11)
To show that it is a local minimum we compute
∂a2 f (a, b) = 2n x2 > 0 ,
∂a ∂b f (a, b) = 2n x̄ ,
∂b2 f (a, b) = 2n ,
D = ∂a2 f (a, b)∂b2 f (a, b) − ∂a ∂b f (a, b) = 4n2 (x2 − x̄2 ) > 0 .
3
(12)
The inequality x2 − x̄2 > 0 follows from
0<
n
X
(xi − x̄)2 = n(x2 − x̄2 ) ,
(13)
i=1
if not all xi are equal. Thus, by the second-derivative test it is a local minimum.
P
(b) The surface z = f (a, b) = ni=1 (axi + b − yi )2 is an elliptic paraboloid, that is f (a, b)
can be written in the form
f (a, b) = A0 a02 + C 0 b02 + D0 a0 + E 0 b0 + F 0 ,
A0 C 0 > 0 ,
(14)
where
a0 = a cos φ + b sin φ ,
b0 = b cos φ − a sin φ .
(15)
Find A0 , C 0 , and explain how this shows that f (a, b) has an absolute minimum at
the point found in part (a) of this question.
Solution: We write f in the form
f (a, b) = na2 x2 + 2nabx̄ + nb2 − 2naxy − 2nbȳ + ny 2 = Aa2 + Bab + Cb2 + Da + Eb + F ,
A = nx2 , B = 2nx̄ , C = n , D = −2nxy , E = −2nȳ , F = ny 2 .
(16)
Then we use Q1 of PS1, and find
 q

1

 2 n x2 + 1 − 4x̄2 + (x2 − 1)2
0
q
A =

1

 2 n x2 + 1 + 4x2 + (x2 − 1)2
 q

1
2
2
2
2

 2 n x + 1 + 4x̄ + (x − 1)
q
C0 =

1
2
2
2
2

 2 n x + 1 − 4x + (x − 1)
x2 < 1
,
A0 > 0 ,
x2 ≥ 1
(17)
x2 < 1
,
C0 > 0 ,
x2 ≥ 1
A0 C 0 = n(x2 − x̄2 ) > 0 .
Since both A0 and C 0 are positive the function f (a, b) has only one absolute minimum.
4
Download