Beruflich Dokumente
Kultur Dokumente
Introduction
= f (x). However,
7.1.2
Example
1 x2 y 2.
x y if x > y,
y x if x < y,
f (x, y) =
1
if x = y .
7.1.3
Geometric Representation
Graphs of functions of two variables
Example
Example
..
.........
...
.
.
.
.
.
.
.
.
.
.
.
... .........................
.
.
.
.........
............
...
........
......
.
.
.
...
.
...
...
...
.
..
...
....
.
...
....
...
.
.
.
.
... ....
.......
.
.
.
.
.
.
.
.
.
.
.
.
.
... ........
.. ..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...............................................
..
...
..
.
...
...
.... ... .... ... ... ... .....
... ......... ..
.... .....
..
... ..
.
.
.
....
......
.
..
......
.....
..
...........
.
.......
... .................... . ............................
............
...
..
...
...
.
...
..
..
....
...
.
.
.
....
.
......... .. ...........
.............................................................................................
.
...
.
.
....
....
...
...
.
.
....
.....
........
7.3
Partial Derivatives
Example
d
f (x, b)
dx
x=a
f (a + h, b) f (a, b)
= lim
h0
h
f
it by
or fx(a, b).
x (a,b)
7
d
f (a, y)
dy
f (a, b + h) f (a, b)
h0
h
= lim
y=b
and is denoted by
f
or fy (a, b).
y (a,b)
If we let z = f (x, y), we also write
fx =
z
,
x
and fy =
z
.
y
7.3.3
Example
d
d 3
f (x, y) =
(x + y) cos (y 2)
dy
dy
10
7.3.4
Geometric interpretation
...
.
........
..
....
..
........
...
.
..
.
..
.....................................................................................
...
...............................
...................
..
...
.
..........
....
.....
......
...
... ....
...
.......
..
.
.
...........
.
.......
.
.
.
.
.
.
.
.
.
.
.
.
.
..........
..
...
.......
.....
...
......
....
..... ..
....
......
..
....... ....
...
.....
1
.
.
.
.
.
.
...
.
.
.
.
..
... . ..
..
....
...
............................................................................................
...
...
.............................
...
...
......................
..
...
..
..
..
...
..
..
..
...
..
..
..
....
..
.
....................................................................
.
.
...................................... ...
..
.
.
.......................................
..
.
......................................
..
.
........................................
..
....
..........
...
.
.
....
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
..
...
.
.
.
.
.
.
....
.....
...
...
...
...
...
...
.
.
.
.
.
.
.....
...
........
f (a, b)
z = f (x, y)
(a, b)
the line y = b
10
11
...
........
....
....
....
...
...
...
.
.
..
.
..
..............................................................................................
............................
.................
...
..
.........
..
.........
.....
........
.
.
.
...
.
.
.
.
........
.
.
.
...
.
.
.
.
.
.......
...........
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
...........
.
.
.
.
.
.
.
.
.
.
.
.
........
..
........................... ..
..
.......
....
..
......
...
....
...
......
..
..
2
....
...
.
.
.
.
.
...
.
.
.
..
..
..
...
.............................................................................................
...
...
.............................
...
..
.....................
..
...
..
..
..
...
..
..
..
...
..
..
..
.....
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
......................................
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...................................... ...
..
.
.
.
.
.
.
.
.
.
..
..............................................................................
.
.
.......................................
..
...
....
....
.
.
.
...
...
...
.
.
.
.
..
.
.
.
.......................................
........
....
...
...
....
.
.
.
.
........
f (a, b)
(a, b)
x
Similarly, fy (a, b) is just the gradient of the tangent
line at (a, b) of the curve C2 traced out as the image
of the line x = a under f .
7.3.5
12
2f
= (fx)x = 2
x
2f
= (fy )x =
xy
fxy
fyy
2f
= (fx)y =
yx
2f
= (fy )y = 2 .
y
2z
= 2
x
fxy
2z
=
yx
fyx
2z
=
xy
Example
fxx = 24x + 2y 3,
fxy = 6xy 2.
fyy
2z
= 2.
y
13
7.3.7
Mixed Derivatives
(1)
Example
ey
Let f (x, y) = xy + 2
. Find fyx.
y +1
Solution:
14
7.3.9
For functions of three or more variables, we have similar definitions and notations for partial derivatives.
For example, for functions of three variables f (x, y, z),
we fix two of the variables and differentiate with respect to the third one.
fx, fy ,
7.4
fz ,
or
f f f
,
,
.
x y z
Chain Rule
15
w = w(t),
h = h(t). Clearly, a
16
7.4.1
7.4.2
dz
.
dt
Solution:
dz z dx z dy
=
+
dt x dt y dt
= (3y 2 + 4x3y)(2 cos 2t) + (6xy + x4)( sin t).
16
17
7.4.3
and
z f x f y
=
+
t x t y t
Example
18
7.4.5
Chain rules can be extended in a similar way for functions of three or more variables.
For example, suppose w = f (x, y, z) is a function of
three variables x, y and z, and x = x(t), y = y(t),
z = z(t) are functions of t. Then w is a function of
t:
7.4.6
Example
19
Hence
V
V
V
= wh,
= `h,
= `w.
`
w
h
By chain rule,
V d` V dw V dh
dV
=
+
+
dt
` dt w dt
h dt
d`
dw
dh
= wh + `h
+ `w
dt
dt
dt
We are given, at time t0,
` = 2 m, w = 3 m, h = 4 m,
while
dw
dh
d`
= 5 ms1,
= 5 ms1 and
= 6 ms1.
dt
dt
dt
Hence
dV
= (3)(4)(5)+(2)(4)(5)+(2)(3)(6) = 64 m3s1.
dt
19
20
7.4.7
Directional Derivatives
Extension of Partial Derivatives
21
Note that Dif (a, b) = fx(a, b) and Djf (a, b) = fy (a, b),
where i and j are the standard unit vectors of the xyplane.
21
22
7.5.2
Geometrical meaning
..
.........
....
...... ... ...
..
... ... ... .
..
...
.. .....................................................
..
...
.. ......................... ... ... ... ... ... ... . ............................
...
.. ... ... ..
...
..............
. ... ... ... ...................
.
.
.
.
...
........
.....
..
........
...
.... ...
.
.......
.
..
...
.
.................................
.......
...
..
..
................................
.......
..
...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
.
.
.
.
.
.
.
.
.
.
.
.
.
......
....................................................................................................................................................... ..
..
.
...
......
.
.............................................................................................................................................. ...........
..
..
.
...
.
.
............................................................................................................................................................... ..
........
.
.
...
.
.
........
.
.............................................................................................................................................................................
.
.
.
.
.
.
.
...
.
.
.
...
.......................................................................................................................................................................................... C
.
.
.
.
.
.
..
.
.
.
.
...
.........................................................................................................................................................................................................................................................................................
...
.......
... ...............
..
................................................................................................................................................................................
......
.. ...........
....................................................................................................................................... ..........
...
.........
................................................................................................................................................................................. ....
...
..............................................................................................................................................................................................................................
...
....................................................................................................................................
...
...........................................................................................................................................................................................................................
...
..............................................................................................................................................................................
...
....................................................................................................................................
...
...........................................................................................................................................................................................................................
..
...................................................................................................................................
...
...............................................................................................................................................................................
...
.
.
.
.
.
..............................................................................................................................................................................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
......................................
...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
........................................................................................................................................................................................................................................................................................
..
.....
.
.
.
..
.........................................................................................................................................................................................................................................................................
.
.
..........................................................................................................................................................................................................................................................................
...
...............................
...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
................................................................................................................................
..
...............................................................................................................
....
..........................................................................................
...
.............................................................................................
....
.
.
........................................................
..
.
.
.
...................................
....
......................
....
...
...
.
.
....
......
.........
z = f (x, y)
(a, b)
22
23
7.5.3
A formula
y = b + u2t,
z = 0,
.
dt
x dt
y dt
Thus,
Duf (a, b) = fx(a, b) u1 + fy (a, b) u2.
7.5.4
Example
3
1
u=
i + j.
2
2
23
24
3
1
36
Duf (2, 1) = (1)( ) + (6)( ) =
.
2
2
2
24
25
Gradient Vector
In view of the expression of the directional derivative
in terms of partial derivatives, it is convenient and
useful to introduce the notion of a gradient vector.
The gradient of f (x, y) is the vector (function)
f = fx i + fy j.
For a given unit vector u = u1i + u2j, we obtain
f (a, b) u
= (fx(a, b) i + fy (a, b) j) (u1i + u2j)
= fx(a, b) u1 + fy (a, b) u2
= Duf (a, b).
Thus,
Duf (a, b) = f (a, b) u.
25
26
(2) The function f decreases most rapidly in the direction f (a, b).
26
27
p
Example. Let f (x, y) = 9 x2 y 2. Find the
largest possible value of Duf (2, 1).
Solution.
fy = p
y
9
x2
y2
1
j.
2
2
1
5
(1)2 +
=
.
2
2
27
28
Let
u =
f (2, 1)
2
1
= i j.
||f (2, 1)||
5
5
1
1
2
+
= (1)
2
5
5
5
=
.
2
7.5.5
Physical meaning
28
29
the vector u:
df = Duf (a, b) dt.
7.5.6
Example
29
30
Therefore,
1
1
8
Duf (2, 1) = (4)( ) + (12)( ) = .
2
2
2
So
8
df = Duf (2, 1) dt = ( )(0.1) 0.57.
2
So the value of f decreases by approximately 0.57
unit.
7.5.7
30
31
32
....................................
. .
.........
.............. ...... ... ... ...................
..
...........................
.
.
.
.................................... ......
.. ..
.
...
..
.
.
.
..
...
..
...
.
.
...
.
.
.
.
.
..
.
.
.
.
.. ..................................................................................... ....
.
.
.
............
.
.
.
.
.
.
.
.
.
.
.
.
..
....
..
......
.
..
........
...
.
................
........
............................................................................
7.6.2
Critical Points
33
Example
point.
So we solve fx(x, y) = 0 and fy (x, y) = 0.
fx = 2x + 4 = 0 x = 2
fy = 2y 8 = 0 y = 4.
This gives a solution (x, y) = (2, 4).
Is this point a local maximum, a local minimum, or
none?
33
34
Example
......
...... ...
... ... .....
.... .... ......
.
.
... .. ....... ... ... .....................
...... ............
................... . ..
....... ........
........... ........... .....
......... ...
.......
.
.
...............
............................
....
.
.
...
.
.
...
..
.
.
.......
.
.
.
.
.
.
.......
.......................
.
.
.
.
.
.. ....
........................
...............................................
7.6.5
Saddle points
35
Example
36
.
.......
...
............
.. .....
........
......... ....
.. ....
.
.........
.
..
.
.
.
..
...
.
.
.
.
.
.. ......
..
.....
....
...
. ........ ..
.....
...
..
...
.. ......
.............
...
..
.. ..................... ....
..................... ..
.
.
..
..
..
.. ...
.....
...
..
..
..
.. ...
...
..
...
..
... ....
..
...
...
..
...
.
.
..
.
.
.
.
.. ...
...
..
..
... ..
..
.....
..
..
...
..
... ...
...
..
...
...
.
.
..
.
...
..
.
...
.... ..
.
.
.
..
..
.
.
.
.
...... .. ......
.
.
..
.
.
.
.
.
.
.
.............................................................................................................................
.
.
...
.
...
.
..
..
... ..
.
.
.
.
.
..
..
.
..
.. ....
.
.
.... ..
..
............
... ..
..............
..
..
.
.
.
.
.
.
.
.. ... .............. . ..
.
.
.
.
.
.
.
...
.
.
. ... .
..
.
... ....... ... ... ... .... ... ... ... ... ..
..
...
..
..
...
..
..
..
.
.................................................................................................
.
.
...
.
................ ....
....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..............
....
...
................ .........
z = 2y 2 3x2
36
37
7.6.7
38
7.6.8
Example
fy = 3y 2 6y = 0.
On solving, we obtain x = 0 or 2 and y = 0 or 2.
Therefore, the critical points are (0, 0), (0, 2), (2, 0)
and (2, 2).
To apply the second derivative test, we compute the
second order partial derivatives.
fxx = 6x + 6,
fyy = 6y 6,
fxy = 0.
2
Thus D(x, y) = fxxfyy fxy
= 36xy36x+36y36.
39
39
40
7.6.9
Lagrange Multipliers
Many optimization models are subject to certain constraints. For example, production levels depend on
labour input and capital expenditure. With a given
budget (constraint), a manufacturer aims to maximize production. The method of Lagrange multipliers is illustrated below.
7.6.10
Example
40
41
41
42
100
2
=
= 4
25
= 2
6
8
If = 2, then x = = 3, y =
= 4 and
2
2
z = f (3, 4) = 12(3) 16(4) + 50 = 150.
8
6
= 3, y =
= 4 and
If = 2, then x =
2
2
z = f (3, 4) = 12(3) 16(4) + 50 = 50.
Thus, subject to the constraint x2 + y 2 = 25, the
function z = f (x, y) = 12x 16y + 50 attains:
(1) a local maximum of z = f (3, 4) = 150; and
(2) a local minimum of z = f (3, 4) = 50.
42