Functions and Their Graphs

Site: Saylor Academy
Course: MA005: Calculus I
Book: Functions and Their Graphs
Printed by: Guest user
Date: Wednesday, May 8, 2024, 6:10 PM

Description

Read this section for an introduction to functions and their graphs. Work through practice problems 1-5.

Functions and Their Graphs

When you prepared for calculus, you learned to manipulate functions by adding, subtracting, multiplying and dividing them, as well as calculating functions of functions (composition).  In calculus, we will still be dealing with functions and their applications.  We will create new functions by operating on old ones.  We will derive information from the graphs of the functions and from the derived functions.  We will find ways to describe the point–by–point behavior of functions as well as their behavior  "close to"  some points and also over entire intervals.  We will find tangent lines to graphs of functions and areas between graphs of functions.  And, of course, we will see how these ideas can be used in a variety of fields.
 
This section and the next one are  a review of information and procedures you should already know about functions before we begin calculus. 


Source: Dale Hoffman, https://s3.amazonaws.com/saylordotorg-resources/wwwresources/site/wp-content/uploads/2012/12/MA005-1.2-Lines-in-the-Plane.pdf
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.

What is a Function?

Definition of Function:

A function from a set X to a set Y is a rule for assigning to each element of the set X a single element of the set Y. A function assigns a unique (exactly one) output element in the set Y to each input element from the set X.

The rule which defines a function is often given by an equation, but it could also be given in words or graphically or by a table of values. In practice, functions are given in all of these ways, and we will use all of them in this book.

In the definition of a function, the set X of all inputs is called the domain of the function. The set Y of all outputs produced from these inputs is called the range of the function. Two different inputs, elements in the domain, can be assigned to the same output, an element in the range, but one input cannot lead to 2 different outputs.

Most of the time we will work with functions whose domains and ranges are real numbers, but there are other types of functions all around us. Final grades for this course is an example of a function. For each student, the instructor will assign a final grade based on some rule for evaluating that student's performance. The domain of this function consists of all students registered for the course, and the range consists of the letters A, B, C, D, F, and perhaps W (withdrawn). Two students can receive the same final grade, but only one grade will be assigned to each student.

Function Machines

Functions are abstract structures, but sometimes it is easier to think of them in a more concrete way. One way is to imagine that a function is a special purpose computer, a machine which accepts inputs, does something to those inputs according to the defining rule, and produces an output. The output is the value of the function for the given input value. If the defining rule for a function f is "multiply the input by itself" , f \; (input) = (input)(input) , then Fig. 1 shows the results of putting the inputs x,  5, a,  c + 3 and x + h into the machine f.


Practice 1: If we have a function machine g whose rule is "divide 3 by the input and add 1", g(x) = 3/x + 1, what outputs do we get from the inputs x,  5, a,  c + 3 and x + h ? What happens if we put 0 into the machine g?

You expect your calculator to behave as a function: each time you press the same input sequence of keys you expect to see the same output display. In fact, if your calculator did not produce the same output each time you would need a new calculator. (On many calculators there is a key which does not produce the same output each time you press it. Which key is that?)

Functions Defined by Equations

If the domain consists of a collection of real numbers (perhaps all real numbers) and the range is a collection of real numbers, then the function is called a numerical function. The rule for a numerical function can be given in several ways, but it is usually written as a formula. If the rule for a numerical function, f, is "the output is the input number multiplied by itself", then we could write the rule as f(x) = x.x = x^2 . The use of an "x" to represent the input is simply a matter of convenience and custom. We could also represent the same function by f(a) = a^2 f  (€ \# ) = \#^2 or f( input ) = ( input )^2 .

For the function f defined by f(x) = x^2 – x , we have that f(3) = 3^2 – 3 = 6, f(.5) = (.5)^2 – (.5) = –.25, and f(–2) = (–2)^2 – (–2) = 6. Notice that the two different inputs, 3 and –2, both lead to the output of 6. That is allowable for a function. We can also evaluate f if the input contains variables. If we replace the "x" with something else in the notation "f(x)", then we must replace the "x" with the same thing everywhere in the equation:
f(c) = c^2 – c ,  f(a+1) = (a+1)^2 – (a+1) = (a^2 + 2a + 1) – (a + 1) = a^2 + a,
f(x+h) = (x+h)^2 – (x+h) = (x^2+2xh+h^2) –
    (x+h) , and, in general, f(input) = (input)^2 – (input).

For more complicated expressions, we can just proceed step–by–step:

\frac{f(x+h) – f(x)}{h}   = \dfrac{{(x+h)^2 – (x+h)} – {x^2 – x}}{h}
      = \dfrac{{(x^2+2xh+h^2) – (x+h)} – {x^2 – x}}{h}

= \dfrac{2xh + h^2 – h}{h}   = \dfrac{h(2x + h – 1)}{h}   = 2x + h – 1.

Practice 2: For the function g defined by g(t) = t^2 – 5t , evaluate g(1), g(–2), g(w+3), g(x+h),
      g(x+h) – g(x), and \frac{g(x+h) – g(x)}{h}.

Functions Defined by Graphs and Tables of Values

The graph of a numerical function f consists of a plot of ordered pairs (x, y) where x is in the domain of f and y = f(x). A table of values of a numerical function consists of a list of some of the ordered pairs (x, y) where y = f(x). Fig. shows a graph of f(x) = sin(x) for –4 ≤ x ≤ 9.


A function can be defined by a graph or by a table of values, and these types of definitions are common in applied fields. The outcome of an experiment will depend on the input, but the experimenter may not know the "rule" for predicting the outcome. In that case, the experimenter usually represents the experiment function as a table of measured outcome values verses input values or as a graph of the outcomes verses the inputs. The table and graph in Fig. 3 show the deflections obtained when weights are loaded at the end of a wooden stick. The graph in Fig. 4 shows the temperature of a hot cup of tea as a function of the time as it sits in a 68o F room. In these experiments, the "rule" for the function is that f(input) = actual outcome of the experiment.


Tables have the advantage of presenting the data explicitly, but it is often difficult to detect patterns simply from lists of numbers. Graphs tend to obscure some of the precision of the data, but patterns are much easier to detect visually - we can actually see what is happening with the numbers.

Creating Graphs of Functions

Most people understand and can interpret pictures more quickly than tables of data or equations, so if we have a function defined by a table of values or by an equation, it is often useful and necessary to create a picture of the function, a graph.

A Graph from a Table of Values

If we have a table of values of the function, perhaps consisting of measurements obtained from an experiment, then we can simply plot the ordered pairs in the xy–plane to get a graph which consists of a collection of points.

Fig. 5 shows the lengths and weights of trout caught (and released) during several days of fishing. It also shows a line which comes "close" to the plotted points. From the graph, you could estimate that a 17 inch trout would weigh slightly more than one pound.


A Graph from an Equation

Creating the graph of a function given by an equation is similar to creating one from a table of values - we need to plot enough points (x,y) where y = f(x) so we can be confident of the shape and location of the graph of the entire function. We can find a point (x,y) which satisfies y = f(x) by picking a value for x and then calculating the value for y by evaluating f(x). Then we can enter the (x,y) value in a table or simply plot the point (x,y).

If you recognize the form of the equation and know something about the shape of graphs of that form, you may not have to plot many points. If you do not recognize the form of the equation then you will have to plot more points, maybe 10 or 20 or 234: it depends on how complicated the graph appears and on how important it is to you (or your boss) to have an accurate graph. Evaluating y =
    f(x) at a lot of different values for x and then plotting the points (x,y) is usually not very difficult, but it can be very time–consuming. Fortunately, there are now calculators and personal computers which will do the evaluations and plotting for you.

Is Every Graph the Graph of a Function?

The definition of function requires that each element of the domain, each input value, be sent by the function to exactly one element of the range, to exactly one output value, so for each input x-value there will be exactly one output y–value,  y = f(x). The points (x, y_1) and (x,y_2) cannot both be on the graph of f unless y_1 = y_2. The graphic interpretation of this result is called the Vertical Line Test.


Vertical Line Test for a Function:

A graph is the graph of a function if and only if a vertical line drawn through any point in the domain intersects the graph at exactly one point. 


Fig. 6(a) shows the graph of a function. Figs. 6(b) and 6(c) show graphs which are not the graphs of functions, and vertical lines are shown which intersect those graphs at more than one point. Non–functions are not "bad", and sometimes they are necessary to describe complicated phenomena.

Reading Graphs Carefully

Calculators and computers can help students, reporters, business people and scientific professionals create graphs quickly and easily, and because of this, graphs are being used more often than ever to present information and justify arguments. And this text takes a distinctly graphical approach to the ideas and meaning of calculus. Calculators and computers can help us create graphs, but we need to be able to read them carefully. The next examples illustrate some types of information which can be obtained by carefully reading and understanding graphs.

Example 1: A boat starts from St. Thomas and sails due west with the velocity shown in Fig. 7


(a) When is the boat traveling the fastest?
(b) What does a negative velocity away from St. Thomas mean?
(c) When is the boat the farthest from St. Thomas?

Solution: (a) The greatest speed is 10 mph at t = 3 \; hours.
(b) It means that the boat is heading back toward St. Thomas.
(c) The boat is farthest from St. Thomas at t = 6 \; hours. For t < 6 the boat's velocity is positive, and the distance from the boat to St. Thomas is increasing. For  t >
    6 the boat's velocity is negative, and the distance from the boat to St. Thomas is decreasing.

Practice 3: You and a friend start out together and hike along the
same trail but walk at different speeds (Fig. 8).


(a) Who is walking faster at t = 20?
(b) Who is ahead at t = 20?
(c) When are you and your friend farthest apart?
(d) Who is ahead when t = 50?

Example 2: In Fig. 9, which has the largest slope: the line through the points A and P, the line through B and P, or the line through C and P?


Solution: The line through C and P has the largest slope:  m_{PC} > m_{PB} > m_{PA}.

Practice 4: In Fig. 10, the point Q on the curve is fixed, and the point P is moving to the right along the curve toward the point Q. As P moves toward Q:


(a) the x–coordinate of P is Increasing, Decreasing, Remaining constant, or None of these.

(b) the x–increment from P to Q is Increasing, Decreasing, Remaining constant, or None of these

(c) the slope from P to Q is Increasing, Decreasing, Remaining constant, or None of these.


Example 3: The graph of y = f(x) is shown in Fig. 11. Let g(x) be the slope of the line tangent to the graph of f(x) at the point (x,f(x)).


(a) Estimate the values g(1), g(2) and g(3).

(b) When does g(x) = 0)?

(c) At what value(s) of x is g(x) largest?

(d) Sketch the graph of y = g(x).

Solution: (a) Fig. 11 shows the graph y = f(x) with several tangent lines to the graph of f. From Fig. 11 we can estimate that g(1) (the slope of the line tangent to the graph of f at (1,0) ) is approximately equal to 1. Similarly, g(2) ≈ 0 and g(3) ≈ –1.
(b) The slope of the tangent line appears to be horizontal (slope = 0) at x = 2 and at x = 5.
(c) The tangent line to the graph appears to have greatest slope (be steepest) near x = 1.5.
(d) We can build a table of values of g(x) and then sketch the graph of these values.

x f(x) g(x) = tangent slope at (x, f(x) )
0 -1 .5
1 0 1
2 2 0
3 1 -1
4 0 -1
5 -1 0
6 -.5 .5

The graph y = g(x) is given in Fig. 12.


Practice 5: Water is flowing into a container (Fig. 13) at a constant rate of 3 gallons per minute. Starting with an empty container, sketch the graph of the height of the water in the container as a function of time.


Practice Problem Answers

Practice 1:

Input Output
x
\dfrac{3}{x}+1
5 \dfrac{3}{5}+1 = 1.6
a \dfrac{3}{a}+1
0 g(0) =\dfrac{3}{0} +1 which is not defined because of division by 0.

Input Output
c+3 \dfrac{3}{c+3} +1
x+h \dfrac{3}{x+h} +1

Practice 2: g(t) = t^2 – 5t.
 g(1) = 1^2 – 5(1) = –4g(–2) = (–2)^2 – 5(–2) = 14.
 g(w + 3) = (w + 3)^2 –5(w + 3)  =  w^2 + 6w + 9 – 5w – 15  =  w^2 + w – 6.
 g(x + h) = (x + h) 
    – 5(x + h)  =  x^2 + 2xh + h^2  – 5x – 5h.
 g(x + h) – g(x)  = ( x^2 + 2xh + h^2  – 5x – 5h ) – ( x^2 – 5x )  =  2xh + h^2 – 5h.
 
\dfrac{g(x + h) – g(x)}{h}    =  \dfrac{2xh
    + h^2 – 5h}{h}     =   2x + h – 5.
 
Practice 3: (a)  Friend (b)  Friend  (c) At  t = 40.  Before that your friend is walking faster and increasing the distance between    you.  Then you start to walk faster than your friend and start to catch up.  (d) Friend.  You are walking faster than your friend at  t = 50, but you still have    not caught up.
 
Practice 4: (a) The x–coordinate is increasing. (b)  The  x–increment  ∆x  is  decreasing.  (c) The slope of the line through  P  and  Q  is  decreasing.
 
Practice 5: See Fig. 31.