Main content

## Calculus, all content (2017 edition)

### Course: Calculus, all content (2017 edition) > Unit 2

Lesson 7: Using the formal definition of derivative- The derivative of x² at x=3 using the formal definition
- The derivative of x² at any point using the formal definition
- Limit expression for the derivative of a linear function
- Limit expression for the derivative of cos(x) at a minimum point
- Limit expression for the derivative of function (graphical)
- Tangent lines and rates of change

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Tangent lines and rates of change

How tangent lines are a limit of secant lines, and where the derivative and rate of change fit into all this.

## Introduction

The position of a car driving down the street, the value of currency adjusted for inflation, the number of bacteria in a culture, and the AC voltage of an electric signal are all examples of quantities that change with time. In this section, we will study the rate of change of a quantity and how is it related geometrically to secant and tangent lines.

## Secant and tangent lines

If two distinct points P, left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis and Q, left parenthesis, x, start subscript, 1, end subscript, comma, y, start subscript, 1, end subscript, right parenthesis lie on the curve y, equals, f, left parenthesis, x, right parenthesis, the slope of the secant line connecting the two points is

m, start subscript, \sec, end subscript, equals, start fraction, y, start subscript, 1, end subscript, minus, y, start subscript, 0, end subscript, divided by, x, start subscript, 1, end subscript, minus, x, start subscript, 0, end subscript, end fraction, equals, start fraction, f, left parenthesis, x, start subscript, 1, end subscript, right parenthesis, minus, f, left parenthesis, x, start subscript, 0, end subscript, right parenthesis, divided by, x, start subscript, 1, end subscript, minus, x, start subscript, 0, end subscript, end fraction.

If we let the point x, start subscript, 1, end subscript approach x, start subscript, 0, end subscript, then Q will approach P along the graph f. The slope of the secant line through points P and Q will gradually approach the slope of the tangent line through P as x, start subscript, 1, end subscript approaches x, start subscript, 0, end subscript. In the limit, the previous equation becomes

m, start subscript, tangent, end subscript, equals, limit, start subscript, x, start subscript, 1, end subscript, \to, x, start subscript, 0, end subscript, end subscript, start fraction, f, left parenthesis, x, start subscript, 1, end subscript, right parenthesis, minus, f, left parenthesis, x, start subscript, 0, end subscript, right parenthesis, divided by, x, start subscript, 1, end subscript, minus, x, start subscript, 0, end subscript, end fraction.

If we let h, equals, x, start subscript, 1, end subscript, minus, x, start subscript, 0, end subscript, then x, start subscript, 1, end subscript, equals, x, start subscript, 0, end subscript, plus, h and h, right arrow, 0 as x, start subscript, 1, end subscript, right arrow, x, start subscript, 0, end subscript. We can rewrite the limit as

m, start subscript, tangent, end subscript, equals, limit, start subscript, h, \to, 0, end subscript, start fraction, f, left parenthesis, x, start subscript, 0, end subscript, plus, h, right parenthesis, minus, f, left parenthesis, x, start subscript, 0, end subscript, right parenthesis, divided by, h, end fraction.

When the limit exists, its value m, start subscript, tangent, end subscript is the slope of the tangent line to the graph of f at the point P, left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis.

## Example 1

Find the slope of the tangent line to the graph of the function f, left parenthesis, x, right parenthesis, equals, x, cubed at the point left parenthesis, 2, comma, 8, right parenthesis.

## Solution

Since left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis, equals, left parenthesis, 2, comma, 8, right parenthesis, using the slope of the tangent line formula

we get

Thus, the slope of the tangent line is 12. Recall from algebra that the point-slope form of the equation of the tangent line is

y, minus, y, start subscript, 0, end subscript, equals, m, start subscript, tangent, end subscript, dot, left parenthesis, x, minus, x, start subscript, 0, end subscript, right parenthesis.

The point-slope formula gives us the equation

which we can rewrite as

y, equals, 12, x, minus, 16.

## Finding the slope at any point

Next we are interested in finding a formula for the slope of the tangent line at any point on the graph of f. Such a formula would be the same formula that we are using except we replace the constant x, start subscript, 0, end subscript by the variable x. This yields

m, start subscript, tangent, end subscript, equals, limit, start subscript, h, \to, 0, end subscript, start fraction, f, left parenthesis, x, plus, h, right parenthesis, minus, f, left parenthesis, x, right parenthesis, divided by, h, end fraction.

We denote this formula by

f, prime, left parenthesis, x, right parenthesis, equals, limit, start subscript, h, \to, 0, end subscript, start fraction, f, left parenthesis, x, plus, h, right parenthesis, minus, f, left parenthesis, x, right parenthesis, divided by, h, end fraction,

where f, prime, left parenthesis, x, right parenthesis is read "f prime of x." The next example illustrates its usefulness.

## Example 2

If f, left parenthesis, x, right parenthesis, equals, x, squared, minus, 3, find f, prime, left parenthesis, x, right parenthesis and use the result to find the slopes of the tangent lines at x, equals, 2 and x, equals, minus, 1.

## Solution

Since

f, prime, left parenthesis, x, right parenthesis, equals, limit, start subscript, h, \to, 0, end subscript, start fraction, f, left parenthesis, x, plus, h, right parenthesis, minus, f, left parenthesis, x, right parenthesis, divided by, h, end fraction,

then

To find the slope, we substitute x, equals, 2 and x, equals, minus, 1 into the result f, prime, left parenthesis, x, right parenthesis. We get

and

f, prime, left parenthesis, minus, 1, right parenthesis, equals, 2, left parenthesis, minus, 1, right parenthesis, equals, minus, 2.

Thus, slopes of the tangent lines at x, equals, 2 and x, equals, minus, 1 are 4 and minus, 2, respectively.

## Example 3

Find the slope of the tangent line to the graph of f, left parenthesis, x, right parenthesis, equals, 1, slash, x at the point left parenthesis, 1, comma, 1, right parenthesis.

## Solution

Using the slope of the tangent line formula

and substituting f, left parenthesis, x, right parenthesis, equals, 1, slash, x gives us

Substituting x, equals, 1 yields

f, prime, left parenthesis, 1, right parenthesis, equals, start fraction, minus, 1, divided by, left parenthesis, 1, right parenthesis, squared, end fraction, equals, minus, 1.

Thus, the slope of the tangent line at x, equals, 1 for the graph of f, left parenthesis, x, right parenthesis, equals, 1, slash, x is m, equals, minus, 1. To find the equation of the tangent line, we use the point-slope formula,

y, minus, y, start subscript, 0, end subscript, equals, m, dot, left parenthesis, x, minus, x, start subscript, 0, end subscript, right parenthesis,

where left parenthesis, x, start subscript, 0, end subscript, comma, y, start subscript, 0, end subscript, right parenthesis, equals, left parenthesis, 1, comma, 1, right parenthesis. The equation of the tangent line is

## Average speed

The primary concept of differential is calculating the rate of change of one quantity with respect to another. For example, speed is defined as the rate of change of the distance traveled with respect to time. If a car travels 120 miles in 4 hours, his speed is

start fraction, 120, start text, space, m, i, l, e, s, end text, divided by, 4, start text, space, h, o, u, r, s, end text, end fraction, equals, 30, start text, space, m, i, slash, h, r, end text.

This speed is called the average speed or the average rate of change of distance with respect to time. Of course, a car that travels 120 miles at an average rate of 30 miles per hour for 4 hours does not necessarily do so at constant speed. It may have slowed down or sped up during the 4 hour period.

However, if the car hits a tree, it would not be its average speed that determines the resulting damage but its speed at the instant of the collision. So here we have two distinct kinds of speeds, average speed and instantaneous speed.

The average speed of an object is defined as the object’s displacement triangle, x divided by the time interval triangle, t during which the displacement occurs:

The average speed is also the expression for the slope of a secant line connecting the two points. Figure 1 shows the start color #9d38bd, start text, s, e, c, a, n, t, space, l, i, n, e, end text, end color #9d38bd through the points start color #ff00af, left parenthesis, t, start subscript, 0, end subscript, comma, x, start subscript, 0, end subscript, right parenthesis, end color #ff00af and start color #ff00af, left parenthesis, t, start subscript, 1, end subscript, comma, x, start subscript, 1, end subscript, right parenthesis, end color #ff00af on the start color #6495ed, start text, p, o, s, i, t, i, o, n, negative, v, e, r, s, u, s, negative, t, i, m, e, space, c, u, r, v, e, end text, end color #6495ed.

Thus we conclude that the average speed of an object between time t, start subscript, 0, end subscript and t, start subscript, 1, end subscript is represented geometrically by the slope of the secant line connecting the two points left parenthesis, t, start subscript, 0, end subscript, comma, x, start subscript, 0, end subscript, right parenthesis and left parenthesis, t, start subscript, 1, end subscript, comma, x, start subscript, 1, end subscript, right parenthesis. If we choose t, start subscript, 1, end subscript close to t, start subscript, 0, end subscript, then the average speed will closely approximate the instantaneous speed at time t, start subscript, 0, end subscript.

## Rates of change

The average rate of change of an arbitrary function f on an interval is represented geometrically by the slope of the secant line to the graph of f. The instantaneous rate of change of f at a particular point is represented by the slope of the tangent line to the graph of f at that point. Let's consider each case in more detail.

### Average rate of change

The average rate of change of the function f over the interval open bracket, x, start subscript, 0, end subscript, comma, x, start subscript, 1, end subscript, close bracket is

Figure 2 shows the start color #9d38bd, start text, s, e, c, a, n, t, space, l, i, n, e, end text, end color #9d38bd through the points start color #ff00af, left parenthesis, x, start subscript, 0, end subscript, comma, f, left parenthesis, x, start subscript, 0, end subscript, right parenthesis, right parenthesis, end color #ff00af and start color #ff00af, left parenthesis, x, start subscript, 1, end subscript, comma, f, left parenthesis, x, start subscript, 1, end subscript, right parenthesis, right parenthesis, end color #ff00af on the start color #6495ed, start text, g, r, a, p, h, space, o, f, end text, f, end color #6495ed. The slope of the secant line is the average rate of change m, start subscript, \sec, end subscript.

### Instantaneous rate of change

The instantaneous rate of change of the function f at the point x, start subscript, 0, end subscript is

Figure 3 shows start color #9d38bd, start text, t, a, n, g, e, n, t, space, l, i, n, e, end text, end color #9d38bd through the point start color #ff00af, left parenthesis, x, start subscript, 0, end subscript, comma, f, left parenthesis, x, start subscript, 0, end subscript, right parenthesis, right parenthesis, end color #ff00af on the start color #6495ed, start text, g, r, a, p, h, space, o, f, end text, f, end color #6495ed. The slope of the tangent line is the instantaneous rate of change m, start subscript, tangent, end subscript.

## Example 4

Suppose that y, equals, x, squared, minus, 3.

(a) Find the average rate of change of y with respect to x over the interval open bracket, 0, comma, 2, close bracket.

(b) Find the instantaneous rate of change of y with respect to x at the point x, equals, minus, 1.

## Solution

(a) Applying the formula for average rate of change with f, left parenthesis, x, right parenthesis, equals, x, squared, minus, 3 and x, start subscript, 0, end subscript, equals, 0 and x, start subscript, 1, end subscript, equals, 2 yields

This means the average rate of change over the interval open bracket, 0, comma, 2, close bracket is 2 units of increase in y for each unit of increase in x.

(b) From Example 2 above, we found that f, prime, left parenthesis, x, right parenthesis, equals, 2, x, so

This means that the instantaneous rate of change is negative. That is, y is decreasing at x, equals, minus, 1. It is decreasing at a rate of 2 units in y for each unit of increase in x.

## Want to join the conversation?

- What is the purpose of the function that appears at the very end of example 2? f(x)= 7 | x=1, f(x-1)+5 | x>1

What is this related to?(44 votes) - Do I understand correctly that the growth "h" is at the end of reduction of limit omited because its value is so small it has practically no effect on value of slope?(6 votes)
- Yes, because technically speaking we write "as the limit of h approaches zero" which means h keeps getting smaller and smaller until it is negligible.(12 votes)

- can someone explain to the math for substituting y=1/x in Example 3?

for some reason i cant see what happens in step one and two(4 votes) - How did we find the function at the end of example 2? f(x)=7 and f(x)=f(x-1)+5?(5 votes)
- It seems to be an orphan that was not removed before the lesson was posted. It doesn't relate to the previous example and is not related to the next example.(4 votes)

- In the example 1, I have not idea how do they get h^3+6h^2+12h+8 from f(2+h)−f(2), it is really confuse me. Can anyone explain?(5 votes)
- They're simply evaluating f(x) for
`x = 2 + h`

.`(2 + h)^3`

is equal to`h^3 + 6*h^2 + 12*h + 8`

.(4 votes)

- In figure 1, it doesn't make a lot of sense using a position vs time graph if you're talking about speed and that specific graph wasn't really a good choice since its slope can be negative and speed cannot be negative. You should use a displacement vs time graph instead or it's a bit confusing.(5 votes)
- I agree with Juan. I think that rather than using y to represent displacement (as it does in figure 1), a monotonically increasing function should be used to represent distance, since after all, we are looking at the rate of change in distance with respect to time.(1 vote)

- On example 3, when taking the derivative of 1/x,

at the third step while using the formula - "h" is somehow transferred from the lower denominator to the denominator above it:

x-(x+h)/x(x+h)/h --> x-(x+h)/xh(x+h)

Which algebric rule relates to that? I couldn't figure this out.(3 votes)- This is a complex fraction simplified. ((x - (x-h)) / x(x+h)) / h is the same thing as (x - (x-h)) / x(x+h)) * 1/h, in other words a/b/c = a/b * 1/c = a/bc(3 votes)

- In example 3, what if x is given but we'll have to find 'm' and 'c' with a given function? I'm confused(3 votes)
- the slope can be found out between any 2 points on a straight line. now substitute a variable point on the line in slopes equation . you get your whole equation of line(3 votes)

- In Example 4, after the first part is over, the answer found is 2. How is it equated to "2x" at the beginning of the solution of the second part?(2 votes)
- The average rate of change is the slope of the secant line between two points on a graph. The secant line in the example is written in the form where the change in y is the numerator and the change in x is the denominator. We find that between the points (0, f(0)) and (2, f(2), we "rise" 2 units in the y direction for every unit we "run" in the x direction. 2 is simply the scalar multiple of x that the line must take to pass through both points on the graph of f(x).(3 votes)

- What are the advantages and disadvantages of using the limit as
**h**approaches**0**form over the limit as**x**approaches**a**form.

(2 votes)- The limit as
**h**approaches**0**form is known as the*formal*definition of the derivative, and using it results in finding the derivative*function*, f'(x). The derivative function allows you to find the slope of the tangent line at any point of f(x). The limit as**x**approaches**a**form, or*alternate*definition of the derivative, is used to find the derivative at a specific point**a**, or f'(a). This form is more useful when you only need to the derivative at one specific point because it is usually less complex to evaluate than formal definition.(2 votes)