Symbolic Calculation of Slope



Introduction

If we wish to calculate the average slope of a graph of a function y = f(x) between two points, we need to find the rise and run between those two points. If all we are given is the x coordinates of the points, we simply substitute to find the y coordinates.

For example if y = f(x) = x^2 + 5, and we wish to find the average slope between the points corresponding to x = -1 and x = 2, we begin by finding the y coordinates corresponding to each of the x coordinates.

When x = -1, we get y = f(-1) = (-1)^2 + 5 = 6, so the first point is (x1,y1) = (-1,6).

When x = 2, we get y = f(2) = (2)^2 + 5 = 9, so the second point is (x2, y2) = (2, 9).

The average slope between these points is calculated from the rise and the run between the points.

The run is x2 - x1 = 2 - -1 = 3, while the rise is y2 - y1 = 9 - 6 = 3.

The slope is therefore rise / run = (y2 - y1) / (x2 - x1) = 3 / 3 = 1.

You should be completely familiar with this sort of calculation before proceeding with the material on this page.

Preliminary Exercise:

1. Calculate the average slope of the function y = .1 x^2 - 3 between x = -2 and x = 7. Accompany your work with an appropriate labelled sketch of the slope triangle. Use the notation of the preceding example.

Expressing the slope when the function y = f(x) is not specified

More generally, if y = f(x) is any function, we could say that

When x1 = -1, y1 = f(-1), so the first point is (x1, y1) = (-1,f(-1)).

When x2 = 2, y2 = f( 2), so the first point is (x2, y2) = (2,f(2)).

The run is therefore x2 - x1 = 2 - -1 = 3.

The rise is y2 -y1 = f(x2) - f(x1).

So the slope is (y2 - y1) / (x2 - x1) = (f(x2) - f(x1)) / (x2 - x1).

Exercises 2-3:

2. If the function is y = depth(t), with t representing the clock time and y the depth of water in a uniform cylinder, express the slope between clock times t = 10 and t = 30. Use a notation analogous to that of the preceding example, and explain what is represented by the rise, the run and the slope. Accompany your work with a generic graph (by generic we mean that the shape of the graph is arbitrary, and shouldn't look like any specific function).

3. If the function is y = springLength(load), where y represents the length of a spring and the variable 'load' represents the load on the spring in cups of water, express the slope between load = 3 and load = 10. Explain what is represented by the rise, the run and the slope. Accompany your work with a generic graph.

Expressing the points (x1, y1) and (x2, y2) symbolically

If we have an unspecified function y = f(x) and we wish to find an expression for the slope between two points, without specifying the numerical coordinates of the points, we begin by letting x1 and x2 stand for the two x values.

Then we find the corresponding y coordinates.

If x = x1, then y = f(x) = f(x1), giving us the point (x1, f(x1)).

If x = x2, then y = f(x) = f(x2), giving us the point (x2, f(x2)).

These points are illustrated for a generic function on the graph below.

The_slope_of_f(x)_between_x1_and_x2_1.gif (4080 bytes)

** Note that parenthese aren't closed on (x2, f(x2)).  That is a careless error by the author.  Just to show you that nobody's perfect, I'm going to leave it in here.  But I'll later correct it on the rest of the graphs on this page.

Exercises 4-5:

4. If we have the function depth(t) of the preceding exercise set, what is the expression for the points corresponding to t = t1 and t = t2? Show all steps in your work and accompany your work with a diagram. 

5. For the function springLength(load), write the general expression for the graph points corresponding to load = load1 and load = load2. Show all steps in your work and accompany your work with a diagram.

Expressing the slope symbolically in terms of x1, x2 and f(x)

Once we have the coordinates of the two points, can continue the calculation of slope.

The run is expressed simply as x2 - x1; since all we know about the x coordinates is their labels, this is all we can say.

The rise is expressed as y2 - y1 = f(x2) - f(x1); again, since all we know about the x coordinates is their labels, this is all we can say.

The slope is therefore rise / run = ( f(x2) - f(x1) ) / (x2 - x1). Again this is the best we can do.

This might not seem like much. It doesn't give us numbers, so it seems like we don't know any more than we did before we endured all this pain. However, the expression ( f(x2) - f(x1) ) / (x2 - x1) actually gives us two things.

The first thing we get from the expression ( f(x2) - f(x1) ) / (x2 - x1) is a summation of our knowledge. If we can visualize the graph below when we see the expression, understanding that the numerator ( f(x2) - f(x1) ) represents the rise between two points and (x2 - x1) the run, we can be sure that we really understand the calculation of slopes.

The other thing we get is a formula. If we really understand the calculation of the slope, then we can program the formula into a computer. We can even use the f(x) notation, and all we need to do is redefine the function f(x) and give the container a series of x1 and x2 values. Or, if we are doing a lot of repetitive calculations by hand, we can use the formula as a guide to help us stay on track.

The diagram below represents this slope expression

The_slope_of_f(x)_between_x1_and_x2_2.gif (4897 bytes)

Exercises 6-10:

6.  If we have the function depth(t) of the preceding exercise set, what is the expression for the slope between t = t1 and t = t2? Show all steps in your work and accompany your work with a diagram.

7.  For the function springLength(load), write the general expression for the slope between load = load1 and load = load2. Show all steps in your work and accompany your work with a diagram.

8.  For the function y = f(t) = 40 (2^(-.3 t) ) + 25, where y is the Celsius temperature of an object as it cools to room temperature 25 Celsius and t is time in minutes, use the formula ( f(t2) - f(t1) ) / (t2 - t1) to find the average rate of temperature change between t = 10 and t = 20, then between t = 20 and t = 30, and finally between t = 30 and t = 40.

9.   Once you have learned DERIVE, author the following lines:

f(t) := 40 * 2^(-3t) + 25

slope(a,b) := ( f(b) - f(a) ) / (b-a)

a := 10

b := 20

slope(a,b)

and approximate the last line. Compare your result with your answers to #8.

Then author the lines

slope(20,30)

slope(30,40)

and approximate each of these lines (highlight the line you wish to approximate, using the arrow keys).

Compare your results with your answers to #8.

Explain the meaning of everything you did in this exercise.

10. The two figures below represent the symbolic expression for the slope between two arbitrary x values x1 and x2.

Without looking at the graphs, which will distract you from the process of substitution and simplification, use the formula (f(x2) - f(x1)) / (x2 - x1), with the symbolic function f(x) = mx + b, to express the slope of y = f(x) between x = x1 and x = x2.

Simplify your expression.

Explain everything you have done in this problem in terms of the graphs. Explain everything in the graphs in terms of what you have done.

The_slope_of_mx+b_between_x1_and_x2_1.gif (4030 bytes)

The_slope_of_mx+b_between_x1_and_x2_2.jpg (25140 bytes)

** note jpeg; gif won't load ??