Mathematical methods for economic theory

Martin J. Osborne

1.7 Graphical representation of functions

Diagrams are very helpful in solving many mathematical problems involving functions. They are especially helpful in solving optimization problems, which occur throughout economic theory. Learning how to graphically represent functions will help enormously in understanding the material in this tutorial.

Functions of a single variable

A function of a single variable is most usefully represented by its graph.

Linear functions

A linear function of a single variable has the form
f(x) = ax + b.
(Some mathematicians call such a function “affine” rather than linear, reserving the term “linear” for functions of the form f(x) = ax.) The graph of this function is a straight line with slope a; its value when x = 0 is b. Two examples are shown in the following figures.

x 0 f(x) = ax + b, with a > 0, b > 0 b    x 0 f(x) = ax + b, with a < 0, b < 0 b

Quadratic functions

A quadratic function of a single variable has the form
f(x) = ax2 + bx + c
with a ≠ 0. The graph of such a function takes one of the two general forms shown in the following figure, depending on the sign of a.

f(x) = ax2 + bx + c, with a > 0 cb2/4a b/2a    f(x) = ax2 + bx + c, with a < 0 cb2/4a b/2a

The derivative of the function is zero when x = −b/2a, at which point the value of the function is c − b2/4a. The function may be written as

a(x + b/2a)2 + c − b2/4a.
We can see from this expression that for any number z, the value of the function is the same at z − b/2a as it is at −z − b/2a. That is, the graph of the function is symmetric about a vertical line at x = −b/2a. The steepness of the graph depends on the parameters a and b: the derivative of the function at the point x is 2ax + b.

Example
Sketch the graph of 2x2 − 8x + 6. The coefficient of x2 is positive, so the graph is U-shaped. The derivative is zero at x = 2, at which point the value of the function is −2. The value of the function at x = 0 is 6. The function is sketched in the following figure.

f(x) = 2x2 − 8x + 6 6 −2 2

Reciprocal function

The function
f(x) = c/x
has one of the forms shown in the following figure, depending on the sign of c. For c > 0 the graph is symmetric about the line with slope 1 through the origin; for c < 0 it is symmetric about the line with slope −1 through the origin.

x 0 f(x) = c/x for c > 0 c c −√c −√c    x 0 f(x) = c/x for c < 0 √−c √−c −√−c −√−c

The curves in these diagrams are called “rectangular hyperbolae”.

Exponential function

The function
f(x) = ex
is positive for all values of x, takes the value 1 at x = 0, and has positive derivatives of every order. The fact that its derivatives of every order are positive means that it is increasing, its slope is increasing, the rate of increase of its slope is increasing, and so forth. Its graph is shown in the following diagram.

x 0 f(x) = ex 1 5 1 −1

Other functions

One way to see the graph of a arbitrary function is to have some plotting software draw it for you. You can do that by going to one of the many webpages that plot the graph of a function you specify. In fact, Google automatically provides a plot if you search for a formula or comma-separated list of formulas. (Try searching for x^2 or, if you'd like to see something more interesting, cos(3x)+sin(x), cos(7x)+sin(x).)

If you don't have a computing device handy (which is now of course an unlikely circumstance, and probably means you are on an outdoor adventure or writing an exam), it is usually helpful to examine several characteristics of the function:

  • the points (if any) at which its first derivative is zero
  • its value at the points at which its first derivative is zero
  • its value when x = 0
  • the points at which its value is zero
  • the behavior of its derivative.
Example
Sketch the function 2/x + x2/8. The derivative of this function is −2/x2 + x/4, which is zero when x = 2, at which point the value of the function is 3/2 and the second derivative is positive. As x decreases to 0, the value of the function increases without bound, and as x increases to 0, the value of the function decreases without bound. The value of the function is zero when x = −161/3, which is approximately −2.52 and the derivative is negative for all negative values of x. Putting this information together we get the following figure.

x 0 f(x) = 2/x + x2/8 3/2 4 2 4 −4 −4

Functions of two variables

The graph of a function of two variables is a surface in three dimensions. This surface may be represented in a perspective drawing on a piece of paper, but for many functions the drawing (a) is difficult to execute and (b) hides some features of the function---only parts are visible. Computer software allows you to construct such drawings easily, from many different viewpoints, solving both problems. (Try searching in Google for x^2 + y^2, for example. Or try x^2+y^3+200*cos(x), which may evoke memories of your favorite water park.) But even so, another way of looking at a function of two variables is useful. This method, which involves the construction of a topographic map of the function, may easily be carried out by hand for many functions.

Level curves

Let f be a function of two variables, and c a constant. The set of pairs (xy) such that
f(xy) = c
is called the level curve of f for the value c.

Example
Let f(xy) = x2 + y2 for all (xy). The level curve of f for the value 1 is the set of all pairs (xy) such that x2 + y2 = 1, a circle of radius 1. This set is shown in the following figure.

x y 0 1 −1 1 −1 x2 + y2 = 1

Example
Let f(xy) = a(x − b)2 + c(y − d)2. Each level curve of this function is an ellipse centered at (bd). If a = c the ellipse is a circle (as in the previous example). If a < c it is elongated horizontally; if a > c then the ellipse is elongated vertically. Examples are shown in the following figures.

x y 0 b d a(xb)2 + c(yd)2 = r2 (b < 0, d > 0, a < c)    x y 0 b d a(xb)2 + c(yd)2 = r2 (b > 0, d > 0, a > c)

Example
Let f(xy) = xy for all (xy). The level curve of f for the value 1 is the set of all pairs (xy) such that xy = 1, or, equivalently, y = 1/x. The part of this set for −3 ≤ x ≤ 3 and −3 ≤ y ≤ 3 is the union of the sets of points on the red lines in the following figure.

x 0 3 1 1 3 −1 −3 −1 −3

By drawing the level curves of a function for various values, we construct a topographic map of the function, which gives us a good picture of the nature of the function. If the values we choose are equally spaced (e.g. 1, 2, 3, or 10, 20, 30) then curves that are close indicate regions in which the rate of change of the function is large, whereas curves that are far apart indicate regions in which the rate of change of the function is small (just as contours close together on a map indicate hilly terrain and ones that are far apart indicate plains).

Example
Let f(xy) = x2 + y2 for all (xy). A collection of level curves of f is shown in the following figure. The number on each curve is the value of the function to which it corresponds. The circles are closer together for larger values of the function, so that the graph of the function is a bowl with sides whose slopes increase as we move away from the center.

x y 0 1 −1 2 −2 1 −1 2 −2 1 2 3 4

Example
Let f(xy) = xy for all (xy). A collection of level curves of f is shown in the following figure. The number on each curve is the value of the function to which it corresponds. (The level curve for the value 0 consists of the axes.)

x 0 1 2 3 −1 −2 −3 −1 −2 −3 1 2 3 3 2 1 1 2 3 −1 −2 −3 −1 −2 −3

Note that a level curve is defined as a set, and indeed some level curves of some functions are not “curves” at all.

Consider, for example, the function f defined by f(xy) = 1 for all (xy). (That is, the value of f is 1 for all values of x and y.) The level curve of this function for the value 2 is empty (there are no values of (xy) such that f(xy) = 2) and the level curve for the value 1 is the set all all points (xy).

In less extreme examples, some but not all level curves are sets. Consider a basically conical mountain, with terraces at heights of 20 and 40; every horizontal cross-section is a disk and a vertical cross-section through the peak is shown in the following figure.

10 20 30 40 50

Some level curves of the function defining the surface of this mountain are shown in the next figure. The level curves corresponding to heights of the terraces—20 and 40—are thick, whereas those corresponding to heights of 10 and 30 are not.

50 40 30 20 10

Contour lines on topographic maps of regions of the world are never thick because the earth is nowhere exactly flat (even in Manitoba).

Economists call the level curves of a utility function indifference curves and those of a production function isoquants.