]> Function of many variables

Math Animated™
Mathematical Introduction for Physics and Engineering
by Samuel Dagan (Copyright © 2007-2020)

Chapter 3: Many Variables; Section 1: Differentiation; page 1

Home | Table of Contents | A-Z Index | Help

Previous topic: chapter 2 Integration, section 2 Definite Integrals, page 4 Geometrical Applications

Next topic: page 2 Partial Derivatives


Function of Many Variables

Basic notions

So far we have learnt about a function (dependent variable) of one independent variable. We are going now to extend this notion, by considering a function of many (more than one) independent variables, that can be written as

y=f( x 1 ,......, x n ) (3.1.1.1)

In this relation  y  is dependent on n independent variables  xk , where  k  takes the integer values from 1 to n ( n>1 ). The case where there are relationships between the  xk  will be covered in page 6 of this section. The notion of the inverse function of a single variable, where the independent and the dependent variables are interchanged, is no more applicable here.

Let's take the following physical example for the pressure (p) of a gas in a solid container. If the temperature (T) of the gas can be varied, the pressure becomes a function of the variable  T

p=p( T ) (3.1.1.2)

and one can also write the inverse function

T=T( p ) (3.1.1.3)

If the volume (V) of the container could also be varied (e.g expanded or contracted, by the aid of a piston), then the pressure becomes a function of two variables:

p=p( T,V ) (3.1.1.4)

where the temperature and volume can be modified independently one from the other. In such a case one can in principle form two different functions:

T=T( p,V ) V=V( p,T ) } (3.1.1.5)

but neither of them is called the inverse of (3.1.1.4).

As in the case of a single variable, a function of many variables can be single or multiple valued in its domain of definition.

Domain of a function

In the case of a single variable, a domain of a function is expressed as an interval of the variable. For a function of many variables, a domain is expressed as a region of the variables.

In order to clarify this point, let's look first at a function of two variables. It is very common to express the variables  x1  and  x2  as  x  and  y  accordingly, and the dependent variable as  z :

z=f( x,y ) (3.1.1.6)

The Cartesian coordinate system can be used for displaying the variables  x  and  y . A domain of the function could be expressed as a two dimensional region, covering an area of the coordinate system. The functions

z= 9 x 2 y 2 (3.1.1.7)

and

z= x 2 y 2 (3.1.1.8)

are used as examples in Fig.  Domain of a function , to illustrate the regions of their domains.

In this illustration, the domain of (3.1.1.7) represents a finite region of the (x, y) plane, while the region of (3.1.1.8) is infinite, without covering the whole plane. We'll meet also functions of two variables, with domains covering the whole (x, y) plane.

For a function of two variables, the boundaries of the domain (if they exist) are in general represented by one dimensional curves in the plane of the variables. For (3.1.1.7) and (3.1.1.8) the boundaries belong entirely to the domains, forming in this respect closed regions. In the case where the boundaries do not belong to the domain, the region is called open. There are also cases with boundaries belonging only partially to the domain.

For functions of three variables, the domains can be represented as three dimensional regions (volumes) and the boundaries - as two dimensional regions (surfaces).

For functions of more than three variables, the number of dimensions of the domains increases according to the number of variables. Their regions are not subject to a simple visualization.

Level lines

We often use topographic maps for studying a terrain. They help us, not only to find locations or to calculate distances, but also - the heights of different locations. Functions of two variables (3.1.1.6) can be simulated by a terrain: the variables form a horizontal plane, and the function  z  is the height. In other words, the values of  z  correspond to a third axis perpendicular to the (x, y) plane, having a direction toward the observer. The function is then represented by a curved or flat surface (a shell), instead of a single variable function represented by a curve.

In this three dimensional coordinate system, points corresponding to a constant height (z) form a curve, called a level line that can be plotted on the (x, y) plane, as we find on topographic maps. The level line is obtained by substituting the  z  of the function by a constant. Mathematically it represents the intersection of the function with the plane of constant  z .

The substitution of one of the variables (x or y) by a constant value represents the intersection of the function with a plane of constant value of that variable. This is not a level line, but it supplies also a visual picture.

The function (3.1.1.7) is studied in Fig. Level lines (1). It is shown there that (3.1.1.7) represents half of a spherical shell, with radius  r = 3 , with its centre at the origin. In order to obtain the whole sphere, the function should be double valued:

z=± 9 x 2 y 2 or x 2 + y 2 + z 2 =9 } (3.1.1.9)

The function (3.1.1.8) is studied in Fig. Level lines (2). It is shown there that (3.1.1.8) is a double conic shell, symmetric about the  x  axis, but the part with  z<0  is missing. In order to obtain the whole double cone, the function should be double valued:

z=± x 2 y 2 or x 2 y 2 z 2 =0 } (3.1.1.10)

Since the hyperbolas are conic sections, it is not surprising that the level lines are hyperbolas.

In the following example

z= xy 2 (3.1.1.11)

the domain of the function covers the whole region of the (x, y) plane. The expression  z = k  (constant), corresponds to a hyperbola as proven at (1.2.5.43). The function (3.1.1.11) is studied in Fig. Level lines (3). The geometrical surface represented by (3.1.1.11) is a hyperbolic paraboloid, with planar sections of hyperbolas and parabolas as shown in the figure.

A point where two intersections of planes, which are perpendicular to the (x, y) plane, form one minimum and one maximum of  z  and is called a saddle point. The point  x = y = 0  of (3.1.1.11) is a saddle point, which will be shown in more details later on this page.

Limit and continuity

In the case of  n  variables (independent), any point  p  is defined by a set of these variables:

p=( x 1 ,....., x n ) (3.1.1.12)

Any open region (n dimensional) that includes such a point is called a neighborhood of this point. If a function  f(p)  is single valued for all values of  p  in a neighborhood of a point p 0 , except for p 0 , we say that

lim p p 0 f( p )=L (3.1.1.13)

if for any sequence of points  p, converging to but not including p 0 , the corresponding sequence of the  f(p)  values converges to  L . This definition can be extended to closed regions, if the point p 0 is on the boundary of the function's domain.

A function is called continuous at point p 0 , if

lim p p 0 f( p )=f( p 0 ) (3.1.1.14)

For practical purposes, one iterates a limit by converging consecutively each one of the variables. If the limit depends on the order of the variables, the limit does not exist. However, if the limits are equal, there is no guarantee of the existence of the limit.

Another way for calculating the limit, is by approaching the point p 0 from different directions. If the limit depends on the direction, the limit does not exist. A test of just a few particular directions, does not guarantee, the existence of the limit.

In the following example the function is defined to be continuous for the whole plane (x, y), except at the origin (point  x = y = 0):

z= x 2 y 2 x 2 + y 2 (3.1.1.15)

Indeed for any point except for the origin, the denominator is finite, continuous and non-zero and the numerator is continuous and finite, guaranteeing continuity. For the origin, the nominator and the denominator vanish, and the limit should be tested.

The iterative approach gives:

lim y0 { lim x0     x 2 y 2 x 2 + y 2 }= lim y0 ( 1 )=1 lim x0 { lim y0     x 2 y 2 x 2 + y 2 }= lim x0 ( 1 )=1 } (3.1.1.16)

yielding a point of discontinuity at the origin. We could also calculate the limit by approaching the origin from different directions. The simplest way is to take straight lines passing through the origin:

y=kx=xtanφ k=tanφ=const } (3.1.1.17)

where the angle phi is called the azimuth, and the Cartesian coordinates x and y are equally scaled. . The substitution of  y  by  kx  yields

lim x0 x 2 k 2 x 2 x 2 + k 2 x 2 = 1 k 2 1+ k 2 =cos( 2φ ) (3.1.1.18)

showing that one can obtain at the origin an infinite number of values between -1 and 1. On the other hand any line (3.1.1.17), origin excluded, are the level lines of   z=cos( 2φ )=cos( 2φ )=cos( 2( φ+π ) ) .

This example is illustrated in Fig. Point of discontinuity.

3D coordinate system

In order to display graphically a function of two variables, we chose to add the axis of the dependent variable  z, perpendicular to the known (x, y) axes in a direction toward the observer. Such a three dimensional coordinate system is called right handed, because one can spread the first three fingers of the right hand in an orthogonal manner, so that the thumb (x) and the index (y) remain in the same plane as the palm of the hand, and the middle finger (z) is perpendicular. If the  z  axis was chosen in the opposite direction, a left handed coordinate system would be obtained.

In the case of a two dimensional coordinate system, we saw already, that a right-handed system can be inverted to a left-handed coordinate system, by the use of a rotation in three dimensions. In the case of a three dimensional coordinate system, a right-handed system cannot be inverted to a left-handed coordinate system by a rotation in three dimensions. Theoretically this can be achieved, by the use of a rotation in four dimensional space, which unfortunately we cannot visualize. As in the case of two dimensions, the inversion also can be achieved by a mirror reflection.

There are more than one permutations (ordering of objects) of the coordinate axes that yield a right-handed coordinate system. By repeating the order of the coordinates: ( x,y,z,x,y,z,... ) , any permutation of the three consecutive coordinates there is called a cyclic permutation of ( x,y,z ) , namely:

( x,y,z ),   ( y,z,x )   and   ( z,x,y ) (3.1.1.19)

Any cyclic permutation of ( x,y,z ) yields a right-handed coordinate system. Any such cyclic permutation can be obtained from the other one by rotation.

For a planar coordinate system, we defined the rotation about the origin, as an angle. In a three dimensional coordinate system, we'll define a rotation as an angle about an axis, passing through the origin. Only if the axis has a direction, one can define unambiguously the sense of rotation. For an axis with a given direction, we define a positive sense of rotation, according to the following right-handed rule: Close the right hand in a fist, without using the thumb. The stretched thumb points to the direction of the axis, and the rest of the fingers define the positive sense of rotation. In order to define any possible rotation, one has to choose three independent axes of rotation (not necessarily the axes of the Cartesian coordinates). The three axes are independent, if they represent different lines, and are not coplanar (situated in one plane). Two consecutive rotations about different axes are not commutative, meaning that the resulting rotation depends on the order of the two rotations.

It is generally accepted to use the right-handed coordinate system, and if not stated otherwise, this system will be used. Since we are restricted to a two-dimensional display, we'll be able to see only a two-dimensional projection. We are not going to use only the projections perpendicular to the  z  axis, as in the case of the level lines, but also any other orientation of the projection plane, subjected to our needs. In particular, since  z  is used as the function, projections where the  z  axis appears pointing upwards are very common. This is illustrated in the interactive Fig. Orientation in 3D.

As seen from this illustration, the projected three dimensional orthogonal Cartesian system on a plane, is accompanied by a separate linear scaling of each coordinate axis. However this is of no importance, since as we know from functions of one variable, we can always rescale the coordinates.

Displaying functions of two variables

We just saw a few planar projections of a three dimensional coordinate system, where the projection of the  z  axis appears vertically upwards. The graphical display of a function with two variables (3.1.1.6), within such a projection, especially when rotated about the  z  axis, generally speaking, gives the best visual perception of the function.

The presentation of a point in space for such a given Cartesian coordinate system is shown in Fig. Point in 3D.

For a better visual display of a function, one uses intersections of the function with the planes of constant variables (x and y). Projected at the (x,y) plane these planar sections form an orthogonal grid of straight lines without any information of the function. In 3D this grid takes the shape of the functional surface, and by rotating the coordinate system the projection gives a visual perception of the function.

We already used the function (3.1.1.11) in Fig. Level lines (3), for displaying its hyperbolic level lines. As a consequence, we were able to define, and visualize the saddle point at the origin. A much better visual effect can be obtained from the projection of the function together with the 3D coordinate system, with a vertically projected  z  axis. For this purpose, the curves corresponding to the intersections of the hyperbolic paraboloid (3.1.1.11) with the planes of constant  x  (x = xc) and of constant  y  (y = yc) are used

z= xy 2 x= x c z= x c 2 y y= y c z= y c 2 x } (3.1.1.20)

In this particular case the planar sections (3.1.1.20) are straight lines with different directions, but in general their shapes are more complicated.

The notation for the coordinate axes that was used in Fig. Orientation in 3D, is used also for the animation in Fig. Saddle point, showing clearly the saddle point of (3.1.1.11).

Curves in space

In the case of a single variable, we also presented functions in a parametric form, where both the independent and the dependent variables are functions of a parameter  p :

{ x= f 1 ( p ) y= f 2 ( p ) } (3.1.1.21)

In this way the difference between the dependent and independent variables is not visible, and the geometrical notion of a curve is more appropriate than that of a function. We can say therefore that the expression (3.1.1.21) is of a curve in two dimensions.

The extension of such a representation to three dimensions is

{ x= f 1 ( p ) y= f 2 ( p ) z= f 3 ( p ) } (3.1.1.22)

The expression (3.1.1.22) represents a curve in three dimensions, and not a function of two variables (a surface). This is so, since for a single value of the parameter we obtain a point (in three dimensional space), and not a curve, as one should expect for a function of two variables.

One could continue and extend this kind of presentation to an  n  dimensional space with a single parameter:

x k = f k ( p )fork=1,...,n (3.1.1.23)

By using similar arguments, one can state that the presentation (3.1.1.23) is of a curve in  n  dimensional space.

The simplest presentation would be that of a straight line. In  n  dimensional space this is given by the  n  linear relations

x k = α k p+ ξ k fork=1,...,n (3.1.1.24)

where  p  is an unbounded parameter,  αk  and  ξk  are constants, and  xk  are the coordinates. Any projection of (3.1.1.24) on a plane (xj,xk, where xjxk) represents a straight line, which proves that (3.1.1.24) represents also a straight line.

There is one restriction: at least one  αk  value should be none-zero (otherwise the line degenerates to a point).

Physical dimensions

It is self evident that also multivariable functions expressing physical relations should obey the rules of physical dimensions.

As an example the function (3.1.1.4) can represent the state of an ideal gas, assuming pointlike non-interacting molecules

pV=NkT where{ p=   pressure V=   volume T=   absolute temperature N=   number of molecules k=   Boltzmann constant } (3.1.1.25)

By using the same notation for physical dimension as in chapter 1, we have on the left-hand side of (3.1.1.25)

[ p ]= [ force ] [ area ] = ΜΛ Θ 2 Λ 2 [ V ]=[ volume ]= Λ 3 }[ pV ]=Μ Λ 2 Θ 2 =[ energy ] (3.1.1.26)

On the right-hand side of (3.1.1.25)  N  is a number without dimensions. By defining a new dimension for the absolute temperature denoted by  Τ , one obtains

[ T ]=Τ [ k ]= Μ Λ 2 Θ 2 Τ }[ kT ]=[ energy ]   per molecule (3.1.1.27)

Without going into detail, the Boltzmann constant  k  is universal, has a physical interpretation, and its value is experimentally measurable. From (3.1.1.25), the function (3.1.1.4) becomes

p=p( T,V )= NkT V (3.1.1.28)

If we define the density of a gas by the number of molecules per unit volume   N V ,  for dense enough gases one has to correct for the volume of the molecules and for the contribution of their interaction on the pressure. The corrected equation of state bears the name of van der Waals, and (3.1.1.28) becomes

p=p( T,V )= NkT V c 1 N c 2 ( N V ) 2 = ρkT 1 c 1 ρ c 2 ρ 2 whereρ= N V } (3.1.1.29)

The constants  c1  and  c2  can be found experimentally. Contrary to the Boltzman constant, they depend on the volume of the molecules and on the strength of interaction among them, therefore they depend on the nature of the gas and are not universal.  c1  represents the volume of a molecule, and has the appropriate dimensions.  c2  has more complicated dimensions, and measures the interaction's strength between two molecules. These constants can be compared for consistency with the appropriate values, based on different physical relations and experiments.

Exercises

Exercise 1. For the following functions f 1 ( x,y )=( x 2 + y 2 )sin( 1 xy ) f 2 ( x,y )=( xy )sin( 1 x 2 + y 2 )

Exercise 2. For the function z= xy x+y

  1. Find the level lines corresponding to the z values: 0, ±1, ±2 .
  2. Make a sketch of the results in the (x,y) plane.
  3. Find the locations of discontinuity and/or divergence to infinity, and add them to your sketch!
  4. What is the domain of the function f( x,y )=acos( xy x+y )

Exercise 3. For the function z= x 2 + y 2

  1. Find the curves, corresponding to constant values of z = zc.
  2. Sketch the level lines of the function for  z = 0,1,2,3.
  3. What are the sections with the planes  x = 0  and  y = 0 ?
  4. What is the geometrical surface, corresponding to this function?

Exercise 4.

  1. Sketch the surfaces obtained by the revolution of the hyperbola

    x 2 y 2 =1 about x and about y!
  2. Both surfaces are called hyperboloid, but one of them is "of one sheet" and the other - "of two sheets". Match them according to their names!
  3. In three dimensions the surfaces are written as ( a ) x 2 y 2 + z 2 =1 ( b ) x 2 y 2 z 2 =1 Prove that this is correct ! Which of them is of one sheet ?

  4. The hyperboloid of one sheet, expressed as z=z( x,y ) , has a saddle point at x=y=0. Draw the level lines for the z values of 0, 1, 2, and check the consistency with this saddle point.

Exercise 5. The following relations are given in three-dimensional space, where r, ω and v are positive constants, and t is a none negative parameter.

{ x=rcos( ωt ) y=rsin( ωt ) z=vt }
  1. Describe the geometrical form!
  2. If t represents time, what are the physical dimensions and the meanings of the constants r, ω and v ?
  3. What is the geometrical meaning of 2πv/ω ?

Previous topic: chapter 2 Integration, section 2 Definite Integrals, page 4 Geometrical Applications

Next topic: page 2 Partial Derivatives

Home | Table of Contents | A-Z Index | Help