Structure preview

Functions of two variables: domains, surfaces and level sets

First chapter of Analysis block three: ordered pairs, natural and model domains, surfaces, levels and traces. Worked examples, twelve exercises and a 3D lab.

Section: Calculus Updated:

Lab: functions of two variables and surfaces

Learning-path index

Articles /funzioni-due-variabili-dominio-superfici
Functions of two variables: domains, surfaces and level sets

35 min

Temperature depends on position, cost on quantities, terrain height on two coordinates. Instead of one input x, choose a pair (x,y) and obtain one value z. Block three begins by identifying where functions are defined and learning to read graphs. Domain first, then value, surface, levels and traces: partial derivatives are not required yet.

Lab: functions of two variables and surfaces · Learning-path index

1. Two inputs, one output

On a map, x measures east–west position and y north–south. T(x,y) assigns one temperature, not a pair. Inputs are ordered: (1,2) and (2,1) are different places. For f(x,y)=x+2y, f(1,2)=5 and f(2,1)=4.

(x,y) ↦ z=f(x,y)
f(1,2)=1+2·2=5
f(2,1)=2+2·1=4

Two independent variables means a two-coordinate input, not that every real pair is allowed. x²+y²≤4 links permitted values while still defining a two-variable function on a disk.

Explore

2. Domain, codomain and range

f:D⊆ℝ²→ℝ
G_f={(x,y,f(x,y)) : (x,y)∈D}⊆ℝ³
f(D)={z∈ℝ : ∃(x,y)∈D, z=f(x,y)}

D is the set of allowed inputs in the plane. ℝ is the declared codomain; f(D) is the range of attained outputs. Graph G_f is instead a set in space, different from D and f(D).

For x²+y² on ℝ², codomain ℝ is valid but range is [0,+∞): squares cannot sum to a negative value and each z≥0 occurs at (√z,0). Restricting D to x²+y²≤4 changes range to [0,4]. Same formula, different assigned domain.

Explore

3. One height per point: not every surface is a graph

From P=(x,y,0), move up or down to Q=(x,y,f(x,y)). Each domain input has one height, so a vertical line meets the graph at most once.

x²+y²+z²=4
z=±√(4−x²−y²)

The whole sphere is not one graph z=f(x,y): at (0,0) it gives z=2 and z=−2. The upper hemisphere chooses the positive root on the closed radius-2 disk. Domain: disk; graph: hemisphere, not solid ball.

Explore

4. Three basic domain restrictions

√A(x,y): A(x,y)≥0
1/B(x,y): B(x,y)≠0
ln C(x,y): C(x,y)>0

Over the reals, square roots allow a zero radicand; logarithms do not. Denominators cannot vanish even if a factor is later canceled: the original expression retains exclusions. A root in a denominator requires a strictly positive radicand.

Conditions are simultaneous: intersection, not union. For √(xy), xy≥0 includes first and third quadrants and both axes. Requiring x≥0 and y≥0 separately is too restrictive: two negatives also have a positive product.

Explore

5. Worked domain: root and logarithm together

f(x,y)=√(9−x²−y²)/ln(y−x)
9−x²−y²≥0
y−x>0
ln(y−x)≠0 ⇔ y−x≠1
D={(x,y): x²+y²≤9, y>x, y≠x+1}

The numerator requires the closed radius-3 disk; the logarithm selects the half-plane above y=x; the denominator also excludes y=x+1. The outer circle is not entirely excluded: points satisfying the other conditions remain allowed with numerator zero.

(0,2)∈D; f(0,2)=√5/ln2
(0,1)∉D: ln1=0
(0,0)∉D: ln0
(0,3)∈D; f(0,3)=0

Point checks help, but the full domain is described by the condition system. The lab has eight predefined models: this combined expression is an analytical exercise, not a free program input.

Explore

6. Regions, boundaries and exclusions

x²+y²≤4 is a disk including its boundary; x²+y²<4 excludes the circle. y>x² is the region above a parabola, not just the curve. x²+y²≠1 allows both inside and outside the excluded circle.

Use solid boundaries for inclusion and dashed ones for exclusion. Domains can be unbounded, have holes or separated regions. The software window crops the view, not the domain: zooming does not change conditions.

Explore

7. Reference surfaces and ranges

z=1+x/2−3y/4: f(ℝ²)=ℝ
z=x²+y²: f(ℝ²)=[0,+∞)
z=x²−y²: f(ℝ²)=ℝ
z=√(4−x²−y²): f(D)=[0,2]

The first is a tilted plane; the second a bowl-shaped paraboloid whose height is squared distance from the origin. The saddle rises as x² along y=0 and falls as −y² along x=0. For z≥0 use (√z,0); for z<0 use (0,√(−z)): this proves range ℝ.

The hill e^(−x²−y²) has maximum 1 at the origin, remains positive and approaches zero far away: range (0,1], not [0,1]. For ln(y−x²), every height z occurs at x=0,y=e^z: range ℝ although the domain is not the whole plane.

Explore

8. Level sets: points sharing one height

L_k={(x,y)∈D : f(x,y)=k}
z=x²+y² ⇒ L_k: x²+y²=k
k<0: ∅; k=0: {(0,0)}; k>0: r=√k

A level set is drawn in xy; its corresponding intersection with z=k is in space. Same x,y coordinates, but height zero in the plane and k on the surface. “Curve” is convenient: a level set can be empty, a point, several curves or a region.

√(4−x²−y²)=k ⇒ x²+y²=4−k²; 0≤k≤2
ln(y−x²)=k ⇒ y=x²+e^k
x²−y²=0 ⇒ y=x ∨ y=−x

Before squaring the hemisphere equation require k≥0 to avoid spurious negative levels. k=2 gives one point; k=0 the boundary circle. Logarithm levels are parabolas strictly above y=x². The saddle’s zero level consists of two lines, not one.

Explore

9. Domain and possible heights: an excluded circle

z=1/(x²+y²−1); r²=x²+y²
0≤r²<1 ⇒ z∈(−∞,−1]
r²>1 ⇒ z∈(0,+∞)
f(D)=(−∞,−1] ∪ (0,+∞)
L_k: r²=1+1/k

Inside the excluded circle the denominator lies in [−1,0): z≤−1, with −1 at the origin. Outside it takes every positive value, as does its reciprocal. Zero and heights between −1 and 0 never occur. k=−1 gives a point, k=−2 a radius-√(1/2) circle, k=1 a radius-√2 circle; k=−1/2 nothing.

Heights near the circle can exceed any display window. Omitting high faces does not remove domain points; connecting the branches with an artificial wall would be wrong.

Explore

10. Traces: a bridge to one variable

z=x²+y²
y=1 ⇒ z=x²+1
x=2 ⇒ z=4+y²
z=1 ⇒ x²+y²=1

The first two traces are vertical: fix one coordinate and vary the other. The third is horizontal, associated with a level: fix the output and find inputs. Different questions. For the saddle, y=0 gives z=x² and x=0 gives z=−y²: oppositely oriented parabolas.

Two traces do not always determine a surface. f=0 and g=xy coincide on both coordinate axes but give 0 and 1 at (1,1). This caution returns when approaching points along different paths.

Explore

11. Temperature: the model domain matters

T(x,y)=20−x²−y²
D=[−3,3]×[−3,3]
T(1,2)=20−1−4=15
T(x,y)=16 ⇔ x²+y²=4
y=1 ⇒ T(x,1)=19−x², −3≤x≤3
T(D)=[2,20]

Coordinates are metres, temperature Celsius; coefficients carry the needed units. Algebra permits ℝ², but the room is a side-6 square. Here 0≤x²+y²≤18: maximum 20 at center, minimum 2 at corners. Every intermediate value occurs on diagonal (t,t),0≤t≤3.

The 16°C level is a radius-2 circle inside the room. Without physical restriction, range would be (−∞,20]. Model domains are not determined only by algebraic prohibitions.

Explore

12. Using the lab and preparing the next step

Choose one of eight examples and compare the exact condition with the green region. Move (x₀,y₀): domain membership first, then height. Change k: orange levels appear in the plane and at height k on the surface. An existing level outside the window is not empty. Traces fix x or y.

Rotate by touch, mouse, arrows or sliders. [−R,R]² and |z|≤H limit the view, not the domain. Vertical scale depends on H: a surface can look flatter without changing formula. The mesh can miss valid boundary regions, so domains and levels are also explained algebraically.

Procedure: inputs and units; domain conditions; boundaries and exclusions; values; range; levels and traces. The next block-three chapter will cover multivariable limits and continuity, with links when available.

Explore

Exercises: try before revealing

1. Compute f(2,−1) for f=x²+3y.

Show the explained answer

Keep input order: 2²+3(−1)=4−3=1. Do not swap coordinates.

2. Domain and range of √(4−x²−y²)?

Show the explained answer

Radicand ≥0: disk x²+y²≤4 including boundary. Height runs from 0 on the boundary to 2 at origin, attaining all intermediate values: range [0,2].

Explore

3. Is the boundary allowed for 1/√(4−x²−y²)?

Show the explained answer

No: the root is a denominator. Require 4−x²−y²>0, hence open disk x²+y²<4. Nonnegativity is insufficient.

4. For ln(y−x²), are (1,1) and (1,2) allowed?

Show the explained answer

Require y>x². (1,1) is excluded by ln0; (1,2) is allowed with ln1=0. Zero output is not a zero logarithm argument.

Explore

5. Does √(xy) allow (−2,−3)?

Show the explained answer

Yes: xy=6≥0, height √6. Two negatives and both axes are allowed; negative products are excluded.

Explore

6. For the bowl, describe levels k=−1,0,4.

Show the explained answer

x²+y²=k: −1 is impossible; 0 gives only origin; 4 gives a radius-2 circle. A level set need not be a curve.

Explore

7. Does the hemisphere have level k=−1?

Show the explained answer

No: the square root is nonnegative. Squaring gives x²+y²=3, but those points have height +1, not −1: spurious solutions of the original equation.

Explore

8. Which saddle traces arise at y=0 and x=0?

Show the explained answer

For z=x²−y², y=0 gives z=x² and x=0 gives z=−y². One rises, the other falls. Level z=0 is instead the union y=x and y=−x.

Explore

9. Why is the full sphere not z=f(x,y)?

Show the explained answer

At x=y=0, x²+y²+z²=4 gives z=±2: two outputs for one input. Choosing one hemisphere restores uniqueness.

10. Can 1/(x²+y²−1) equal −1/2?

Show the explained answer

No: the level requires x²+y²=1+1/(−1/2)=−1. Range is (−∞,−1]∪(0,+∞); −1 is attained at origin.

Explore

11. Does the Gaussian hill attain zero?

Show the explained answer

No: e^(−x²−y²)>0 at every finite point. Maximum 1 occurs at origin; zero is only approached far away. Range (0,1].

Explore

12. Does height beyond H exclude a domain point?

Show the explained answer

No. On the bowl, (2,2) is allowed and z=8. With H=6 it is not drawn on the surface but remains in the domain. Level k=8 also exists; the view may crop it.

Explore

Before: Fourier series · Learning-path index

Further reading