f(x, y)

MULTIVARIABLE FUNCTIONS
Functions of Two Variables
• Definition: f (x, y) is a function of two variables
if a unique f value is given for each (x, y) ∈ D,
with D = {(x, y) | f (x, y) exists }, domain for f ;
the set of all f values is called the range of f .
Examples:
a) if f (x, y) = x2 + xy − cos(xy), find domain, range,
f (1, 1), f (2, 1);
p
b) if f (x, y) = x y 2 − 1, find domain, range,
f (1, 4), f (2, 0);
MULTIVARIABLE FUNCTIONS CONT.
• Graphing 2-D functions: use z = f (x, y) and plot
(x, y, z) points using standard xyz coordinate system;
octants have +++, -++, ..., - - -, sign combinations;
graph of z = f (x, y) is called a surface;
intersections with xy, xz, and yz planes are traces;
level curves are graphs of k = f (x, y), constant k.
2
MULTIVARIABLE FUNCTIONS CONT.
Matlab plots surfaces and level curves (contours):
e.g. ezsurf(’sqrt(x2 + y 2 + 4)’), view([135,30])
sqrt(x2+y2+4)
9
8
7
6
5
4
3
2
−6
−6
−4
−4
−2
−2
0
0
2
2
4
4
6
6
x
y
ezcontour(’sqrt(x2 + y 2 + 4)’).
sqrt(x2+y2+4)
6
4
y
2
0
−2
−4
−6
−6
−4
−2
0
x
3
2
4
6
MULTIVARIABLE FUNCTIONS
• Some common equations and graphs:
plane: xy−, xz−, and yz− traces are triangles
ax + by + cz = d;
Examples:
a) 2x + 3y + z = 6
( ezsurf(’6-2*x-3*y’,[0 3 0 2]),view([135,30]) )
6−2 x−3 y
6
4
2
0
−2
−4
−6
0
0
0.5
0.5
1
1
1.5
2
1.5
2.5
2
y
4
3
x
MULTIVARIABLE FUNCTIONS
b) z − 2x − 3y = 6 ( ezsurf(’6+2*x+3*y’) )
6+2 x+3 y
40
30
20
10
0
−10
−20
−30
6
4
6
2
4
0
2
0
−2
−2
−4
−6
y
−4
−6
x
5
MULTIVARIABLE FUNCTIONS
paraboloid: xz−, and yz− traces are parabolas,
xy− traces ellipses.
x2 y 2
z = 2 + 2;
a
b
Example: z = 4x2 + y 2
Matlab: ezsurf(’4 ∗ x2 + y 2’,[-3 3 -6 6])
4 x2+y2
70
60
50
40
30
20
10
0
6
4
3
2
2
0
1
0
−2
−1
−4
−2
−6
y
6
−3
x
MULTIVARIABLE FUNCTIONS
2
2
4 x +y
70
60
50
40
30
20
10
0
6
4
3
2
2
0
1
0
−2
−1
−4
y
−2
−6
−3
x
Matlab: ezsurfc(’4 ∗ x2 + y 2’,[-3 3 -6 6])
7
MULTIVARIABLE FUNCTIONS
ellipsoid: xy−, xz−, and yz− traces are ellipses
x2 y 2 z 2
+ 2 + 2 = 1;
2
a
b
c
2
Example: z 2 + x4 + y 2 = 1
ezsurfc(’sqrt(max(1-x^2/4-y^2,0))’,[-2 2 -1 1])
hold on, axis([-2 2 -1 1 -1 1])
ezsurfc(’-sqrt(max(1-x^2/4-y^2,0))’,[-2 2 -1 1])
title(’z^2 + 4*x^2 + y^2 = 1’)
z2 + 4*x2 + y2 = 1
1
0.5
0
−0.5
−1
1
2
0.5
1
0
0
−0.5
y
−1
−1
8
−2
x
MULTIVARIABLE FUNCTIONS
hyperbolic paraboloid:
xz−, and yz− traces are parabolas.
x2 y 2
z = 2 − 2;
a
b
Example: z = 4x2 − y 2,
Matlab: ezsurfc(’4 ∗ x2 − y 2’,[-3 3 -6 6])
2
2
4 x −y
40
30
20
10
0
−10
−20
−30
−40
6
4
3
2
2
0
1
0
−2
−1
−4
y
−2
−6
−3
9
x
MULTIVARIABLE FUNCTIONS
1/2-sheet hyperboloid: xz−, yz− traces are hyperbolas
x2 y 2 z 2
+ − = ±1;
a2 b2 c2
Example: z 2 = 1 + 4x2 + y 2
ezsurf(’-sqrt(1+x^2/4+y^2)’,[-4 4 -2 2])
hold on, axis([-4 4 -2 2 -3 3])
ezsurf(’sqrt(1+x^2/4+y^2)’,[-4 4 -2 2])
sqrt(1+x2/4+y2)
3
2
1
0
−1
−2
−3
2
4
1
2
0
0
−1
−2
−2
y
10
−4
x