WOLFRAM|DEMONSTRATIONS PROJECT

Graph and Contour Plots of Functions of Two Variables

​
function
f(x,y)
a
2
x
+b
2
y
+cxy+dx
cos(axy+bx+cy)
log(axy+bx+cy+1)
a
2
x
+b
2
y
+c
2
x
y
2
x
+
2
y
constants
a
1
b
1
c
0
d
0
Visualizing the graph of a function of two variables is a useful device to help understand how a function behaves. For a function of two variables
f(x,y)
, the graph is a surface in 3D space.
If
f(x,y)
is a smooth function, its graph will be a smooth surface, and so will be the contour plot, where lines of constant altitude of the graph are drawn. Moreover, the surface lives only over the domain of the corresponding function (e.g., for a logarithmic function). This Demonstration shows some of these features for typical functions of two variables: a polynomial,
a
2
x
+b
2
y
+cxy+dx
, a composition of a trigonometric and a logarithmic function with a polynomial,
cos(axy+bx+cy)
and
log(axy+bx+cy+1)
, respectively, and a rational function,
a
2
x
+b
2
y
+c
2
x
y
2
x
+
2
y
. Observe that the first three functions (but not the rational function) are continuous and smooth on their corresponding domains for all possible choices of the constants. The behavior of the rational function is highly dependent on the constants of the numerator, and so is the smoothness of the corresponding graph.