Lecture 5 (Optimization of Functions of Several Variables)
Lecture 5 (Optimization of Functions of Several Variables)
Math 301
Lecture 5
Lecture Outline
1 Gradient Vectors
Recommended Reading
Gradient Vectors
Remarks
Remarks
(i) A vector is normal to a curve at a point P if it is normal to
(i) Recall that for a function of three variables
the tangent to the curve at P.
f (x, y , z) the gradient of f is defined as
(ii) Gradient vectors are normal to level curves of z = f (x, y ). ✓ ◆
@f @f @f
Assume that f (x, y ) has continuous partial derivatives. At rf = , ,
every point (x0 , y0 ) in the domain of f , the gradient of f is @x @y @z
normal to the level curve through (x0 , y0 ). (ii) Since the directional derivative of f (x, y , z) at P in
the direction of a unit vector u is Du f = rf .u, it
follows all the same that the rf (x, y , z) is the
direction of maximum increase of f at P(x, y , z).
(iii) If f (x, y , z) is a function of three variables, rf is
normal to the level surfaces of f (which means that
rf (a, b, c) is normal to the tangent plane to the
level surface f (x, y , z) = const at P(a, b, c) on the
surface).
A Rough Proof
Let u be a unit vector tangent at (x0 , y0 ) to the level curve
C of f (x, y ) through this point. u defines the direction of
the level curve C at (x0 , y0 ).
Along the level curve C the function f (x, y ) does not
change its values. Thus, in the direction of this curve at
(x0 , y0 ), the rate of change of f (x, y ) is 0. In other words,
the directional of f (x, y ) in the direction u at (x0 , y0 ) is 0.
Since Du f (x0 , y0 ) = rf (x0 , y0 ).u,
Du f (x0 , y0 ) = 0 () rf (x0 , y0 ) and u are orthogonal.
Gradient Vectors
Example
Find a unit normal vector n of the cone of equation
z 2 = 4x 2 + 4y 2 at the point P(1, 0, 2).
Solution
The equation of the cone z 2 = 4x 2 + 4y 2 can be rewritten
as
4x 2 + 4y 2 z 2 = 0.
f (x, y , z) = 4x 2 + 4y 2 z2.
Remark
n points downwards since its z component is negative. A
unit normal vector to the cone at P that points upwards is
n.
A function of two variables has a local maximum at (a, b) if f (x, y ) f (a, b) when (x, y ) is near (a, b).
The number f (a, b) is called a local maximum value.
A function of two variables has a local minimum at (a, b) if f (x, y ) f (a, b) when (x, y ) is near (a, b).
The number f (a, b) is called a local minimum value.
If the inequalities in the above definitions hold for all (x, y ) in the domain of f , then the extreme value (be
it local minimum or local maximum) is called absolute.
Question
How do we locate points where z = f (x, y ) attains its extreme values?
Proof
If f (x, y ) attains a local extreme value at (a, b), it follows that the
functions g (x) and h(y ) shown in the below figure attain local
extreme values at x = a and y = b, respectively.
Therefore, g 0 (a) = 0 and h0 (b) = 0 which imply the fact that the
partial derivatives at (a, b) are null.
critical points
A critical point (or stationary point) of a function of several variables f is one at which the partial
derivatives of f are zero or where one of the partial derivatives does not exist.
Remark
The First Derivative Theorem for Local Extreme Values implies that critical points are the only candidates in the
interior of the domain of f where f would attain its local extrema.
Example
Locate all critical points of f (x, y ) = x 2 y x2 2y 2 .
The partial derivatives are
fx = 2xy 2x = 2x(y 1) fy = x 2 4y .
Substituiting the values in the first line into the equation in the second we obtain:
Case 1: x = 0.
Substituting into x 2 = 4y gives 0 = 4y and hence y = 0. Thus, the critical point for this case is
(x, y ) = (0, 0).
Case 2: y = 1.
Substituting into x 2 = 4y gives x 2 = 4 and hence x = ±2. Thus, we get two critical points for this case:
( 2, 1) and (2, 1).
Remark
Similar to functions of a single variable, a critical point of a function of Saddle points
several variables does not necessarily yield an extreme value of the Critical points that are solutions of
function, as shown in the adjacent figure. 8
> @f
< @x (a, b) =0
>
: @f (a, b)
@y
=0
Question
Is there a way to decide whether a critical point of a
function of two variables will yield an extreme value of
the function?
Yes there is, and it is a version for functions of two
Saddle point at (0, 0) Contour map of z = y 2 x2 variables of the second derivative test of functions of
a single variable.
The function z = y 2 x 2 has a critical point at (0, 0) which is interior to
it’s domain (this can be seen by simply observing that the tangents at
(0, 0) to the slices in the x direction and the y direction are horizontal).
However, (0, 0) is neither a highest nor a lowest point on the graph.
Therefore, (0, 0) does not yield a local extreme value.
Remark
The expression D = fxx fyy [fxy ]2 is called the discriminant or Hessian of f . It may be remembered as the
determinant,
fxx fxy
D =
fxy fyy
2 2
Vy = 108z 4yz 2z 2 = (108 4y 2z)z = 0
D(x, y ) = fxx fyy fxy = 8y + 8 4x
Vz = 108y 2y 2 4yz = (108 2y 4z)y = 0
give the critical points (0, 0), (0, 54), (54, 0), and (18, 18).The
(i) At the point (0, 0): D = 8. Because D > 0 and volume is 0 at (0, 0), (0, 54), (54, 0), obviously not a maximum value.
fxx (0, 0) = 2 < 0, the second derivative test tells
us that f attains a local maximum at (0, 0). Applying the second derivative test at (18, 18):
2
D = Vyy Vzz Vyz = ( 4z)( 4y ) (108 4y 4z)2 which
(ii) At the point (2, 1):D = 16. Since D < 0, f has a
implies that D(18, 18) = 3888 > 0. Since Vyy (18, 18) = 72 < 0,
saddle point at (2, 1) (neither max nor min).
we conclude that the (18, 18) gives a maximum value.
(iii) At the point ( 2, 1): D = 16. Since D < 0, f
Therefore, the dimensions of the maximum volume acceptable box are
has a saddle point at ( 2, 1)(neither max nor min). x = 108 2(18) 2(18) = 36 in, y = 18 in and z = 18 in.