You are on page 1of 5

Linear Functions from the Numerical Point of View Note: Make sure macros are enabled;

(Based on Example 1 in the text.) otherwise, the buttons will not work.

In this sheet, we look at two tables of data and determine which, if either, represents a linear function.
The data in question are shown under f(x) and g(x).

1. Click on cell C23 and look at the formula: (B23-B22)/(A23-A22) = Delta F/Delta X = m.
If f were linear, of the form f(x) = mx + b, then all the quantities in column C would be the same and equal to m.
Since they are not the same, we conclude that the function f is not linear.

x f(x) Delta f/Delta x x g(x) Delta g/Delta x


0 3 0 3
2 -1 -2 2 -1
4 -3 -1 4 -5
6 -6 -1.5 6 -9
8 -8 -1 8 -13
10 -13 -2.5 10 -17
12 -15 -1 12 -21

2. Now test the function g by filling in the formula for Delta g/Delta x.
(Enter the formula in cell H23 and copy it into the rest of the column.)
Press this button to have the computer fill in the cells:

Press this button to revert to empty cells:

Question What can you conclude about the function g?

3. Now graph the functions f and g (data shown below). (See the Section 1.2 Tutorial for help on graphing.)

x f(x) g(x)
0 1 3
2 2 7
4 4 11
6 8 15
8 16 19
10 32 23
12 64 27
14 128 31
16 256 35
Go to the sheet "Equation" for a discussion on finding the equation of a straight line.
Finding the Equation of a Line
(Based on Example 3 in the book.)

We learned in Section 1.3 that the equation of the line through the point (x1, y1) with slope m is

y = mx + b

where the intercept is

b = y1 - m*x1

We also learned in Example 3 that the point and slope can be given either directly, or indirectly.

(a) Finding the equation of a line, given a point and slope

x1 y1 m
1 3 2 We entered the data for (x1, y1) = (1, 3) and m = 2.

m b Here is the calculation of m and b.


2 1 (Click on the cells to see how we used the above formula for b.)

Thus, the equation of the line is: y = 2x + 1

Try changing x0, y0, and m, and see what happens!

(b) Finding the equation of a line through two given points

x1 y1 x2 y2
1 2 3 -1 The coordinates of the two points

m b Here is the calculation of m and b.


-1.5 3.5 Notice that we used m = (y2-y1)/(x2-x1)

Thus, the equation of the line is: y = -1.5x + 3.5

Try changing the coordinates of the points, and see what happens!

(c) Using the built-in function LINEST()

x y m b
1 2
3 -1

The two given points are entered above.


1. Using the mouse, highlight the yellow colored pair of cells.
2. Type "=LINEST(C46:C47,B46:B47)" and press contrl+shift+enter.
(If you have difficulties with this, press escape and try again.)
Note: C46:C47 refers to the y-coordinates, and B46:B47 refers to the x-coordinates.

(d) Graphically, using the built-in trendline feature

1. Highlight the table of x- and y-values (cells B45 through C47).


2. Create an XY (Scatter) graph with points (no lines) and "series in columns."
3. With the chart selected, select Chart -> Add Trendline… and choose the "linear" trendline.
Under "Options," choose "show equation."
Press here to have the computer generate the graph:

You might also like