Part 1: Functions of 2 Variables

In the last chapter, we extended differential calculus to vector-valued functions. In this chapter, we extend calculus to functions of two variables, which are functions like f(x,y) = x2 + y2 and g( x,y) = sin(x) cos(y) .

In particular, a function of 2 variables is a function whose inputs are points ( x,y) in the xy-plane and whose outputs real numbers. We often denote functions of 2 variables by f( x,y) , which means "the output from an input of ( x,y) ,'' and we often define these functions in the form
f( x,y) = "expression in x and y"
Equivalently, we can consider f( x,y) to be the assignment of a real number to a point ( x,y) in the xy-plane.       

EXAMPLE 1    Evaluate f( 1,2) and f(2,5) if f( x,y) = x2+2xy       

Solution: To begin with, f( 1,2) = 12+2·1·2 = 5, which is to say that f( x,y) = x2+2xy maps the point ( 1,2) to the number 5. Likewise, f(2,5) = 22+2·2·5 = 24.

       

The graph of f( x,y) is the set of points in R3 that satisfy z = f( x,y) . That is, the graph of f(x,y) is the surface z = f( x,y) and the output z is the height of the surface at the point ( x,y) .

A graphing calculator or computer algebra system is often used to produce an approximation of the graph of a function.

EXAMPLE 2    Use a computer algebra system to graph the function f( x,y) = x2+y2 for x and y in [-1,1] .    

Solution: The graph of f(x,y) = x2 + y2 for x and y in [-1,1] is by definition the set of all points (x,y,z) with x in [-1,1],  y in [-1,1], and  z =  x2 + y2 . This set of points forms the surface which is shown in the four different types of plots below. A patch plot shows only the surface, while a patch and grid plot shows the graph along with a grid of curves on the surface.
              
Patch Plot Patch and Grid
A contour plot shows the surface along with horizontal cross-sections at various heights. A wireframe plot shows only a grid of curves on a surface. 
              
Contour Wireframe

We often let x = á x,y ñ be the position vector of a point in the xy-plane, and then we write
f( x) = f( x,y)
This allows us to use vectors to define functions of 2 variables.        

EXAMPLE 3    What function f( x,y) is represented by
f( x) = || x ||2
Solution: Since x = á x,y ñ , we have
f(x,y) = || á x,y ñ ||2 = x2 + y2

   

Note: We will often use the bolded first letter of a vector of variables to denote the vector. For example, we write
x = á x,y ñ ,    p = áp,q ñ ,  v = á v1,v2,v3 ñ,  and so on

Check your Reading: How is z = x2+y2 related to example 2?