1 The graph of a function

Consider the function f ( x ) = 2 x . The output is obtained by multiplying the input by 2. We can choose several values for the input to this function and calculate the corresponding outputs. We have done this for integer values of x between 2 and 2 and the results are shown in Table 1.

Table 1

input, x 2 1 0 1 2
output, f ( x ) 4 2 0 2 4

To construct the graph of this function we first draw a pair of axes - a vertical axis and a horizontal axis. These are drawn at right-angles to each other and intersect at the origin as shown in Figure 7.


Figure 7 :

{ The two axes intersect at the origin}


Each pair of input and output values can be represented on a graph by a single point. The input values are measured along the horizontal axis and the output values are measured along the vertical axis. The horizontal axis is often called the x axis. The vertical axis is commonly referred to as the y axis so that we often write the function as

y = f ( x ) = 2 x

or simply

y = 2 x

Each pair of x and y values in the table is plotted as a single point, shown as in Figure 7. A general point is often labelled as ( x , y ) . The values x and y are said to be the coordinates of the point. The points are then joined with a smooth curve to produce the required graph as shown in Figure 7. Note that in this case the graph is a straight line. The graph can then be used to find function values other than those given in the table. For example, directly from the graph we can see that when x = 1.5 , the value of y is 3.

Task!

Draw up a table of values of the function f ( x ) = x 3 for x between 3 and 3. Use the table to plot a graph of this function.

Complete the following table:

input, x 3 2 1 0 1 2 3
output, f ( x ) 27 8 1 0 1 8 27

Now add your points to the graph of f ( x ) = x 3 and draw a smooth curve through them:

Dependent and independent variables

Since x and y can have a number of different values they are variables. Here x is called the independent variable and y is called the dependent variable . Knowing or choosing a value of the independent variable x , the function rule enables us to calculate the corresponding value of the dependent variable y . To show this dependence we often write y ( x ) . This is read as ‘ y is a function of x ’ or ‘ y depends upon x ’, or simply ‘ y of x ’. Note that it is the independent variable which is the input to the function and the dependent variable which is the output.

The domain and range of a function

The set of values which we allow the independent variable to take is called the domain of the function. A domain is often an interval on the x axis. For example, the function

y = g ( x ) = 5 x + 2 , 5 x 20

has any value of x between 5 and 20 inclusive as its domain because it has been stated as this. If the domain of a function is not stated then it is taken to be the largest set possible. For example

h ( t ) = t 2 + 1

has domain < x < since h is defined for every value of t and the domain has not been stated otherwise.

Later, you will meet some functions for which certain values of the independent variable must be excluded from the domain because at these values the function would be undefined. One such example is f ( x ) = 1 x for which we must exclude the value x = 0 , since 1 0 is a meaningless quantity.

Similarly, we must exclude the value x = 2 from the domain of f ( x ) = 1 x 2 .

The set of values of the function for a given domain, that is, the set of y values, is called the range of the function. The range of g ( x ) (above) is 23 g ( x ) 102 and the range of h ( t ) is 1 h ( t ) < , although this may not be apparent to you at this stage. Usually the range of a function can be identified quite easily by inspecting its graph.

Example 5

Consider the function given by g ( t ) = 2 t 2 + 1 , 2 t 2 .

  1. State the domain of the function.
  2. Plot a graph of the function.
  3. Deduce the range of the function from the graph.
Solution
  1. The domain is given as the interval 2 t 2 , that is any value of t between 2 and 2 inclusive.
  2. To draw the graph a table of input and output values must be constructed first. See Table 2.

    Table 2

    t 2 1 0 1 2
    y = g ( t ) 9 3 1 3 9

    Each pair of t and y values in the table is plotted as a single point shown as in Figure 8. The points are then joined with a smooth curve to produce the required graph.

    Figure 8 :

    { Graph of $g(t)=2t^2+1$}

  3. The range is the set of values which the function takes. By inspecting the graph we see that the range of g is the interval 1 g ( t ) 9 .
Task!

Consider the function given by f ( x ) = x 2 + 2 , 3 x 3

  1. State the domain of the function:

    3 x 3

  2. Draw up a table of input and output values for this function:

    x 3 2 1 0 1 2 3
    x 2 + 2 11 6 3 2 3 6 11
  3. Plot a graph of the function:
  4. Deduce the range of the function by inspecting the graph:

    (d) [ 2 , 11 ]

Exercises
  1. Explain the meaning of the terms ‘dependent variable’ and ‘independent variable’. When plotting a graph, which variables are plotted on which axes ?
  2. When stating the coordinates of a point, which coordinate is given first ?
  3. Explain the meaning of an expression such as y ( x ) in the context of functions. What is the interpretation of x ( t ) ?
  4. Explain the meaning of the terms ‘domain’ and ‘range’ when applied to functions.
  5. Plot a graph of the following functions. In each case state the domain and the range of the function.
    1. f ( x ) = 3 x + 2 , 2 x 5
    2. g ( x ) = x 2 + 4 , 2 x 3
    3. p ( t ) = 2 t 2 + 8 , 2 t 4
    4. f ( t ) = 6 t 2 , 1 t 5
  6. Explain why the value x = 7 should be excluded from the domain of f ( x ) = 5 x + 7 .
  7. What value(s) should be excluded from the domain of f ( t ) = 1 t 2 ?
  1. The independent variable is plotted on the horizontal axis.
  2. The independent variable is given first, as in ( x , y ) .
  3. x ( t ) means that the dependent variable x is a function of the independent variable t .
  4. Solution omitted
    1. domain [ 2 , 5 ] , range [ 4 , 17 ] ,
    2. [ 2 , 3 ] , [ 4 , 13 ] ,
    3. [ 2 , 4 ] , [ 8 , 40 ] ,
    4. [ 1 , 5 ] , [ 19 , 5 ] .
  5. f is undefined when x = 7 .
  6. t = 0 .