Recall that a function f from a set U to a set V is a rule that assigns, to each xU, one and only one element yV. We call x the independent variable and y the dependent variable. We express it by writing  y=f(x). The sets U and V are called the domain and co-domain of f, respectively. To mention that f is a function with the domain U and the co-domain V, we write f:UV. In the calculus of a single variable, U and V are subsets of R. In this chapter, we deal with functions where U is a subset of Rn.

Definition: A function f:UR where URn is a rule that assigns one and only one real number to each point x=(x1,,xn) of U.

In a concise fashion, we may also write f:URnR. When n>1, the function f is called a real-valued function of a vector variable or simply a scalar field. In most of the examples in this chapter, n is 2 or 3. When n=2, the independent variables are often denoted by x and y (or sometimes by x1 and x2), the dependent variable by z, and we write z=f(x,y). When n=3, the independent variables are denoted by x, y and z (or by x1, x2 and x3) and the dependent variable by another letter from the end of the alphabets like u or w. In the most general case, we write y=f(x1,x2,,xn) or y=f(x); here y is the dependent variable.

Elementary examples of multivariable functions

When the domain of a function y=f(x1,x2,,xn) is not specified explicitly, we assume its domain is the set of all possible points in Rn at which f produces real values. This set is called the natural domain or simply the domain of the function. The set of all possible outputs of the function is called the range of the function.

Example 1

Let f(x,y)=1x2y2. Find the natural domain of f.

Solution

The expression under the square root cannot be negative, and because it appears in the denominator it cannot be zero. Thus the domain consists of all points (x,y) such that x2y2>0; that is,
y2<x2,or|x|<y<|x|. The domain of f is shaded in the following figure. The dashed lines in this figure are not included in the domain.

Example 2

Let f(x,y)=ln(xy1). Find the natural domain of f.

Solution
The function f produces real values if the argument of the logarithmic function, which is here xy1, is positive. Hence, the domain of f consists of all points (x,y) such that xy>1, which is equivalent to
{y>1xif x>0y<1x if x<0
The domain of f is shaded in the following figure.

Example 3

Let f(x,y)=arcsin(x+y). Find the natural domain of f.

Solution

Because 1sinx1, arcsinu is defined when 1u1. Therefore, we must have
1x+y1or1xy1x; that is, y must be between the two lines y=x+1 and y=x1. The domain of f is the shaded area between the two lines in the following figure.

Example 4

Let f(x,y,z)=9x2y2z2. Find the natural domain of f.

Solution

The expression under the square root must be non-negative; that is, 9x2y2z20 or x2+y2+z29. Notice that x2+y2+z2=9 is the equation of a sphere of radius 3 centered at the origin. Therefore, the domain of f consists of all points on or within this sphere (See the following figure).

 

   Composition of functions

If g is a function of one variable and f is a function of three variables, then the composition of g and f, gf, is the function of three variables defined by
gf(x,y,z)=g(f(x,y,z)). The domain of gf consists of all points (x,y,z) in the domain of f such that f(x,y,z) is in the domain of g. The extension of this to functions of several variables is easy. Let f be a function of n variables and g be a function of a single variable, then
gf(x1,,xn)=g(f(x1,,xn)) and the domain of gf is the set of all points (x1,,xn) in the domain of f such that f(x1,,xn) is in the domain of g.

Example 5

Given g(t)=ln(3t) and f(x,y,z)=x2+y2+z216, evaluate gf(2,2,3) and find the domain of gf.

Solution
gf(2,2,3)=g(f(2,2,3))=g(22+(2)2+3216)=g(1)=ln(31)=ln2

The domain of f is the set of all points (x,y,z) in R3 such that x2+y2+z2160, and the domain of g is the set of all t in R such that 3t>0; that is the domain of g is the interval (,3). Therefore, the domain of gf is the set of all points (x,y,z) in R3 such that
(i)x2+y2+z216, (ii)andx2+y2+z216<3. We can simplify (ii)
x2+y2+z216<3x2+y2+z216<9 or
(iii)x2+y2+z2<25. As (i) and (ii) must both hold, the domain of gf is the set of all (x,y,z) such that
16x2+y2+z2<25, which is the set of all points between a sphere of radius 5 and a sphere of radius 4 both centered at the origin plus the points on the latter sphere.

In a similar way, if r:IRRn is a vector-valued function and f:URnR, the composite function fr is a function from I{t| r(t)U} to R, and is defined by fr(t)=f(r(t)).

Composite function fr(t)=f(r(t))

 

 

Example 6

Noting that r(θ)=(cosθ,sinθ) for 0θ<2π gives a circle of radius 1 and centered at the origin,
(a) find the distance from the points on that circle to the point (2,23)
(b) find the closest point on that circle to the point (2,23).

Solution

(a) Distance from the point (x,y) to the point (2,23) is given by
f(x,y)=(x2)2+(y23)2; therefore, the distance of the points on the circle of radius 1 centered at the origin is
f(r(θ))=(cosθ2)2+(sinθ23)2

(b) We want to minimize the function h=fr, which is a function of a single variable θ. Thus, we can use the method of optimization for functions of one variable. In other words, h has minimum either at its critical points, where h(θ)=0 or at the end points where θ=0 and θ=2π.

h(θ)=2sinθ(cosθ2)+2cosθ(sinθ23)2(cosθ2)2+(sinθ23)2

h(θ)=02sinθ(cosθ2)+2cosθ(sinθ23)=0

or4sinθ43cosθ=0

[Note that it follows from 1cosθ1 that (cosθ2)2>0, so the denominator of h(θ) is never zero and hence h(θ) always exists. Similarly we can argue that h is always differentiable because (sinθ23)2>0.]

Obviously when θ=0 or θ=π at which cosθ=0, we have h(θ)0. So we can assume cosθ0, and divide both sides of the above equation by cosθ:
4sinθ43cosθ=0tanθ=13θ=π6 or π+π6.

Therefore, we should check the points θ=π6, π+π6, 0, 2π. You can verify that when θ=π6, the distance is minimum and the closest point on the circle is r(π6)=(cosπ6,sinπ6)=(32,12).