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, where each contour line corresponds to points on the map that have equal elevation (Figure 1). A level curve of a function of two variables [latex]f(x,y)[/latex] works exactly the same way as a contour line on a topographical map.
Figure 1. (a) A topographical map of Devil’s Tower, Wyoming. Lines that are close together indicate very steep terrain. (b) A perspective photo of Devil’s Tower shows just how steep its sides are. Notice the top of the tower has the same shape as the center of the topographical map.
level curve
Given a function [latex]f(x,y)[/latex] and a number [latex]c[/latex] in the range of [latex]f[/latex], a level curve of a function of two variables for the value [latex]c[/latex] is defined to be the set of points satisfying the equation [latex]f(x,y)=c[/latex].
Consider the function [latex]g(x,y)=\sqrt{9-x^{2}-y^{2}}[/latex] with range [latex][0,3][/latex]. To find a level curve, we choose a value in this interval—say, [latex]c=2[/latex]—and set the function equal to this value:
[latex]\sqrt{9-x^{2}-y^{2}}=2[/latex].
Square both sides:
[latex]9-x^{2}-y^{2}=4[/latex].
Simplify by multiplying both sides by [latex]-1[/latex] and adding [latex]9[/latex]:
[latex]x^{2}+y^{2}=5[/latex].
This equation describes a circle centered at the origin with radius [latex]\sqrt{5}[/latex]. Using different values of [latex]c[/latex] between [latex]0[/latex] and [latex]3[/latex] yields other circles also centered at the origin. If [latex]c=3[/latex], the circle has radius [latex]0[/latex], so it consists solely of the origin. Figure 2 shows the level curves for [latex]c=0,1,2[/latex], and [latex]3[/latex].
Figure 2. Level curves of the function [latex]\small{g(x,y)=\sqrt{9-x^{2}-y^{2}}}[/latex], using [latex]\small{c=0,1,2}[/latex], and [latex]\small{3}[/latex] ([latex]\small{c=3}[/latex] corresponds to the origin).When contour lines are close together, the function is changing rapidly. When contour lines are far apart, the function is changing slowly. This is why steep mountain slopes show tightly packed contour lines on topographical maps.
A graph of the various level curves of a function is called a contour map.
contour map
A graph of the various level curves of a function is called a contour map.
Given the function [latex]f\,(x,\ y)=\sqrt{8+8x-4y-4x^{2}-y^{2}}[/latex], find the level curve corresponding to [latex]c=0[/latex]. Then create a contour map for this function. What are the domain and range of [latex]f[/latex]?
To find the level curve for [latex]c=0[/latex], we set [latex]f\,(x,\ y)=0[/latex] and solve. This gives
[latex]0=\sqrt{8+8x-4y-4x^{2}-y^{2}}[/latex].
We then square both sides and multiply both sides of the equation by [latex]-1[/latex]:
[latex]4x^{2}+y^{2}-8x+4y-8=0[/latex].
Now, we rearrange the terms, putting the [latex]x[/latex] terms together and the [latex]y[/latex] terms together, and add [latex]8[/latex] to each side:
[latex]4x^{2}-8x+y^{2}+4y=8[/latex].
Next, we group the pairs of terms containing the same variable in parentheses, and factor [latex]4[/latex] from the first pair:
[latex]4(x^{2}-2x)+(y^{2}+4y)=8[/latex].
Then we complete the square in each pair of parentheses and add the correct value to the right-hand side:
This equation describes an ellipse centered at [latex](1,\ -2)[/latex]. The graph of this ellipse appears in the following graph.
Figure 3. Level curve of the function [latex]\small{f(x,y)=\sqrt{8+8x-4y-4x^{2}-y^{2}}}[/latex] corresponding to [latex]\small{c=0}[/latex]
We can repeat the same derivation for values of [latex]c[/latex] less than [latex]4[/latex]. Then, the equation of an ellipse centered at (1,−2) becomes
for an arbitrary value of [latex]c[/latex]. Figure 4 shows a contour map for [latex]f\,(x,\ y)[/latex] using the values [latex]c=0,\ 1,\ 2[/latex], and [latex]3[/latex]. When [latex]c=4[/latex], the level curve is the point [latex](-1,\ 2)[/latex].
Figure 4. Contour map for the function [latex]f(x,y)=\sqrt{8+8x-4y-4x^{2}-y^{2}}[/latex], using the values [latex]c=0,1,2,3[/latex], and [latex]4[/latex].
Vertical Traces
Level curves are always graphed in the [latex]xy[/latex]-plane, but vertical traces are graphed in the [latex]xz[/latex]– or [latex]yz[/latex]-planes. Vertical traces help you understand how a surface behaves when you “slice” through it parallel to a coordinate plane.
vertical traces
Consider a function [latex]z=f(x,y)[/latex] with domain [latex]D\subseteq\mathbb{R}^{2}[/latex]. A vertical trace of the function can be either the set of points that solves the equation [latex]f(a,y)=z[/latex] for a given constant [latex]x=a[/latex] or [latex]f(x,b)=z[/latex] for a given constant [latex]y=b[/latex].
Find vertical traces for the function [latex]f\,(x,\ y)=\sin{x}\cos{y}[/latex] corresponding to [latex]x=-\frac{\pi}{4}, 0[/latex], and [latex]\frac{\pi}{4}[/latex], and [latex]y=-\frac{\pi}{4}, 0[/latex], and [latex]\frac{\pi}{4}[/latex].
First set [latex]x=-\frac{\pi}{4}[/latex] in the equation [latex]z=\sin{x}\cos{y}[/latex]:
This describes a cosine graph in the plane [latex]x=-\frac{\pi}{4}[/latex]. The other values of [latex]z[/latex] appear in the following table.
[latex]c[/latex]
Vertical Trace for [latex]x=c[/latex]
[latex]-\frac{\pi}{4}[/latex]
[latex]z=-\frac{\sqrt{2}\cos{y}}{2}[/latex]
[latex]0[/latex]
[latex]z=0[/latex]
[latex]\frac{\pi}{4}[/latex]
[latex]z=\frac{\sqrt{2}\cos{y}}{2}[/latex]
In a similar fashion, we can substitute the [latex]y[/latex]-values in the equation [latex]f\,(x,\ y)[/latex] to obtain the traces in the [latex]yz[/latex]-plane, as listed in the following table.
[latex]d[/latex]
Vertical Trace for [latex]y=d[/latex]
[latex]-\frac{\pi}{4}[/latex]
[latex]z=\frac{\sqrt{2}\sin{x}}{2}[/latex]
[latex]0[/latex]
[latex]z=\sin{x}[/latex]
[latex]\frac{\pi}{4}[/latex]
[latex]z=\frac{\sqrt{2}\sin{x}}{2}[/latex]
The three traces in the [latex]xz[/latex]-plane are cosine functions; the three traces in the [latex]yz[/latex]-plane are sine functions. These curves appear in the intersections of the surface with the planes [latex]x=-\frac{\pi}{4},\ x=0,\ x=\frac{\pi}{4}[/latex] and [latex]y=-\frac{\pi}{4},\ y=0,\ y=\frac{\pi}{4}[/latex] as shown in the following figure.
Figure 6. Vertical traces of the function [latex]f(x,y)[/latex] are cosine curves in the [latex]xz[/latex]-planes(a), and sine curves in the [latex]yz[/latex]-planes (b).
Functions of two variables can produce some striking-looking surfaces. Figure 7 shows two examples that combine different types of functions.
Figure 7. Examples of surfaces representing functions of two variables: (a) a combination of a power function and a sine function and (b) a combination of trigonometric, exponential, and logarithmic functions.