We've been graphing curves in space using parametric equations, where x, y, and z vary with respect to t. Now we're going to switch gears a bit and look at graphs of functions like
z=f(x,y),
where z is a function of x and y. In other words, each combination of x and y corresponds to a value of z. What will these graphs look like, in general? In two dimensions, we had y=f(x), which described a curve in the xy plane, as each value of x corresponded to a value of y. Now, in three dimensions, a function z=f(x,y) will trace out a surface in R3, where the height of the surface at any given point (x,y) is z.
For example, consider
z=x−22x+y−2.
The domain of this function depends on where the denominator is 0 and where the square root in the numerator is negative. Specifically, the domain is
D={(x,y):x̸=2,y≥−2x+2}.
The graph is shown below (note that Matlab goes a bit wacky at x=2, the discontinuity.
Ellipsoid
Graph the following equation. Note that it is not actually a function, since it isn't one-to-one.
9x2+16y2+25z2=1
Solution
One way to graph an equation like this is to use traces, which are curves in a plane parallel to one of the coordinate planes. For instance, if we let z=0, we get a graph in the xy plane:
9x2+16y2+2502=1⟶9x2+16y2=1
This is an ellipse with major and minor axes of 4 and 3. For other values of z, we graph ellipses in planes above or below z=0, until z=±5, where the ellipse shrinks to a point.
The graph looks like the following (kind of like an M&M shape):
Paraboloid
Graph the following function.
z=f(x,y)=x2+y2
Solution
Consider different values of z again:
z−101249Curvex2+y2=−1x2+y2=0x2+y2=1x2+y2=2x2+y2=4x2+y2=9DescriptionImpossiblePoint at the originCircle of radius 1 centered at the originCircle of radius 2 centered at the originCircle of radius 4 centered at the originCircle of radius 9 centered at the origin
We'll use Matlab to see the graph of this function:
>> fsurf(@(x,y) x.^2+y.^2)
This is called a paraboloid, and as the name suggests, it looks like a parabola in both directions.
The domain of this function is
D={(x,y):−∞<x<∞,−∞<y<∞}
and the range is
R={z:0≤z<∞}.
Level Curves
We've already used level curves; when we held z constant and described the resulting curve in a horizontal plane, we were finding paths where the elevation doesn't change. Think about a topographic map; it shows the level curves of terrain.
Describe the level curves of the following function.
f(x,y)=y−x2−1
Solution
If we hold the function constant (f(x,y)=z=z0), we get curves like
y−x2−1=z0⟶y=x2+1+z0
Since 1+z0 is a constant, these are parabolas.
The graph of the function and a few of the level curves are shown below.
Describe the level curves of the following function.
f(x,y)=2+sin(x−y)
Solution
Hold z constant:
2+sin(x−y)=z0⟶y=x−sin−1(z0−2)
Note that sin−1(z0−2) is a constant, so these are straight lines y=x−k.
The graph of the function is shown below, and you should be able to see that the function stays constant along straight lines.
Applications
Electric Potential
The electric potential function for two positive charges, one at (0,1) with twice the charge of one at (0,1), is given by
ϕ(x,y)=x2+(y−1)22+x2+(y+1)21
Is the electric potential greater at (3,2) or (2,3)?
Describe how the electric potential varies along the line y=x
Solution
Domain: where is the denominator in each term 0?
x2+(y−1)2=0x2+(y+1)2=0⟶(0,1)⟶(0,−1)
Therefore, the domain is every point except for these two (the potential approaches infinity near these points).
D={(x,y):R2∖{(0,1)∪(0,−1)}}
Plug these two points into the function:
ϕ(3,2)ϕ(2,3)=9+12+9+91≈0.868=4+42+4+161≈0.931
Therefore, the potential is greater at (2,3).
Replace y with x:
ϕ=x2+(x−1)22+x2+(x+1)21=2x2−2x+12+2x2+2x+11
Economics
The output Q of an economic system subject to two inputs, such as labor L and capital K, can be modeled by the Cobb-Douglas production function
Q(L,K)=cLaKb
where a, b, and c are positive real numbers.
Suppose a=31, b=32, and c=40. We can graph this with Matlab:
>> fsurf(@(x,y) 40.*x.^(1/3).*y.^(2/3))
If L is held constant at 10, find the dependence of Q on K.