7.4 Partial Derivatives We wish to maximize functions of two

advertisement
7.4
Partial Derivatives
We wish to maximize functions of two variables. This will involve taking derivatives.
Example: Consider the function given by
z = f (x, y) = x2 y 3 + xy + 4y 2
Suppose we were to fix y at 3. Then
f (x, 3) = 27x2 + 3x + 36
As a function of one variable we can take its ordinary derivative to get
54x + 3
Now, without replacing y by a specific number, we can repeat this. Take the derivative of
f (x, y), treating y as a constant. We get
2xy 3 + y
This is called the partial derivative of f with respect to x. We denote this by
∂f ∂z
,
or fx
∂x ∂x
where ∂ is the Greek letter small delta. Similarly, we could take the derivative with respect
to y while pretending x is a constant. The result is
3x2 y 2 + x + 4y 2
This is called the partial derivative of f with respect to y. We denote this by
∂f ∂z
,
or fy
∂y ∂y
When calculating partial derivatives, just keep the following in mind:
• When calculating
respect to x.
∂f
,
∂x
pretend y is a constant and take the ordinary derivative with
• When calculating
respect to y.
∂f
,
∂y
pretend x is a constant and take the ordinary derivative with
Note that there are definitions of partial derivatives as limits, but we won’t need those.
It is also extremely important to remember that this is not the same as implicit
differentiation! When finding fx you treat y as a constant and not as a function of x.
Examples: Find the partial derivatives of the following functions.
1. f (x, y) =
p
x2 − y 2 = (x2 − y 2 )1/2
solution: For each of the partial derivatives we use the general power rule:
1
fx = (x2 − y 2 )−1/2 (2x),
2
1
fy = (x2 − y 2 )−1/2 (−2y)
2
2. f (x, y) = 4x2 y + x3 y 3 + y
solution:
fx = 8xy + 3x2 y 3 + 0,
fy = 4x2 + 3x3 y 2 + 1
3. f (x, y) = e2x+3y
solution:
fx = e2x+3y (2),
fy = e2x+3y (3)
4. f (x, y) = exy
solution:
fx = exy (y),
fy = exy (x)
5. f (x, y) = x ln(xy)
solution:
1
· y = ln(xy) + 1
xy
1
x
fy = x ·
·x=
xy
y
fx = ln(xy) + x ·
The geometric interpretation of partial derivatives is similar to that of the ordinary derivative of a function of one variable. fx represents the slope of the surface pointing in the x
direction while fy represents the slope of the surface pointing in the y direction.
Second-Order Partial Derivatives
Since a function of two variables has two first derivatives, it has four second derivatives.
They are
fxx =
∂2f
∂x2
= take partial derivative with respect to x twice.
fyy =
∂2f
∂y 2
= take partial derivative with respect to y twice.
fxy =
∂2f
∂y∂x
= take partial derivative with respect to x, then y.
fyx =
∂2f
∂x∂y
= take partial derivative with respect to y, then x.
FACT - for any reasonable function, fxy = fyx .
Examples:
1. Let f (x, y) = 3xy 2 + 2xy + x2 . Calculate the 4 second derivatives.
solution:
fx = 3y 2 + 2y + 2x
fy = 6xy + 2x
And so we have
fxx = 2
fyy = 6x
fxy = 6y + 2
fyx = 6y + 2
Notice that fxy = fyx as expected.
2. Let f (x, y) = x2 y 3 + x4 y + xey . Calculate the 4 second derivatives.
solution:
fx = 2xy 3 + 4x3 y + ey
fy = 3x2 y 2 + x4 + xey
And so we have
fxx = 2y 3 4 + 12x2 y
fyy = 6x2 y + xey
fxy = 6xy 2 + 4x3 + ey
fyx = 6xy 2 + 4x3 + ey
Again fxy = fyx .
7.5
Extrema of Functions of Two Variables
Let f be a function defined on a region containing (x0 , y0 ). Then f has a local max at
(x0 , y0 ) if there is a circular region R centered at (x0 , y0 ) such that
f (x, y) ≤ f (x0 , y0 )
for every (x, y) in R. This means that there is a region around (x0 , y0 ) such that the graph
of f looks like this
Similarly, f has a local min at (x0 , y0 ) if there is a circular region R centered at (x0 , y0 )
such that
f (x, y) ≥ f (x0 , y0 )
for every (x, y) in R. This means that there is a region around (x0 , y0 ) such that the graph
of f looks like this
Local maxes and mins are examples of critical points just as in the one variable case. We
say that (x0 , y0 ) is a critical point of f if
• fx (x0 , y0 ) or fy (x0 , y0 ), or
• fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0
We will only deal with the second case. So to find critical points of f (x, y), calculate fx
and fy , set both equal to 0 and solve.
Examples:
1. Find all critical points of f (x, y) = 2x2 + y 2 + 8x − 6y + 20.
solution: We find the partial derivatives and set them equal to 0
fx = 4x + 8 = 0
fy = 2y − 6 = 0
These imply that x = −2 and y = 3. So f has one critical point at (−2, 3).
2. Find all critical points of f (x, y) = −x2 − 5y 2 + 8x − 10y − 13.
solution: We find the partial derivatives and set them equal to 0
fx = −2x + 8 = 0
fy = −10y − 10 = 0
These imply that x = 4 and y = −1. So f has one critical point at (4, −1).
3. Find all critical points of f (x, y) = x2 + 6xy + 10y 2 − 4y + 4
solution: We find the partial derivatives and set them equal to 0
fx = 2x + 6y = 0
fy = 6x + 20y − 4 = 0
This one is more difficult because there are x’s and y’s in both equations. To solve we
multiply the first equation by −3 and add the two equations together:
−6x − 18y
= 0
6x + 20y + 4 = 0
2y − 4 = 0
thus y = 2. If we put this in the first equation we get that 2x + 12 = 0 or x = −6. So
f has one critical point at (−6, 2).
4. Find all critical points of f (x, y) = e−(x
2 +y 2 )
.
solution: We find the partial derivatives and set them equal to 0
fx = e−(x
2 +y 2 )
fy = e−(x
−(x2 +y 2 )
Since e
2 +y 2 )
(−2x) = 0
(−2y) = 0
can’t be 0, the only critical point we have is (0, 0).
Now that we know how to find critical points, we would like to classify them. For our
purposes, if (x0 , y0 ) is a critical point but neither a local max nor a local min we will say
that it is a saddle point. Then we have the following theorem
Theorem 7.1 Suppose f (x, y) is a function and that (a, b) is a critical point of f . Define
D = fxx (a, b)fyy (a, b) − [fxy (a, b)]2
Then
1. There is a local max at (a, b) if D > 0 and fxx (a, b) < 0.
2. There is a local min at (a, b) if D > 0 and fxx (a, b) > 0.
3. There is a saddle point at (a, b) if D < 0.
4. If D = 0, WHO KNOWS!?!?!
Example: Recall our first example f (x, y) = 2x2 + y 2 + 8x − 6y + 20. We had one critical
point at (−2, 3).
fx = 4x + 8
fy = 2y − 6
So
fxx = 4
fyy = 2
fxy = 0
So D = 4(2) − 0 = 8 > 0 and fxx > 0. Thus (−2, 3) is a local min.
Download