Our first step is to explain what a function of more than one variable is, starting with functions of two independent variables. This step includes identifying the domain and range of such functions and learning how to graph them. We also examine ways to relate the graphs of functions in three dimensions to graphs of more familiar planar functions.

## Functions of Two Variables

The definition of a function of two variables is very similar to the definition for a function of one variable. The main difference is that, instead of mapping values of one variable to values of another variable, we map ordered pairs of variables to another variable.

Definition: function of two variables

A *function of two variables *(z=(x,y)) maps each ordered pair ((x,y)) in a subset (D) of the real plane (
m I!R^2) to a unique real number (z). The set (D) is called the domain of the function. The range of (f) is the set of all real numbers (z) that has at least one ordered pair ((x,y)∈D) such that (f(x,y)=z) as shown in Figure (PageIndex{1}).

Determining the domain of a function of two variables involves taking into account any domain restrictions that may exist. Let’s take a look.

Example (PageIndex{1}): Domains and Ranges for Functions of Two Variables

Find the domain and range of each of the following functions:

- (f(x,y)=3x+5y+2)
- (g(x,y)=sqrt{9−x^2−y^2})

**Solution**

a. This is an example of a linear function in two variables. There are no values or combinations of (x) and (y) that cause (f(x,y)) to be undefined, so the domain of (f) is ( m I!R^2). Written in set-builder notation, this could be written as, ({ (x, y) | x in m I!R, y in m I!R }).

To determine the range, first pick a value for *z*. We need to find a solution to the equation (f(x,y)=z,) or (3x−5y+2=z.) One such solution can be obtained by first setting (y=0), which yields the equation (3x+2=z). The solution to this equation is (x=dfrac{z−2}{3}), which gives the ordered pair (left(dfrac{z−2}{3},0
ight)) as a solution to the equation (f(x,y)=z) for any value of (z). Therefore, the range of the function is all real numbers, or ((-infty, infty)).

b. For the function (g(x,y)) to have a real value, the quantity under the square root must be nonnegative:

[ 9−x^2−y^2≥0. onumber]

This inequality can be written in the form

[ x^2+y^2≤9. onumber]

Therefore, the domain of (g(x,y)) is ({(x,y)∈R^2∣x^2+y^2≤9}). The graph of this set of points can be described as a disk of radius 3 centered at the origin. The domain includes the boundary circle as shown in the following graph.

To determine the range of (g(x,y)=sqrt{9−x^2−y^2}) we start with a point ((x_0,y_0)) on the boundary of the domain, which is defined by the relation (x^2+y^2=9). It follows that (x^2_0+y^2_0=9) and

[ egin{align*} g(x_0,y_0) &=sqrt{9−x^2_0−y^2_0} [5pt]&=sqrt{9−(x^2_0+y^2_0)}[5pt]&=sqrt{9−9}[5pt]&=0. end{align*}]

If (x_0^2+y_0^2=0) (in other words, (x_0=y_0=0)), then

[ egin{align*} g(x_0,y_0)&=sqrt{9−x^2_0−y^2_0}[5pt]&=sqrt{9−(x^2_0+y^2_0)}[5pt]&=sqrt{9−0}=3. end{align*}]

This is the maximum value of the function. Given any value c between (0) and (3), we can find an entire set of points inside the domain of (g) such that (g(x,y)=c:)

[egin{align*} sqrt{9−x^2−y^2}&=c [5pt] 9−x^2−y^2&=c^2 [5pt] x^2+y^2&=9−c^2. end{align*}]

Since (9−c^2>0), this describes a circle of radius (sqrt{9−c^2}) centered at the origin. Any point on this circle satisfies the equation (g(x,y)=c). Therefore, the range of this function can be written in interval notation as ([0,3].)

Exercise (PageIndex{1})

Find the domain and range of the function (f(x,y)=sqrt{36−9x^2−9y^2}).

**Hint**Determine the set of ordered pairs that do not make the radicand negative.

**Solution**The domain is ({(x, y) | x^2+y^2≤4 }) the shaded circle defined by the inequality (x^2+y^2≤4), which has a circle of radius (2) as its boundary. The range is ([0,6].)

## Graphing Functions of Two Variables

Suppose we wish to graph the function (z=(x,y).) This function has two independent variables ((x) and (y)) and one dependent variable ((z)). When graphing a function (y=f(x)) of one variable, we use the Cartesian plane. We are able to graph any ordered pair ((x,y)) in the plane, and every point in the plane has an ordered pair ((x,y)) associated with it. With a function of two variables, each ordered pair ((x,y)) in the domain of the function is mapped to a real number (z). Therefore, the graph of the function (f) consists of ordered triples ((x,y,z)). The graph of a function (z=(x,y)) of two variables is called a surface.

To understand more completely the concept of plotting a set of ordered triples to obtain a surface in three-dimensional space, imagine the ((x,y)) coordinate system laying flat. Then, every point in the domain of the function f has a unique (z)-value associated with it. If (z) is positive, then the graphed point is located above the (xy)-plane, if (z) is negative, then the graphed point is located below the (xy)-plane. The set of all the graphed points becomes the two-dimensional surface that is the graph of the function (f).

Example (PageIndex{2}): Graphing Functions of Two Variables

Create a graph of each of the following functions:

- (g(x,y)=sqrt{9−x^2−y^2})
- (f(x,y)=x^2+y^2)

**Solution**

a. In Example (PageIndex{2}), we determined that the domain of (g(x,y)=sqrt{9−x^2−y^2}) is ({(x,y)∈R^2∣x^2+y^2≤9}) and the range is ({z∈R^2∣0≤z≤3}). When (x^2+y^2=9) we have (g(x,y)=0). Therefore any point on the circle of radius (3) centered at the origin in the (xy)-plane maps to (z=0) in (R^3). If (x^2+y^2=8), then (g(x,y)=1,) so any point on the circle of radius (2sqrt{2}) centered at the origin in the (xy)-plane maps to (z=1) in (R^3). As (x^2+y^2) gets closer to zero, the value of (z) approaches (3). When (x^2+y^2=0), then (g(x,y)=3). This is the origin in the (xy)-plane If (x^2+y^2) is equal to any other value between (0) and (9), then (g(x,y)) equals some other constant between (0) and (3). The surface described by this function is a hemisphere centered at the origin with radius (3) as shown in the following graph.

b. This function also contains the expression (x^2+y^2). Setting this expression equal to various values starting at zero, we obtain circles of increasing radius. The minimum value of (f(x,y)=x^2+y^2) is zero (attained when (x=y=0.). When (x=0), the function becomes (z=y^2), and when (y=0), then the function becomes (z=x^2). These are cross-sections of the graph, and are parabolas. Recall from Introduction to Vectors in Space that the name of the graph of (f(x,y)=x^2+y^2) is a **paraboloid**. The graph of (f) appears in the following graph.

Example (PageIndex{3}): Nuts and Bolts

A profit function for a hardware manufacturer is given by

[f(x,y)=16−(x−3)^2−(y−2)^2, onumber]

where (x) is the number of nuts sold per month (measured in thousands) and (y) represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.

**Solution**

This function is a polynomial function in two variables. The domain of (f) consists of ((x,y)) coordinate pairs that yield a nonnegative profit:

[ egin{align*} 16−(x−3)^2−(y−2)^2 &≥ 0 [5pt] (x−3)^2+(y−2)^2 &≤ 16. end{align*}]

This is a disk of radius (4) centered at ((3,2)). A further restriction is that both (x) and (y) must be nonnegative. When (x=3) and (y=2, quad f(x,y)=16.) Note that it is possible for either value to be a noninteger; for example, it is possible to sell (2.5) thousand nuts in a month. The domain, therefore, contains thousands of points, so we can consider all points within the disk. For any (z<16), we can solve the equation (f(x,y)=16:)

[ egin{align*} 16−(x−3)^2−(y−2)^2 &=z [5pt] (x−3)^2+(y−2)^2 &=16−z. end{align*}]

Since (z<16,) we know that (16−z>0,) so the previous equation describes a circle with radius (sqrt{16−z}) centered at the point ((3,2)). Therefore. the range of (f(x,y)) is ({z∈mathbb{R}|z≤16}.) The graph of (f(x,y)) is also a paraboloid, and this paraboloid points downward as shown.

## Level Curves

If hikers walk along rugged trails, they might use a topographical map that shows how steeply the trails change. A *topographical map* contains curved lines called contour lines. Each contour line corresponds to the points on the map that have equal elevation (Figure (PageIndex{6})). A level curve of a function of two variables (f(x,y)) is completely analogous to a contour line on a topographical map.

Definition: level curves

Given a function (f(x,y)) and a number (c) in the range of (f), a level curve of a function of two variables for the value (c) is defined to be the set of points satisfying the equation (f(x,y)=c.)

Returning to the function (g(x,y)=sqrt{9−x^2−y^2}), we can determine the level curves of this function. The range of (g) is the closed interval ([0,3]). First, we choose any number in this closed interval—say, (c=2). The level curve corresponding to (c=2) is described by the equation

[ sqrt{9−x^2−y^2}=2.]

To simplify, square both sides of this equation:

[ 9−x^2−y^2=4.]

Now, multiply both sides of the equation by (−1) and add (9)to each side:

[ x^2+y^2=5.]

This equation describes a circle centered at the origin with radius (sqrt{5}). Using values of c between (0) and (3) yields other circles also centered at the origin. If (c=3), then the circle has radius (0), so it consists solely of the origin. Figure (PageIndex{7}) is a graph of the level curves of this function corresponding to (c=0,1,2,) and (3). Note that in the previous derivation it may be possible that we introduced extra solutions by squaring both sides. This is not the case here because the range of the square root function is nonnegative.

A graph of the various level curves of a function is called a *contour map*.

Example (PageIndex{4}): Making a Contour Map

Given the function (f(x,y)=sqrt{8+8x−4y−4x^2−y^2}), find the level curve corresponding to (c=0). Then create a contour map for this function. What are the domain and range of (f)?

**Solution**

To find the level curve for (c=0,) we set (f(x,y)=0) and solve. This gives

(0=sqrt{8+8x−4y−4x^2−y^2}).

We then square both sides and multiply both sides of the equation by (−1):

(4x^2+y^2−8x+4y−8=0.)

Now, we rearrange the terms, putting the (x) terms together and the (y) terms together, and add (8) to each side:

(4x^2−8x+y^2+4y=8.)

Next, we group the pairs of terms containing the same variable in parentheses, and factor (4) from the first pair:

(4(x^2−2x)+(y^2+4y)=8.)

Then we complete the square in each pair of parentheses and add the correct value to the right-hand side:

(4(x^2−2x+1)+(y^2+4y+4)=8+4(1)+4.)

Next, we factor the left-hand side and simplify the right-hand side:

(4(x−1)^2+(y+2)^2=16.)

Last, we divide both sides by (16):

[dfrac{(x−1)^2}{4}+dfrac{(y+2)^2}{16}=1. label{ellipseeq1}]

This equation describes an ellipse centered at ((1,−2)). The graph of this ellipse appears in the following graph.

We can repeat the same derivation for values of (c) less than (4.) Then, Equation ef{ellipseeq1} becomes

(dfrac{4(x−1)^2}{16−c^2}+dfrac{(y+2)^2}{16−c^2}=1)

for an arbitrary value of (c).

Setting the function equal to (c), we get:

[sqrt{8+8x−4y−4x^2−y^2} = c onumber]

We then square both sides and multiply both sides of the equation by (−1):

(4x^2+y^2−8x+4y−8=-c^2.)

Now, we rearrange the terms, putting the (x) terms together and the (y) terms together, and add (8) to each side:

(4x^2−8x+y^2+4y=8-c^2.)

Next, we group the pairs of terms containing the same variable in parentheses, and factor (4) from the first pair:

(4(x^2−2x)+(y^2+4y)=8-c^2.)

Then we complete the square in each pair of parentheses and add the correct value to the right-hand side:

(4(x^2−2x+1)+(y^2+4y+4)=8 - c^2 +4(1)+4.)

Next, we factor the left-hand side and simplify the right-hand side:

(4(x−1)^2+(y+2)^2=16 - c^2.)

Last, we divide both sides by (16 - c^2):

[dfrac{4(x−1)^2}{16−c^2}+dfrac{(y+2)^2}{16−c^2}=1 onumber]

Figure (PageIndex{9}) shows a contour map for (f(x,y)) using the values (c=0,1,2,) and (3). When (c=4,) the level curve is the point ((−1,2)).

Exercise (PageIndex{4})

Find and graph the level curve of the function (g(x,y)=x^2+y^2−6x+2y) corresponding to (c=15.)

**Hint**First, set (g(x,y)=15) and then complete the square.

**Solution**The equation of the level curve can be written as ((x−3)^2+(y+1)^2=25,) which is a circle with radius (5) centered at ((3,−1).)

Another useful tool for understanding the **graph of a function of two variables** is called a vertical trace. Level curves are always graphed in the (xy)-plane, but as their name implies, vertical traces are graphed in the (xz-) or (yz-) planes.

Definition: vertical traces

Consider a function (z=f(x,y)) with domain (D⊆
m I!R^2). A *vertical trace* of the function can be either the set of points that solves the equation (f(a,y)=z) for a given constant (x=a) or (f(x,b)=z) for a given constant (y=b.)

Example (PageIndex{5}): Finding Vertical Traces

Find vertical traces for the function (f(x,y)=sin x cos y) corresponding to (x=−dfrac{π}{4},0,) and (dfrac{π}{4}), and (y=−dfrac{π}{4},0), and (dfrac{π}{4}).

**Solution**

First set (x=−dfrac{π}{4}) in the equation (z=sin x cos y:)

(z=sin(−dfrac{π}{4})cos y=−dfrac{sqrt{2}cos y}{2}≈−0.7071cos y.)

This describes a cosine graph in the plane (x=−dfrac{π}{4}). The other values of (z) appear in the following table.

(c) | Vertical Trace for (x=c) |
---|---|

(−dfrac{π}{4}) | (z=−dfrac{sqrt{2}cos y}{2}) |

0 | (z=0) |

(dfrac{π}{4}) | (z=dfrac{sqrt{2}cos y}{2}) |

In a similar fashion, we can substitute the (y)-values in the equation (f(x,y)) to obtain the traces in the (yz)-plane, as listed in the following table.

(d) | Vertical Trace for (y=d) |
---|---|

(dfrac{π}{4}) | (z=dfrac{sqrt{2}sin x}{2}) |

0 | (z=sin x) |

(−dfrac{π}{4}) | (z=dfrac{sqrt{2}sin x}{2}) |

The three traces in the (xz)-plane are cosine functions; the three traces in the (yz)-plane are sine functions. These curves appear in the intersections of the surface with the planes (x=−dfrac{π}{4},quad x=0,quad x=dfrac{π}{4}) and (y=−dfrac{π}{4},quad y=0,quad y=dfrac{π}{4}) as shown in the following figure.

Exercise (PageIndex{5})

Determine the equation of the vertical trace of the function (g(x,y)=−x^2−y^2+2x+4y−1) corresponding to (y=3), and describe its graph.

**Hint**Set (y=3) in the equation (z=−x^2−y^2+2x+4y−1) and complete the square.

**Solution**(z=3−(x−1)^2). This function describes a parabola opening downward in the plane (y=3).

Functions of two variables can produce some striking-looking surfaces. Figure (PageIndex{11}) shows two examples.

## Functions of More Than Two Variables

So far, we have examined only functions of two variables. However, it is useful to take a brief look at functions of more than two variables. Two such examples are

[ underbrace{f(x,y,z)=x^2−2xy+y^2+3yz−z^2+4x−2y+3x−6}_{ ext{a polynomial in three variables}}]

and

[g(x,y,t)=(x^2−4xy+y^2)sin t−(3x+5y)cos t.]

In the first function, ((x,y,z)) represents a point in space, and the function (f) maps each point in space to a fourth quantity, such as temperature or wind speed. In the second function, ((x,y)) can represent a point in the plane, and (t) can represent time. The function might map a point in the plane to a third quantity (for example, pressure) at a given time (t). The method for finding the domain of a function of more than two variables is analogous to the method for functions of one or two variables.

Example (PageIndex{6}): Domains for Functions of Three Variables

Find the domain of each of the following functions:

- (f(x,y,z)=dfrac{3x−4y+2z}{sqrt{9−x^2−y^2−z^2}})
- (g(x,y,t)=dfrac{sqrt{2t−4}}{x^2−y^2})

**Solution**:

a. For the function (f(x,y,z)=dfrac{3x−4y+2z}{sqrt{9−x^2−y^2−z^2}}) to be defined (and be a real value), two conditions must hold:

- The denominator
**cannot**be zero. - The radicand
**cannot**be negative.

Combining these conditions leads to the inequality

[9−x^2−y^2−z^2>0. onumber]

Moving the variables to the other side and reversing the inequality gives the domain as

[domain(f)={(x,y,z)∈R^3∣x^2+y^2+z^2<9}, onumber]

which describes a ball of radius (3) centered at the origin. (Note: The surface of the ball is not included in this domain.)

b. For the function (g(x,y,t)=dfrac{sqrt{2t−4}}{x^2−y^2}) to be defined (and be a real value), two conditions must hold:

- The radicand cannot be negative.
- The denominator cannot be zero.

Since the radicand cannot be negative, this implies (2t−4≥0), and therefore that (t≥2). Since the denominator cannot be zero, (x^2−y^2≠0), or (x^2≠y^2), Which can be rewritten as (y=±x), which are the equations of two lines passing through the origin. Therefore, the domain of (g) is

[ domain(g)={(x,y,t)|y≠±x,t≥2}. onumber]

Exercise (PageIndex{6})

Find the domain of the function (h(x,y,t)=(3t−6)sqrt{y−4x^2+4}).

**Hint**Check for values that make radicands negative or denominators equal to zero.

**Solution**[domain(h)={(x,y,t)in mathbb{R}^3∣y≥4x^2−4} onumber]

Functions of two variables have level curves, which are shown as curves in the (xy-plane.) However, when the function has three variables, the curves become surfaces, so we can define level surfaces for functions of three variables.

Definition: level surface of a function of three variables

Given a function (f(x,y,z)) and a number (c) in the range of (f), a *level surface of a function of three variables* is defined to be the set of points satisfying the equation (f(x,y,z)=c.)

Example (PageIndex{7}): Finding a Level Surface

Find the level surface for the function (f(x,y,z)=4x^2+9y^2−z^2) corresponding to (c=1).

**Solution**

The level surface is defined by the equation (4x^2+9y^2−z^2=1.) This equation describes a hyperboloid of one sheet as shown in Figure (PageIndex{12}).

Exercise (PageIndex{5})

Find the equation of the level surface of the function

[ g(x,y,z)=x^2+y^2+z^2−2x+4y−6z onumber]

corresponding to (c=2,) and describe the surface, if possible.

**Hint**Set (g(x,y,z)=c) and complete the square.

**Solution**((x−1)^2+(y+2)^2+(z−3)^2=16) describes a sphere of radius (4) centered at the point ((1,−2,3).)

## Summary

- The graph of a function of two variables is a surface in (mathbb{R}^3) and can be studied using level curves and vertical traces.
- A set of level curves is called a contour map.

## Key Equations

**Vertical trace**

(f(a,y)=z) for (x=a) or (f(x,b)=z) for (y=b)

**Level surface of a function of three variables**

(f(x,y,z)=c)

## Glossary

**contour map**- a plot of the various level curves of a given function (f(x,y))

**function of two variables**- a function (z=f(x,y)) that maps each ordered pair ((x,y)) in a subset (D) of (R^2) to a unique real number (z)

**graph of a function of two variables**- a set of ordered triples ((x,y,z)) that satisfies the equation (z=f(x,y)) plotted in three-dimensional Cartesian space

**level curve of a function of two variables**- the set of points satisfying the equation (f(x,y)=c) for some real number (c) in the range of (f)

**level surface of a function of three variables**- the set of points satisfying the equation (f(x,y,z)=c) for some real number (c) in the range of (f)

**surface**- the graph of a function of two variables, (z=f(x,y))

**vertical trace**- the set of ordered triples ((c,y,z)) that solves the equation (f(c,y)=z) for a given constant (x=c) or the set of ordered triples ((x,d,z)) that solves the equation (f(x,d)=z) for a given constant (y=d)

## Contributors

Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax is licensed with a CC-BY-SA-NC 4.0 license. Download for free at http://cnx.org.

## Part A: Functions of Two Variables, Tangent Approximation and Optimization

We start this unit by learning to visualize functions of several variables using graphs and level curves. Following this we will study partial derivatives. These will be used in the tangent approximation formula, which is one of the keys to multivariable calculus. It ties together the geometric and algebraic sides of the subject and is the higher dimensional analog of the equation for the tangent line found in single variable calculus. We will use it in part B to develop the chain rule.

We will apply our understanding of partial derivatives to solving unconstrained optimization problems. (In part C we will solve constrained optimization problems.)

## Georgia Institute of Technology School of Mathematics | Georgia Institute of Technology | Atlanta, GA

Linear approximation and Taylor&rsquos theorems, Lagrange multiples and constrained optimization, multiple integration and vector analysis including the theorems of Green, Gauss, and Stokes.

MATH 1502 OR MATH 1512 OR MATH 1555 OR MATH 1504 ((MATH 1552 OR MATH 15X2 OR MATH 1X52) AND (MATH 1522 OR MATH 1553 OR MATH 1554 OR MATH 1564 OR MATH 1X53))

Thomas, *Calculus: Early Transcendentals, (14th ed.)*

Flow chart describing textbook choices for Fall 2019.

Topic | Text Sections | Lectures |
---|---|---|

Vectors and Geometry of Space | 12.2-12.6 | 3 |

Vector Valued Functions, Vector Calculus, Tangents, Arclength, Motion in Space | 13.1-13.6 | 8 |

Functions of several variables, Partial Derivatives, Gradients, Extreme Values, Lagrange Multipliers, Taylor's theorem in several variables | 14.1-14.10 | 12 |

Double and triple integrals | 15.1-15.8 | 10 |

Vector analysis -- line integrals, surface integrals, and the theorems of Green, Gauss, and Stokes | 16.1-16.8 | 10 |

#### Georgia Tech Resources

#### GT Math Resources

Georgia Institute of Technology

North Avenue, Atlanta, GA 30332

Phone: 404-894-2000

## 13.1: Functions of Multiple Variables - Mathematics

Introduction to calculus of functions of several variables calculus on parameterized curves, derivatives of functions of several variables, multiple integrals, vector calculus.

Prerequisites: Math 222. Students may not receive credit for both Math 223 & Math 234

Mathematics 222, or advanced placement

Differential and integral calculus of one variable, vector arithmetic including dot and cross products and applications to 3-dimensional analytic geometry.

This course builds on the skills from Mathematics 221 and 222. Those skills are extended and new skills are added, and the resulting tools are applied to new applications. As specific skills, the student will be able to:

Use parametric, verbal, and graphical representations of a curve in 2- or 3-space Differentiate vector functions and find the tangent vector to a parametrized curve Integrate a vector function and find arc length, and parametrize with respect to arc length Find the curvature and the normal vector, binormal vector, and normal plane to a curve Calculate velocity, speed, and acceleration for motion in space, and solve initial value problems for motion in space Use graphs and level curves for functions of two variables and level surfaces for functions of three variables Determine limits and continuity for functions of two or three variables Compute partial derivatives of all orders, and use different notations to express a partial derivative Justify interchange of order of differentiation using Clairault's theorem Use the chain rule and implicit differentiation in finding partial derivatives Test a solution to a partial differential equation, and find the solution to an initial value problem given the general solution Find an equation for the tangent plane to the graph of a function of two variables at a specified point Use linearization (differentials) to approximate values of functions of several variables Find the gradient of a scalar field Evaluate directional derivatives and determine the direction of maximal rate of change Find an equation for the tangent plane to a level surface of a function of three variables at a specified point Use partial derivatives to find critical points for functions of two or three variables, and use tools such as the second derivative test to classify those points Find absolute extrema for functions of two or three variables on closed, bounded, domains Set up a Riemann sum to derive a double or triple integral appropriate to an application Set up and evaluate iterated integrals over 2- and 3-dimensional regions Interchange order to evaluate iterated integrals Set up and evaluate integrals in polar, cylindrical, and spherical coordinates, and use changes between coordinate systems to evaluate integrals Calculate mass, first moments, and center-of-mass for a 2- or 3-dimensional region with a prescribed density function Set up and evaluate line integrals for a scalar field, with respect to arc length or a coordinate variable, along a piece-wise smooth parametrized curve in 2- or 3-space Set up and evaluate line integrals for a vector field, with respect to arc length Use partial derivatives to test whether a vector field is conservative, and find a potential function if it is Use a potential function to evaluate a line integral along a given curve Use Green's theorem in forms involving flux and circulation Calculate curl and divergence of a vector field in space

Three hours of lecture each week (either 50 minutes MWF or 75 minutes TR) and one hour in discussion section.

This course contributes primarily to the students' knowledge of college-level mathematics and/or basic sciences, but does not provide experimental evidence.

(Some laboratory exercises will make use of real data from experiments, but they are provided to the student rather than being measured by the student personally.)

Calculus is a fundamental tool both in the science and engineering courses which the student will take and also in professional applications. Even when the practicing engineer may use a calculator or computer to carry out a calculation, it is important that he/she knows what the technology is being asked to perform and how to tell if the answer is reasonable.

This course serves students in a variety of engineering majors. The paragraph below describes how the course contributes to the college's educational objectives.

The skills learned in this course are essential to success in most science and engineering courses the student will be taking, and the course uses examples which feed into those courses. In addition, the course builds an understanding of how abstract foundations support and frequently evolve into concrete technologies.

## 13.1: Functions of Multiple Variables - Mathematics

#### Navigation

#### Navigation

### Calculus of Multiple Variables - Tutorial with Problems, Solutions, MCQ Quizzes - Part III : Multiple Integrals, Double and Triple Integrals

### In case you'd like to take a look at other tutorials we have, related to Calculus of multiple variables :

**Here's the outline of what we'll cover in this tutorial**

1. Multiple Integrals : Extensions of single integral to two , three or more dimensions is called Multiple integrals.

2. Area of a region : Computing the area of a given region using double Integrals.

3. Volume under a surface : Computing volume of the region using multiple integrals.

Volume of a region, center of gravity and moment of inertia of a solid.

Making transformations to help us change the variables in doub le and triple integrals.

1. Find the volume of the solid under the plane z = 2x + 4y and over

the rectangle [3, 12] × [2, 4].

2. Find the area of the triangle

R = <(x, y) :0xb,0ymx >

using double integrals and show that it gives the usual formula y = (base)(height)/2

3 . Find the volume of the tetrahedron bounded by the coordinate planes

and the plane z = 6 − 2x − 3y.

4 . Find the volume of the solid in the first octant bounded by the

paraboloid z=9-x2-y2 and the xy-plane.

5. Solve the above problem using cylindrical coordinates

6. Find a formula for the area of a circle of radius a using double integrals.

7. Find a formula for the area of a circle of radius a using polar integrals.

8. Find the value of -e-x2dx

9. Find the surface area of the part of the surface z=9-x2 that lies above the quarter of the circle x2+y2=9 in the first quadrant .

10 .Find a formula for the surface area of a sphere of radius a.

Find the volume of the solid in the first octant bounded by the

surfaces y2+64z2=4 and y=x

13. Find the volume of ball of radius a centered at the origin.

16. Find the Cartesian coordinates corresponding to the point (3,-7/6)

18. A solid fills the region between two concentric spheres of radii a and b , 0<a<b.

The density at each point is inversely proportional to its square of distance from the region . Find the total mass.

19. Find the volume of the solid enclosed between the surfaces x2+y2=a2 and x2+z2=a2

22. The cylinder x2+z2=1 is cut by the planes y=0 , z=0 and x=y. Find the

volume of the region in the first octant.

26. Find the centre of gravity of a plate whose density (x,y) is constant and is bounded by the curves y=x2 and y=x+2 .

## Calculus of Several Variables

This is one of over 2,400 courses on OCW. Explore materials for this course in the pages linked along the left.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

Homework assignments are due on the second day of class every week. Late problem sets are not accepted, however the lowest problem set score will be dropped.

Course calendar.LEC # | TOPICS |
---|---|

1 | Vectors in R 2 and R 3 |

2 | Dot product |

3 | Cross product |

4 | Planes and distances |

5 | n-dimensional space |

6 | Cylindrical and spherical coordinates |

7 | Functions |

8 | Limits |

9 | The Derivative |

10 | More about derivatives |

11 | Higher derivatives |

12 | Chain rule |

13 | Implicit functions |

14 | Parametrised curves |

15 | Arclength |

16 | Moving frames |

17 | Vector fields |

18 | Div grad curl and all that |

19 | Taylor polynomials |

20 | Maxima and minima: I |

21 | Maxima and minima: II |

22 | Double integrals |

23 | Inclusion-exclusion |

24 | Triple integrals |

25 | Change of coordinates: I |

26 | Change of coordinates: II |

27 | Line integrals |

28 | Manifolds with boundary |

29 | Conservative vector fields revisited |

30 | Surface integrals |

31 | Flux |

32 | Stokes theorem |

33 | Gauss theorem |

34 | Forms on R n |

## Welcome!

This is one of over 2,400 courses on OCW. Explore materials for this course in the pages linked along the left.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

## 13.1: Functions of Multiple Variables - Mathematics

In the previous section we optimized (*i.e.* found the absolute extrema) a function on a region that contained its boundary. Finding potential optimal points in the interior of the region isn’t too bad in general, all that we needed to do was find the critical points and plug them into the function. However, as we saw in the examples finding potential optimal points on the boundary was often a fairly long and messy process.

In this section we are going to take a look at another way of optimizing a function subject to given constraint(s). The constraint(s) may be the equation(s) that describe the boundary of a region although in this section we won’t concentrate on those types of problems since this method just requires a general constraint and doesn’t really care where the constraint came from.

So, let’s get things set up. We want to optimize (*i.e.* find the minimum and maximum value of) a function, (fleft(

#### Method of Lagrange Multipliers

- Solve the following system of equations. [egin
abla fleft( ight) & = lambda ,, abla gleft( ight) gleft( ight) & = kend ] - Plug in all solutions, (left(
ight)), from the first step into (fleft( ight)) and identify the minimum and maximum values, provided they exist and ( abla g e vec<0>) at the point.

The constant, (lambda ), is called the **Lagrange Multiplier**.

Notice that the system of equations from the method actually has four equations, we just wrote the system in a simpler form. To see this let’s take the first equation and put in the definition of the gradient vector to see what we get.

[leftlangle <

In order for these two vectors to be equal the individual components must also be equal. So, we actually have three equations here.

These three equations along with the constraint, (gleft(

Note as well that if we only have functions of two variables then we won’t have the third component of the gradient and so will only have three equations in three unknowns (x), (y), and (lambda ).

As a final note we also need to be careful with the fact that in some cases minimums and maximums won’t exist even though the method will seem to imply that they do. In every problem we’ll need to make sure that minimums and maximums will exist before we start the problem.

To see a physical justification for the formulas above. Let’s consider the minimum and maximum value of (fleft(

Here is a sketch of the constraint as well as (fleft(

First remember that solutions to the system must be somewhere on the graph of the constraint, ( *i.e.* the point (left(

Now, we can see that the graph of (fleft( *i.e.* the graph of the minimum value of (fleft(

If the two graphs are tangent at that point then their normal vectors must be parallel, *i.e.* the two normal vectors must be scalar multiples of each other. Mathematically, this means,

[
abla fleft(

for some scalar (lambda ) and this is exactly the first equation in the system we need to solve in the method.

Note as well that if (k) is smaller than the minimum value of (fleft(

Likewise, if (k) is larger than the minimum value of (fleft(

Next, the graph below shows a different set of values of (k). In this case, the values of (k) include the maximum value of (fleft(

Again, we can see that the graph of (fleft(

Likewise, for value of (k) greater than 8.125 the graph of (fleft(

Also, for values of (k) less than 8.125 the graph of (fleft(

So, with these graphs we’ve seen that the minimum/maximum values of (fleft(

Note that the physical justification above was done for a two dimensional system but the same justification can be done in higher dimensions. The difference is that in higher dimensions we won’t be working with curves. For example, in three dimensions we would be working with surfaces. However, the same ideas will still hold. At the points that give minimum and maximum value(s) of the surfaces would be parallel and so the normal vectors would also be parallel.

Let’s work a couple of examples.

Before we start the process here note that we also saw a way to solve this kind of problem in Calculus I, except in those problems we required a condition that related one of the sides of the box to the other sides so that we could get down to a volume and surface area function that only involved two variables. We no longer need this condition for these problems.

Now, let’s get on to solving the problem. We first need to identify the function that we’re going to optimize as well as the constraint. Let’s set the length of the box to be (x), the width of the box to be (y) and the height of the box to be (z). Let’s also note that because we’re dealing with the dimensions of a box it is safe to assume that (x), (y), and (z) are all positive quantities.

We want to find the largest volume and so the function that we want to optimize is given by,

Next, we know that the surface area of the box must be a constant 64. So this is the constraint. The surface area of a box is simply the sum of the areas of each of the sides so the constraint is given by,

[2xy + 2xz + 2yz = 64hspace <0.5in>Rightarrow hspace<0.5in>xy + xz + yz = 32]

Note that we divided the constraint by 2 to simplify the equation a little. Also, we get the function (gleft(

The function itself, (fleft(

So, let’s now see if (fleft(

Here we’ve got the sum of three positive numbers (remember that we (x), (y), and (z) are positive because we are working with a box) and the sum must equal 32. So, if one of the variables gets very large, say (x), then because each of the products must be less than 32 both (y) and (z) must be very small to make sure the first two terms are less than 32. So, there is no way for all the variables to increase without bound and so it should make some sense that the function, (fleft(

This is not an exact proof that (fleft(

Here are the four equations that we need to solve.

There are many ways to solve this system. We’ll solve it in the following way. Let’s multiply equation (eqref

Now notice that we can set equations (eqref

[egin

This gave two possibilities. The first, (lambda = 0) is not possible since if this was the case equation (eqref

Since we are talking about the dimensions of a box neither of these are possible so we can discount (lambda = 0). This leaves the second possibility.

Since we know that (z e 0) (again since we are talking about the dimensions of a box) we can cancel the (z) from both sides. This gives,

Next, let’s set equations (eqref

[egin

As already discussed we know that (lambda = 0) won’t work and so this leaves,

We can also say that (x e 0)since we are dealing with the dimensions of a box so we must have,

Plugging equations (eqref

However, we know that (y) must be positive since we are talking about the dimensions of a box. Therefore, the only solution that makes physical sense here is

So, it looks like we’ve got a cube.

We should be a little careful here. Since we’ve only got one solution we might be tempted to assume that these are the dimensions that will give the largest volume. Anytime we get a single solution we really need to verify that it is a maximum (or minimum if that is what we are looking for).

This is actually pretty simple to do. First, let’s note that the volume at our solution above is,

Now, we know that a maximum of (fleft(

If, on the other hand, the new set of dimensions give a larger volume we have a problem. We only have a single solution and we know that a maximum exists and the method should generate that maximum. So, in this case, the likely issue is that we will have made a mistake somewhere and we’ll need to go back and find it.

So, let’s find a new set of dimensions for the box. The only thing we need to worry about is that they will satisfy the constraint. Outside of that there aren’t other constraints on the size of the dimensions. So, we can freely pick two values and then use the constraint to determine the third value.

Let’s choose (x = y = 1). No reason for these values other than they are “easy” to work with. Plugging these into the constraint gives,

[1 + z + z = 32hspace <0.25in> o hspace<0.25in>2z = 31hspace <0.25in> o hspace<0.25in>z = frac<<31>><2>]

So, this is a set of dimensions that satisfy the constraint and the volume for this set of dimensions is,

So, the new dimensions give a smaller volume and so our solution above is, in fact, the dimensions that will give a maximum volume of the box are (x = y = z = ,3.266)

Notice that we never actually found values for (lambda ) in the above example. This is fairly standard for these kinds of problems. The value of (lambda ) isn’t really important to determining if the point is a maximum or a minimum so often we will not bother with finding a value for it. On occasion we will need its value to help solve the system, but even in those cases we won’t use it past finding the point.

This one is going to be a little easier than the previous one since it only has two variables. Also, note that it’s clear from the constraint that region of possible solutions lies on a disk of radius (sqrt <136>) which is a closed and bounded region, ( - sqrt <136>le x,y le sqrt <136>), and hence by the Extreme Value Theorem we know that a minimum and maximum value must exist.

Here is the system that we need to solve.

[egin

Notice that, as with the last example, we can’t have (lambda = 0) since that would not satisfy the first two equations. So, since we know that (lambda e 0)we can solve the first two equations for (x) and (y) respectively. This gives,

Plugging these into the constraint gives,

We can solve this for (lambda ).

Now, that we know (lambda ) we can find the points that will be potential maximums and/or minimums.

and if (lambda = frac<1><4>) we get,

To determine if we have maximums or minimums we just need to plug these into the function. Also recall from the discussion at the start of this solution that we know these will be the minimum and maximums because the Extreme Value Theorem tells us that minimums and maximums will exist for this problem.

Here are the minimum and maximum values of the function.

In the first two examples we’ve excluded (lambda = 0) either for physical reasons or because it wouldn’t solve one or more of the equations. Do not always expect this to happen. Sometimes we will be able to automatically exclude a value of (lambda ) and sometimes we won’t.

Let’s take a look at another example.

First note that our constraint is a sum of three positive or zero number and it must be 1. Therefore, it is clear that our solution will fall in the range (0 le x,y,z le 1) and so the solution must lie in a closed and bounded region and so by the Extreme Value Theorem we know that a minimum and maximum value must exist.

Here is the system of equation that we need to solve.

Let’s start this solution process off by noticing that since the first three equations all have (lambda ) they are all equal. So, let’s start off by setting equations (eqref

So, we’ve got two possibilities here. Let’s start off with by assuming that (z = 0). In this case we can see from either equation (eqref

So, we’ve got two possible cases to deal with there. In each case two of the variables must be zero. Once we know this we can plug into the constraint, equation (eqref

[egin

So, we’ve got two possible solutions (left( <0,1,0> ight)) and (left( <1,0,0> ight)).

Now let’s go back and take a look at the other possibility, (y = x). We also have two possible cases to look at here as well.

This first case is(x = y = 0). In this case we can see from the constraint that we must have (z = 1) and so we now have a third solution (left( <0,0,1> ight)).

The second case is (x = y
e 0). Let’s set equations (eqref

Now, we’ve already assumed that (x e 0) and so the only possibility is that (z = y). However, this also means that,

Using this in the constraint gives,

So, the next solution is (left(

We got four solutions by setting the first two equations equal.

To completely finish this problem out we should probably set equations (eqref

Both of these are very similar to the first situation that we looked at and we’ll leave it up to you to show that in each of these cases we arrive back at the four solutions that we already found.

So, we have four solutions that we need to check in the function to see whether we have minimums or maximums.

So, in this case the maximum occurs only once while the minimum occurs three times.

Note as well that we never really used the assumption that (x,y,z ge 0) in the actual solution to the problem. We used it to make sure that we had a closed and bounded region to guarantee we would have absolute extrema. To see why this is important let's take a look at what might happen without this assumption Without this assumption it wouldn’t be too difficult to find points that give both larger and smaller values of the functions. For example.

With these examples you can clearly see that it’s not too hard to find points that will give larger and smaller function values. However, all of these examples required negative values of (x), (y) and/or (z) to make sure we satisfy the constraint. By eliminating these we will know that we’ve got minimum and maximum values by the Extreme Value Theorem.

Before we proceed we need to address a quick issue that the last example illustrates about the method of Lagrange Multipliers. We found the absolute minimum and maximum to the function. However, what we did not find is all the locations for the absolute minimum. For example, assuming (x,y,zge 0), consider the following sets of points.

Every point in this set of points will satisfy the constraint from the problem and in every case the function will evaluate to zero and so also give the absolute minimum.

So, what is going on? Recall from the previous section that we had to check both the critical points and the boundaries to make sure we had the absolute extrema. The same was true in Calculus I. We had to check both critical points and end points of the interval to make sure we had the absolute extrema.

It turns out that we really need to do the same thing here if we want to know that we’ve found all the locations of the absolute extrema. The method of Lagrange multipliers will find the absolute extrema, it just might not find all the locations of them as the method does not take the end points of variables ranges into account (note that we might luck into some of these points but we can’t guarantee that).

So, after going through the Lagrange Multiplier method we should then ask what happens at the end points of our variable ranges. For the example that means looking at what happens if (x=0), (y=0), (z=0), (x=1), (y=1), and (z=1). In the first three cases we get the points listed above that do happen to also give the absolute minimum. For the later three cases we can see that if one of the variables are 1 the other two must be zero (to meet the constraint) and those were actually found in the example. Sometimes that will happen and sometimes it won’t.

In the case of this example the end points of each of the variable ranges gave absolute extrema but there is no reason to expect that to happen every time. In Example 2 above, for example, the end points of the ranges for the variables do not give absolute extrema (we’ll let you verify this).

The moral of this is that if we want to know that we have every location of the absolute extrema for a particular problem we should also check the end points of any variable ranges that we might have. If all we are interested in is the value of the absolute extrema then there is no reason to do this.

Okay, it’s time to move on to a slightly different topic. To this point we’ve only looked at constraints that were equations. We can also have constraints that are inequalities. The process for these types of problems is nearly identical to what we’ve been doing in this section to this point. The main difference between the two types of problems is that we will also need to find all the critical points that satisfy the inequality in the constraint and check these in the function when we check the values we found using Lagrange Multipliers.

Let’s work an example to see how these kinds of problems work.

Note that the constraint here is the inequality for the disk. Because this is a closed and bounded region the Extreme Value Theorem tells us that a minimum and maximum value must exist.

The first step is to find all the critical points that are in the disk (*i.e.* satisfy the constraint). This is easy enough to do for this problem. Here are the two first order partial derivatives.

[egin

So, the only critical point is (left( <0,0> ight)) and it does satisfy the inequality.

At this point we proceed with Lagrange Multipliers and we treat the constraint as an equality instead of the inequality. We only need to deal with the inequality when finding the critical points.

So, here is the system of equations that we need to solve.

[egin

From the first equation we get,

If we have (x = 0) then the constraint gives us (y = pm ,2).

If we have (lambda = 4) the second equation gives us,

[20y = 8yhspace <0.25in>Rightarrow hspace<0.25in>,,,y = 0]

The constraint then tells us that (x = pm ,2).

If we’d performed a similar analysis on the second equation we would arrive at the same points.

So, Lagrange Multipliers gives us four points to check :(left( <0,2> ight)), (left( <0, - 2> ight)), (left( <2,0> ight)), and (left( < - 2,0> ight)).

To find the maximum and minimum we need to simply plug these four points along with the critical point in the function.

In this case, the minimum was interior to the disk and the maximum was on the boundary of the disk.

The final topic that we need to discuss in this section is what to do if we have more than one constraint. We will look only at two constraints, but we can naturally extend the work here to more than two constraints.

We want to optimize (fleft(

[egin

So, in this case we get two Lagrange Multipliers. Also, note that the first equation really is three equations as we saw in the previous examples. Let’s see an example of this kind of optimization problem.

Verifying that we will have a minimum and maximum value here is a little trickier. Clearly, because of the second constraint we’ve got to have ( - 1 le x,y le 1). With this in mind there must also be a set of limits on (z) in order to make sure that the first constraint is met. If one really wanted to determine that range you could find the minimum and maximum values of (2x - y) subject to (

Here is the system of equations that we need to solve.

First, let’s notice that from equation (eqref

[egin

Now, plug these into equation (eqref

So, we have two cases to look at here. First, let’s see what we get when (mu = sqrt <13>). In this case we know that,

Plugging these into equation (eqref

Let’s now see what we get if we take (mu = - sqrt <13>). Here we have,

Plugging these into equation (eqref

and there’s a second solution.

Now all that we need to is check the two solutions in the function to see which is the maximum and which is the minimum.