01 / 21

Multivariable Functions
& Level Sets

Explore functions of two and three variables, understand their domains, and visualize surfaces through level curves and level surfaces.

Calculus 3

What Is a Multivariable Function?

In single-variable calculus, a function takes one input and returns one output: \( f(x) \). In multivariable calculus, a function can take two or more inputs and still return a single real number.

Two Variables
\( f(x, y) \) maps a point in \( \mathbb{R}^2 \) to a real number in \( \mathbb{R} \).
Three Variables
\( f(x, y, z) \) maps a point in \( \mathbb{R}^3 \) to a real number in \( \mathbb{R} \).

The Domain in Higher Dimensions

The domain of \( f(x, y) \) is the set of all points \( (x, y) \) in \( \mathbb{R}^2 \) where the function is defined. Instead of an interval on a number line, it is a region in the plane.

x y Domain \( x^2 + y^2 \leq 4 \) (1, 1) (3, 3) undefined

Visualizing \( f(x,y) \) as a Surface

The graph of \( z = f(x,y) \) is a surface in three-dimensional space \( \mathbb{R}^3 \). Every point \( (x, y) \) in the domain maps to a height \( z \), forming a landscape of peaks, valleys, and saddles.

z x y peak \( z = f(x,y) \)

What Are Level Curves?

A level curve of \( f(x,y) \) is the set of all points \( (x,y) \) where the function equals a constant \( c \). Formally:

Think of a topographic map: each contour line connects points of equal elevation. Similarly, each level curve connects points where \( f \) has the same value.

x y c = 1 c = 4 c = 9 c = 16 origin

Formal Definition: Level Sets

The concept generalizes beyond two variables. A level set is the pre-image of a constant for any scalar-valued function.

Level Curve
For \( f: \mathbb{R}^2 \to \mathbb{R} \), the level set \( f(x,y) = c \) is a curve in the \( xy \)-plane.
Level Surface
For \( f: \mathbb{R}^3 \to \mathbb{R} \), the level set \( f(x,y,z) = c \) is a surface in \( \mathbb{R}^3 \).

Level Curves vs. Level Surfaces

Property Level Curve Level Surface
Function type \( f(x,y) \) \( f(x,y,z) \)
Input space \( \mathbb{R}^2 \) \( \mathbb{R}^3 \)
Level set is A curve (1D) A surface (2D)
Visualization Contour map Nested shells
Example \( x^2 + y^2 = c \): circles \( x^2 + y^2 + z^2 = c \): spheres

Finding Domains: Step by Step

1
Identify restrictions. Look for division by zero, square roots of negatives, and logarithms of non-positives.
2
Write inequalities. Translate each restriction into a condition on \( x \) and \( y \) (or \( x, y, z \)).
3
Combine conditions. The domain is the intersection of all regions satisfying every inequality.
4
Sketch the region. Shade the valid area. Mark boundaries as solid (included) or dashed (excluded).

Example 1: Domain of \( f(x,y) = \ln(x - y^2) \)

Step 1: The logarithm requires its argument to be strictly positive:

x y Domain \( x > y^2 \) \( x = y^2 \) (boundary, excluded)

Result: The domain is the open region to the right of the parabola \( x = y^2 \) (dashed boundary means excluded).

Example 2: Level Curves of \( f(x,y) = x^2 - y^2 \)

Set \( f(x,y) = c \): this gives \( x^2 - y^2 = c \), which are hyperbolas (or degenerate cases).

x y c = 0 c = 1 c = -1

Example 3: Domain of \( f(x,y) = \frac{\sqrt{y - x^2}}{1 - x^2} \)

We need two conditions simultaneously:

1
Square root: \( y - x^2 \geq 0 \), so \( y \geq x^2 \). The region is on or above the parabola \( y = x^2 \).
2
Denominator: \( 1 - x^2 \neq 0 \), so \( x \neq \pm 1 \). Two vertical lines are excluded.
x y x = 1 x = -1 Domain \( y = x^2 \)

Sketching Level Curves: How-To

1
Choose values of \( c \). Pick 4-5 evenly spaced constants (e.g., \( c = 0, 1, 2, 3, 4 \)).
2
Set \( f(x,y) = c \). This produces an equation in \( x \) and \( y \) only. Simplify it.
3
Recognize the shape. Is it a circle, ellipse, parabola, line, or hyperbola? Compare with standard forms.
4
Sketch and label. Draw each curve in the \( xy \)-plane and label it with its \( c \)-value.
5
Note the spacing. Closely spaced curves indicate the function changes rapidly. Widely spaced curves indicate a gentle slope.

Level Curves of \( f(x,y) = 2x + 3y \)

Setting \( 2x + 3y = c \) gives a family of parallel lines, each with slope \( -\frac{2}{3} \).

x y c = -6 c = -3 c = 0 c = 3 c = 6 c increases →

Level Surfaces in \( \mathbb{R}^3 \)

For \( f(x,y,z) \), we cannot draw the graph (it would need 4 dimensions!). Instead, we study the function through its level surfaces: \( f(x,y,z) = c \).

\( x^2 + y^2 + z^2 = c \)
Concentric spheres centered at the origin. Radius \( \sqrt{c} \).
\( x^2 + y^2 - z^2 = c \)
Hyperboloids. Shape depends on the sign of \( c \).
\( x + 2y + 3z = c \)
Parallel planes. The simplest case: a linear function.

Why Level Sets Matter

Level sets are not just a visualization tool. They are central to many ideas in Calculus 3 and beyond:

Gradient Direction
The gradient \( \nabla f \) is always perpendicular to the level curves/surfaces.
Optimization
Lagrange multipliers use level sets to find constrained maxima and minima.
Implicit Surfaces
Many real-world surfaces (e.g., \( x^2 + y^2 + z^2 = 1 \)) are naturally defined as level sets.

Common Mistakes

✕ Confusing Graph and Level Set
The graph of \( z = f(x,y) \) is a surface in \( \mathbb{R}^3 \). A level curve \( f(x,y) = c \) lives in \( \mathbb{R}^2 \). They are different objects.
✕ Forgetting Boundary Conditions
For domains, "\( \geq \)" means the boundary is included (solid line), while "\( > \)" means it is excluded (dashed line). This distinction matters.
✕ Ignoring Multiple Restrictions
Functions like \( \frac{\sqrt{g}}{h} \) have two conditions: \( g \geq 0 \) and \( h \neq 0 \). You must enforce both simultaneously.

Question 1 of 5

What is the domain of \( f(x,y) = \sqrt{9 - x^2 - y^2} \)?

Question 2 of 5

The level curves of \( f(x,y) = x^2 + y^2 \) are:

Question 3 of 5

For \( f(x,y,z) = x^2 + y^2 + z^2 \), the level set \( f = 4 \) is a:

Question 4 of 5

What is the domain of \( g(x,y) = \frac{1}{\ln(x + y)} \)?

Question 5 of 5

If the level curves of \( f(x,y) \) are very closely spaced in a particular region, what does this indicate?