Tangent Lines

We begin our study of calculus by revisiting the notion of secant lines and tangent lines. Recall that we used the slope of a secant line to a function at a point \(\left(\right. a , f \left(\right. a \left.\right) \left.\right)\) to estimate the rate of change, or the rate at which one variable changes in relation to another variable. We can obtain the slope of the secant by choosing a value of \(x\) near \(a\) and drawing a line through the points \(\left(\right. a , f \left(\right. a \left.\right) \left.\right)\) and \(\left(\right. x , f \left(\right. x \left.\right) \left.\right) ,\) as shown in Figure 3.3. The slope of this line is given by an equation in the form of a difference quotient:

\[m_{\text{sec}} = \frac{f \left(\right. x \left.\right) - f \left(\right. a \left.\right)}{x - a} .\]

We can also calculate the slope of a secant line to a function at a value a by using this equation and replacing \(x\) with \(a + h ,\) where \(h\) is a value close to 0. We can then calculate the slope of the line through the points \(\left(\right. a , f \left(\right. a \left.\right) \left.\right)\) and \(\left(\right. a + h , f \left(\right. a + h \left.\right) \left.\right) .\) In this case, we find the secant line has a slope given by the following difference quotient with increment \(h :\)

\[m_{\text{sec}} = \frac{f \left(\right. a + h \left.\right) - f \left(\right. a \left.\right)}{a + h - a} = \frac{f \left(\right. a + h \left.\right) - f \left(\right. a \left.\right)}{h} .\]

Definition

Let \(f\) be a function defined on an interval \(I\) containing \(a .\) If \(x \neq a\) is in \(I ,\) then

\[Q = \frac{f \left(\right. x \left.\right) - f \left(\right. a \left.\right)}{x - a}\]

is a difference quotient.

Also, if \(h \neq 0\) is chosen so that \(a + h\) is in \(I ,\) then

\[Q = \frac{f \left(\right. a + h \left.\right) - f \left(\right. a \left.\right)}{h}\]

is a difference quotient with increment \(h .\)

Media

View the development of the derivative with this applet.

These two expressions for calculating the slope of a secant line are illustrated in Figure 3.3. We will see that each of these two methods for finding the slope of a secant line is of value. Depending on the setting, we can choose one or the other. The primary consideration in our choice usually depends on ease of calculation.

This figure consists of two graphs labeled a and b. Figure a shows the Cartesian coordinate plane with 0, a, and x marked on the x-axis. There is a curve labeled y = f(x) with points marked (a, f(a)) and (x, f(x)). There is also a straight line that crosses these two points (a, f(a)) and (x, f(x)). At the bottom of the graph, the equation msec = (f(x) - f(a))/(x - a) is given. Figure b shows a similar graph, but this time a + h is marked on the x-axis instead of x. Consequently, the curve labeled y = f(x) passes through (a, f(a)) and (a + h, f(a + h)) as does the straight line. At the bottom of the graph, the equation msec = (f(a + h) - f(a))/h is given.
Figure 3.3 We can calculate the slope of a secant line in either of two ways.

In Figure 3.4(a) we see that, as the values of \(x\) approach \(a ,\) the slopes of the secant lines provide better estimates of the rate of change of the function at \(a .\) Furthermore, the secant lines themselves approach the tangent line to the function at \(a ,\) which represents the limit of the secant lines. Similarly, Figure 3.4(b) shows that as the values of \(h\) get closer to \(0 ,\) the secant lines also approach the tangent line. The slope of the tangent line at \(a\) is the rate of change of the function at \(a ,\) as shown in Figure 3.4(c).

This figure consists of three graphs labeled a, b, and c. Figure a shows the Cartesian coordinate plane with 0, a, x2, and x1 marked in order on the x-axis. There is a curve labeled y = f(x) with points marked (a, f(a)), (x2, f(x2)), and (x1, f(x1)). There are three straight lines: the first crosses (a, f(a)) and (x1, f(x1)); the second crosses (a, f(a)) and (x2, f(x2)); and the third only touches (a, f(a)), making it the tangent. At the bottom of the graph, the equation mtan = limx → a (f(x) - f(a))/(x - a) is given. Figure b shows a similar graph, but this time a + h2 and a + h1 are marked on the x-axis instead of x2 and x1. Consequently, the curve labeled y = f(x) passes through (a, f(a)), (a + h2, f(a + h2)), and (a + h1, f(a + h1)) and the straight lines similarly cross the graph as in Figure a. At the bottom of the graph, the equation mtan = limh → 0 (f(a + h) - f(a))/h is given. Figure c shows only the curve labeled y = f(x) and its tangent at point (a, f(a)).
Figure 3.4 The secant lines approach the tangent line (shown in green) as the second point approaches the first.

Media

You can use this site to explore graphs to see if they have a tangent line at a point.

In Figure 3.5 we show the graph of \(f \left(\right. x \left.\right) = \sqrt{x}\) and its tangent line at \(\left(\right. 1 , 1 \left.\right)\) in a series of tighter intervals about \(x = 1 .\) As the intervals become narrower, the graph of the function and its tangent line appear to coincide, making the values on the tangent line a good approximation to the values of the function for choices of \(x\) close to \(1 .\) In fact, the graph of \(f \left(\right. x \left.\right)\) itself appears to be locally linear in the immediate vicinity of \(x = 1 .\)

This figure consists of four graphs labeled a, b, c, and d. Figure a shows the graphs of the square root of x and the equation y = (x + 1)/2 with the x-axis going from 0 to 4 and the y-axis going from 0 to 2.5. The graphs of these two functions look very close near 1; there is a box around where these graphs look close. Figure b shows a close up of these same two functions in the area of the box from Figure a, specifically x going from 0 to 2 and y going from 0 to 1.4. Figure c is the same graph as Figure b, but this one has a box from 0 to 1.1 in the x coordinate and 0.8 and 1 on the y coordinate. There is an arrow indicating that this is blown up in Figure d. Figure d shows a very close picture of the box from Figure c, and the two functions appear to be touching for almost the entire length of the graph.
Figure 3.5 For values of \(x\) close to \(1 ,\) the graph of \(f \left(\right. x \left.\right) = \sqrt{x}\) and its tangent line appear to coincide.

Formally we may define the tangent line to the graph of a function as follows.

Definition

Let \(f \left(\right. x \left.\right)\) be a function defined in an open interval containing \(a .\) The tangent line to \(f \left(\right. x \left.\right)\) at \(a\) is the line passing through the point \(\left(\right. a , f \left(\right. a \left.\right) \left.\right)\) having slope

\[m_{\text{tan}} = \underset{x \rightarrow a}{\text{lim}} \frac{f \left(\right. x \left.\right) - f \left(\right. a \left.\right)}{x - a}\]

provided this limit exists.

Equivalently, we may define the tangent line to \(f \left(\right. x \left.\right)\) at \(a\) to be the line passing through the point \(\left(\right. a , f \left(\right. a \left.\right) \left.\right)\) having slope

\[m_{\text{tan}} = \underset{h \rightarrow 0}{\text{lim}} \frac{f \left(\right. a + h \left.\right) - f \left(\right. a \left.\right)}{h}\]

provided this limit exists.

Just as we have used two different expressions to define the slope of a secant line, we use two different forms to define the slope of the tangent line. In this text we use both forms of the definition. As before, the choice of definition will depend on the setting. Now that we have formally defined a tangent line to a function at a point, we can use this definition to find equations of tangent lines.

Example 3.1

Finding a Tangent Line

Find the equation of the line tangent to the graph of \(f \left(\right. x \left.\right) = x^{2}\) at \(x = 3 .\)

Solution

First find the slope of the tangent line. In this example, use Equation 3.3.

\[\begin{aligned} m_{\text{tan}} & = \underset{x \rightarrow 3}{\text{lim}} \frac{f \left(\right. x \left.\right) - f \left(\right. 3 \left.\right)}{x - 3} & & & \text{Apply the definition}. \\ & = \underset{x \rightarrow 3}{\text{lim}} \frac{x^{2} - 9}{x - 3} & & & \text{Substitute} f \left(\right. x \left.\right) = x^{2} \text{and} f \left(\right. 3 \left.\right) = 9 . \\ & = \underset{x \rightarrow 3}{\text{lim}} \frac{\left(\right. x - 3 \left.\right) \left(\right. x + 3 \left.\right)}{x - 3} = \underset{x \rightarrow 3}{\text{lim}} \left(\right. x + 3 \left.\right) = 6 & & & \text{Factor the numerator to evaluate the limit}. \end{aligned}\]

Next, find a point on the tangent line. Since the line is tangent to the graph of \(f \left(\right. x \left.\right)\) at \(x = 3 ,\) it passes through the point \(\left(\right. 3 , f \left(\right. 3 \left.\right) \left.\right) .\) We have \(f \left(\right. 3 \left.\right) = 9 ,\) so the tangent line passes through the point \(\left(\right. 3 , 9 \left.\right) .\)

Using the point-slope equation of the line with the slope \(m = 6\) and the point \(\left(\right. 3 , 9 \left.\right) ,\) we obtain the line \(y - 9 = 6 \left(\right. x - 3 \left.\right) .\) Simplifying, we have \(y = 6 x - 9 .\) The graph of \(f \left(\right. x \left.\right) = x^{2}\) and its tangent line at \(3\) are shown in Figure 3.6.

This figure consists of the graphs of f(x) = x squared and y = 6x - 9. The graphs of these functions appear to touch at x = 3.
Figure 3.6 The tangent line to \(f \left(\right. x \left.\right)\) at \(x = 3 .\)

Example 3.2

The Slope of a Tangent Line Revisited

Use Equation 3.4 to find the slope of the line tangent to the graph of \(f \left(\right. x \left.\right) = x^{2}\) at \(x = 3 .\)

Solution

The steps are very similar to Example 3.1. See Equation 3.4 for the definition.

\[\begin{aligned} m_{\text{tan}} & = \underset{h \rightarrow 0}{\text{lim}} \frac{f \left(\right. 3 + h \left.\right) - f \left(\right. 3 \left.\right)}{h} & & & \text{Apply the definition}. \\ & = \underset{h \rightarrow 0}{\text{lim}} \frac{\left(\right. 3 + h \left.\right)^{2} - 9}{h} & & & \text{Substitute} f \left(\right. 3 + h \left.\right) = \left(\left(\right. 3 + h \left.\right)\right)^{2} \text{and} f \left(\right. 3 \left.\right) = 9 . \\ & = \underset{h \rightarrow 0}{\text{lim}} \frac{9 + 6 h + h^{2} - 9}{h} & & & \text{Expand and simplify to evaluate the limit}. \\ & = \underset{h \rightarrow 0}{\text{lim}} \frac{h \left(\right. 6 + h \left.\right)}{h} = \underset{h \rightarrow 0}{\text{lim}} \left(\right. 6 + h \left.\right) = 6 \end{aligned}\]

We obtained the same value for the slope of the tangent line by using the other definition, demonstrating that the formulas can be interchanged.

Example 3.3

Finding the Equation of a Tangent Line

Find the equation of the line tangent to the graph of \(f \left(\right. x \left.\right) = 1 / x\) at \(x = 2 .\)

Solution

We can use Equation 3.3, but as we have seen, the results are the same if we use Equation 3.4.

\[m_{\text{tan}} & = \underset{x \rightarrow 2}{\text{lim}} \frac{f \left(\right. x \left.\right) - f \left(\right. 2 \left.\right)}{x - 2} & & & \text{Apply the definition}. \\ & = \underset{x \rightarrow 2}{\text{lim}} \frac{\frac{1}{x} - \frac{1}{2}}{x - 2} & & & \text{Substitute} f \left(\right. x \left.\right) = \frac{1}{x} \text{and} f \left(\right. 2 \left.\right) = \frac{1}{2} . \\ & = \underset{x \rightarrow 2}{\text{lim}} \frac{\frac{1}{x} - \frac{1}{2}}{x - 2} \cdot \frac{2 x}{2 x} & & & \begin{matrix}\text{Multiply numerator and denominator by} 2 x \text{to} \\ \text{simplify fractions}.\end{matrix} \\ & = \underset{x \rightarrow 2}{\text{lim}} \frac{\left(\right. 2 - x \left.\right)}{\left(\right. x - 2 \left.\right) \left(\right. 2 x \left.\right)} & & & \text{Simplify}. \\ & = \underset{x \rightarrow 2}{\text{lim}} \frac{−1}{2 x} & & & \text{Simplify using} \frac{2 - x}{x - 2} = −1 , \text{for} x \neq 2 . \\ & = - \frac{1}{4} & & & \text{Evaluate the limit}.\]

We now know that the slope of the tangent line is \(- \frac{1}{4} .\) To find the equation of the tangent line, we also need a point on the line. We know that \(f \left(\right. 2 \left.\right) = \frac{1}{2} .\) Since the tangent line passes through the point \(\left(\right. 2 , \frac{1}{2} \left.\right)\) we can use the point-slope equation of a line to find the equation of the tangent line. Thus the tangent line has the equation \(y = - \frac{1}{4} x + 1 .\) The graphs of \(f \left(\right. x \left.\right) = \frac{1}{x}\) and \(y = - \frac{1}{4} x + 1\) are shown in Figure 3.7.

This figure consists of the graphs of f(x) = 1/x and y = -x/4 + 1. The part of the graph f(x) = 1/x in the first quadrant appears to touch the other function’s graph at x = 2.
Figure 3.7 The line is tangent to \(f \left(\right. x \left.\right)\) at \(x = 2 .\)

Checkpoint 3.1

Find the slope of the line tangent to the graph of \(f \left(\right. x \left.\right) = \sqrt{x}\) at \(x = 4 .\)

This lesson is part of:

Derivatives

View Full Tutorial

Track Your Learning Progress

Sign in to unlock unlimited practice exams, tutorial practice quizzes, personalized weak area practice, AI study assistance with Lexi, and detailed performance analytics.