Slope of a Line Between Two Points on a Function - At A Glance

We've already done this in the case where the function is a line, but what happens if the line isn't straight? What if it's snake-shaped or U-shaped? What if it's as curvy as a mudflap? Now we'll find the slope of a line between two points on any wonky function we like.

Sample Problem

Find the slope of the line between the two points shown.

Since we're given a formula for the function f, we can say

Then we can find the rise and run from this picture:

A line between two points on a function is called a secant line.

Asking to find the slope of the "secant line" between two points on a function means the same thing as asking to find the slope of the "line" between those two points.

A secant line is a line between two points on a function. We've been thinking about a secant line as a line that starts at the point on f where x = a, and ends at the point on f where x = b. For what's coming, it will be helpful to think of starting at (af(a)) and ending at some "other point." The "other point" will be described by how far away its x-value is from a. Poor b is getting fired, to be replaced by a + h

h is whatever we need to make a + h equal the number formerly known as b, not to be confused with the artist formally known as Prince.

Sample Problem

Before, we had a = 1 and b = 1.5. a and b were equally important:

Now we have a = 1 and h = 0.5. a is important, and the distance of the other point from a is important:

Sample Problem

Before, we had a = 1 and b = -2:

Now we have a = 1 and h = -3:

The moral of the story is that we can think of a secant line on the function f as a line that starts at the point on f where x = a and ends at the point on f where xa + h:

Since h measures the distance (and direction) from our starting point to our ending point, h is conveniently equal to the "run" we need for the slope formula:

We find a lovely formula for the slope of the secant line on the function f from x = a to x = a + h:

If h is negative the formula will be the same, and the picture will look slightly different:

By letting h get smaller and smaller, we can get a better idea of what the slope of the function is at a particular point, x = a.

Example 1

Find the slope of the line between the two points shown.


Example 2

If f(x) = x3 + 1, find the slope of the secant line between the two points on the function where x = 1 and x = 3.


Example 3

Let f(x) = 1 – x2. What is the slope of the secant line between (af(a)) and (a + hf(a h)) where a = -1 and h = -0.25.


Exercise 1

For the given function f and values of a and b, find the slope of the secant line between the points (af(a)) and (bf(b)): 

f(x) = x2a = 1, b = 2.


Exercise 2

For the given function f and values of a and b, find the slope of the secant line between the points (a, f(a)) and (b, f(b)):

f(x) = x2a = 1, b = 1.5.


Exercise 3

For the given function f and values of a and b, find the slope of the secant line between the points (a, f(a)) and (bf(b)):

f(x) = sin(x), a = 0, b = π/2.


Exercise 4

For the given function f and values of a and b, find the slope of the secant line between the points (a, f(a)) and (bf(b)):

f(x) = x3 – 2x + 3, a = 1, b = 4.


Exercise 5

For the given function f and values of a and b, what is the slope of the secant line between the points (a, f(a)) and (bf(b))?

f(x) = x– 2, a = -2, b = 2.


Exercise 6

Given the values of a and b, what must h be so that a + h = b?

a = 4, b = 4.25.


Exercise 7

Given the values of a and b, what must h be so that a + h = b?

a = -1, b = -1.5.


Exercise 8

For the given function f, value of a, and value of h, what is the slope of the secant line between (af(a)) and (a + hf(ah))?

f(x) = x2, a = 1, h = 0.1.


Exercise 9

For the given function f, value of a, and value of h, what's the slope of the secant line between (af(a)) and (a + hf(a + h))?

f(x) = 1 – x2, a = 0, h = 0.1.


Exercise 10

For the given function f, value of a, and value of h, what's the slope of the secant line between (af(a)) and (a + hf(a + h))?

f(x) = cos(x), a = 0, h = -π/2.


Exercise 11

For the given function f, value of a, and value of h, what's the slope of the secant line between (af(a)) and (a + hf(a + h))?

f(x) = x3x, a = 1, h = 4.


Exercise 12

For the given function f, value of a, and value of h, what's the slope of the secant line between (af(a)) and (a hf(a + h))?

f(x) = 3x, a = -2,and h = -0.2.