2.0: Tangent lines and Rates of change
 Page ID
 10287
Thing out Loud
A common amusement park ride lifts riders to a height then allows them to freefall a certain distance before safely stopping them. Suppose such a ride drops riders from a height of 150 feet. Students of physics may recall that the height (in feet) of the riders, \(t\) seconds after freefall (and ignoring air resistance, etc.) can be accurately modeled by \(f(t) = 16t^2+150\).
Using this formula, it is easy to verify that, without intervention, the riders will hit the ground at \(t=2.5\sqrt{1.5} \approx 3.06\) seconds. Suppose the designers of the ride decide to begin slowing the riders' fall after 2 seconds (corresponding to a height of 86 ft.). How fast will the riders be traveling at that time?
 Answer:

We have been given a position function, but what we want to compute is a velocity at a specific point in time, i.e., we want an instantaneous velocity. We do not currently know how to calculate this.
However, we do know from common experience how to calculate an average velocity. (If we travel 60 miles in 2 hours, we know we had an average velocity of 30 mph.) We looked at this concept in Section 1.1 when we introduced the difference quotient. We have
\[\frac{\text{change in distance}}{\text{change in time}} = \frac{\text{"rise''}}{\text{run}} = \text{average velocity}.\]
We can approximate the instantaneous velocity at \(t=2\) by considering the average velocity over some time period containing \(t=2\). If we make the time interval small, we will get a good approximation. (This fact is commonly used. For instance, high speed cameras are used to track fast moving objects. Distances are measured over a fixed number of frames to generate an accurate approximation of the velocity.)
Consider the interval from \(t=2\) to \(t=3\) (just before the riders hit the ground). On that interval, the average velocity is
\[\frac{f(3)f(2)}{32} = \frac{f(3)f(2)}{1} =80\ \text{ft/s},\]
where the minus sign indicates that the riders are moving down. By narrowing the interval we consider, we will likely get a better approximation of the instantaneous velocity. On \([2,2.5]\) we have
\[\frac{f(2.5)f(2)}{2.52} = \frac{f(2.5)f(2)}{0.5} =72\ \text{ft/s}.\]
We can do this for smaller and smaller intervals of time. For instance, over a time span of 1/10\(^\text{th}\) of a second, i.e., on \([2,2.1]\), we have
\[\frac{f(2.1)f(2)}{2.12} = \frac{f(2.1)f(2)}{0.1} =65.6\ \text{ft/s}.\]
Over a time span of 1/100\(^\text{th}\) of a second, on \([2,2.01]\), the average velocity is
\[\frac{f(2.01)f(2)}{2.012} = \frac{f(2.01)f(2)}{0.01} =64.16\ \text{ft/s}.\]
What we are really computing is the average velocity on the interval \([2,2+h]\) for small values of \(h\). That is, we are computing \[\frac{f(2+h)  f(2)}{h}\]where \(h\) is small.
What we really want is for \(h=0\), but this, of course, returns the familiar "\(0/0\)'' indeterminate form. So we employ a limit, as we did in Section 1.1.
We can approximate the value of this limit numerically with small values of \(h\) as seen in Figure 2.1. It looks as though the velocity is approaching \(64\) ft/s. Computing the limit directly gives
\[\begin{align*}\lim_{h\to 0} \frac{f(2+h)f(2)}{h} &= \lim_{h\to 0}\frac{16(2+h)^2+150  (16(2)^2+150)}{h} \\ &= \lim_{h\to 0}\frac{64h16h^2}{h} \\ &= \lim_{h\to 0}64 16h \\ &=64. \end{align*}\]
Figure 2.1: Approximating the instantaneous velocity with average velocities over a small time period \(h\).Graphically, we can view the average velocities we computed numerically as the slopes of secant lines on the graph of \(f\) going through the points \((2,f(2))\) and \((2+h,f(2+h))\). In Figure 2.2, the secant line corresponding to \(h=1\) is shown in three contexts. Figure 2.2(a) shows a "zoomed out'' version of \(f\) with its secant line. In (b), we zoom in around the points of intersection between \(f\) and the secant line. Notice how well this secant line approximates \(f\) between those two points  it is a common practice to approximate functions with straight lines.
As \(h\to 0\), these secant lines approach the tangent line, a line that goes through the point \((2,f(2))\) with the special slope of \(64\). In parts (c) and (d) of Figure 2.2, we zoom in around the point \((2,86)\). In (c) we see the secant line, which approximates \(f\) well, but not as well the tangent line shown in (d).
Figure 2.2: Parts (a), (b) and (c) show the secant line to \(f(x)\text{ with }h=1\), zoomed in different amounts. Part (d) shows the tangent line to \(f \text{ at }x=2.\)
Now that we have both a conceptual understanding of a limit and the practical ability to compute limits, we have established the foundation for our study of calculus, the branch of mathematics in which we compute derivatives and integrals. Most mathematicians and historians agree that calculus was developed independently by the Englishman Isaac Newton (1643–1727) and the German Gottfried Leibniz (1646–1716), whose images appear in Figure. When we credit Newton and Leibniz with developing calculus, we are really referring to the fact that Newton and Leibniz were the first to understand the relationship between the derivative and the integral. Both mathematicians benefited from the work of predecessors, such as Barrow, Fermat, and Cavalieri. The initial relationship between the two mathematicians appears to have been amicable; however, in later years a bitter controversy erupted over whose work took precedence. Although it seems likely that Newton did, indeed, arrive at the ideas behind calculus first, we are indebted to Leibniz for the notation that we commonly use today.
Figure \(\PageIndex{1}\): Newton and Leibniz are credited with developing calculus independently.
App:Average and Instantaneous Rate of Change
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 \((a,f(a))\) 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 \((a,f(a))\) and \((x,f(x))\), as shown in Figure. The slope of this line is given by an equation in the form of a difference quotient:
\[m_{sec}=\frac{f(x)−f(a)}{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 a. We can then calculate the slope of the line through the points \((a,f(a))\) and \((a+h,f(a+h))\). In this case, we find the secant line has a slope given by the following difference quotient with increment \(h\):
\[m_{sec}=\frac{f(a+h)−f(a)}{a+h−a}=\frac{f(a+h)−f(a)}{h}\]
Definition: difference quotient
Let \(f\) be a function defined on an interval \(I\) containing \(a\). If \(x≠a\) is in \(I\), then
\[Q=\frac{f(x)−f(a)}{x−a}\]
is a difference quotient.
Also, if \(h≠0\) is chosen so that \(a+h\) is in \(I\), then
\[Q=\frac{f(a+h)−f(a)}{h}\]
is a difference quotient with increment \(h\).
These two expressions for calculating the slope of a secant line are illustrated in Figure. 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.
Figure \(\PageIndex{2}\): We can calculate the slope of a secant line in either of two ways.
In Figure(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(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(c).
Figure \(\PageIndex{3}\): The secant lines approach the tangent line (shown in green) as the second point approaches the first.
In Figure we show the graph of \(f(x)=\sqrt{x}\) and its tangent line at \((1,1)\) 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(x)\) itself appears to be locally linear in the immediate vicinity of \(x=1\).
Figure \(\PageIndex{4}\): For values of \(x\) close to \(1\), the graph of \(f(x)=\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: tangent line
Let \(f(x)\) be a function defined in an open interval containing \(a\). The tangent line to \(f(x)\) at a is the line passing through the point \((a,f(a))\) having slope
\(m_{tan}=lim_{x→a}\frac{f(x)−f(a)}{x−a}\)
provided this limit exists.
Equivalently, we may define the tangent line to \(f(x)\) at a to be the line passing through the point \((a,f(a))\) having slope
\(m_{tan}=lim_{h→0}\frac{f(a+h)−f(a)}{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 \(\PageIndex{1}\): Finding a Tangent Line
Find the equation of the line tangent to the graph of \(f(x)=x^2\) at \(x=3.\)
Solution
First find the slope of the tangent line. In this example, use Equation.
\(m_{tan}=lim_{x→3}\frac{f(x)−f(3)}{x−3}\) Apply the definition.
\(=lim_{x→3}\frac{x^2−9}{x−3}\) Substitute \(f(x)=x^2\) and \(f(3)=9\)
\(=lim_{x→3}\frac{(x−3)(x+3)}{x−3} =lim_{x→3}(x+3)=6\) Factor the numerator to evaluate the limit.
Next, find a point on the tangent line. Since the line is tangent to the graph of \(f(x)\) at \(x=3\), it passes through the point \((3,f(3))\). We have \(f(3)=9\), so the tangent line passes through the point \((3,9)\).
Using the pointslope equation of the line with the slope \(m=6\) and the point \((3,9)\), we obtain the line \(y−9=6(x−3)\). Simplifying, we have \(y=6x−9\). The graph of \(f(x)=x^2\) and its tangent line at \(3\) are shown in Figure.
Figure \(\PageIndex{5}\): The tangent line to \(f(x)\) at \(x=3\).
Example \(\PageIndex{2}\): The Slope of a Tangent Line Revisited
Use Equation to find the slope of the line tangent to the graph of \(f(x)=x^2\) at \(x=3\).
Solution
The steps are very similar to Example. See Equation for the definition.
\(m_{tan}=lim_{h→0}\frac{f(3+h)−f(3)}{h}\) Apply the definition.
\(=lim_{h→0}\frac{(3+h)^2−9}{h}\) Substitute \(f(3+h)=(3+h)^2\) and \(f(3)=9\).
\(=lim_{h→0}\frac{9+6h+h^2−9}{h}\) Expand and simplify to evaluate the limit.
\(=lim_{h→0}\frac{h(6+h)}{h}=lim_{h→0}(6+h)=6\)
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 \(\PageIndex{c}\): Finding the Equation of a Tangent Line
Find the equation of the line tangent to the graph of \(f(x)=1/x\) at \(x=2\).
Solution
We can use Equation, but as we have seen, the results are the same if we use Equation.
\(m_{tan}=lim_{x→2}\frac{f(x)−f(2)}{x−2}\) Apply the definition.
\(=lim_{x→2}\frac{\frac{1}{x}−\frac{1}{2}}{x−2}\) Substitute \(f(x)=\frac{1}{x}\) and \(f(2)=\frac{1}{2}\)
\(=lim_{x→2}\frac{\frac{1}{x}−\frac{1}{2}}{x−2}⋅\frac{2x}{2x}\) Multiply numerator and denominator by \(2x\) to simplify fractions.
\(=lim_{x→2}\frac{(2−x)}{(x−2)(2x)}\) Simplify.
\(=lim_{x→2}\frac{−1}{2x}\) Simplify using \frac{2−x}{x−2}=−1\),for \(x≠2\).
\(=−\frac{1}{4}\) 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(2)=\frac{1}{2}\). Since the tangent line passes through the point \((2,\frac{1}{2})\) we can use the pointslope 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(x)=\frac{1}{x}\) and \(y=−\frac{1}{4}x+1\) are shown in Figure.
Figure \(\PageIndex{6}\):The line is tangent to \(f(x)\) at \(x=2\).
Exercise \(\PageIndex{1}\)
Find the slope of the line tangent to the graph of \(f(x)=\sqrt{x}\) at \(x=4\).
 Hint

Use either Equation or Equation. Multiply the numerator and the denominator by a conjugate.
 Answer

\frac{1}{4}
The Derivative of a Function at a Point
The type of limit we compute in order to find the slope of the line tangent to a function at a point occurs in many applications across many disciplines. These applications include velocity and acceleration in physics, marginal profit functions in business, and growth rates in biology. This limit occurs so frequently that we give this value a special name: the derivative. The process of finding a derivative is called differentiation.
Definition
Let \(f(x)\) be a function defined in an open interval containing \(a\). The derivative of the function \(f(x)\) at \(a\), denoted by \(f′(a)\), is defined by
\(f′(a)=lim_{x→a}\frac{f(x)−f(a)}{x−a}\)
provided this limit exists.
Alternatively, we may also define the derivative of \(f(x)\) at \(a\) as
\(f′(a)=lim_{h→0}\frac{f(a+h)−f(a)}{h}.\)
Velocities and Rates of Change
Now that we can evaluate a derivative, we can use it in velocity applications. Recall that if \(s(t)\) is the position of an object moving along a coordinate axis, the average velocity of the object over a time interval \([a,t]\) if \(t>a\) or \([t,a]\) if \(t<a\) is given by the difference quotient
\(v_{ave}=\frac{s(t)−s(a)}{t−a}\).
As the values of \(t\) approach \(a\), the values of \(v_{ave}\) approach the value we call the instantaneous velocity at \(a\). That is, instantaneous velocity at \(a\), denoted \(v(a)\), is given by
\(v(a)=s′(a)=lim_{t→a}\frac{s(t)−s(a)}{t−a}\).
To better understand the relationship between average velocity and instantaneous velocity, see Figure. In this figure, the slope of the tangent line (shown in red) is the instantaneous velocity of the object at time \(t=a\) whose position at time \(t\) is given by the function \(s(t)\). The slope of the secant line (shown in green) is the average velocity of the object over the time interval \([a,t]\).
Figure \(\PageIndex{7}\): The slope of the secant line is the average velocity over the interval \([a,t]\). The slope of the tangent line is the instantaneous velocity.
Example \(\PageIndex{8}\): Estimating Velocity
A lead weight on a spring is oscillating up and down. Its position at time \(t\) with respect to a fixed horizontal line is given by \(s(t)=sint\) (Figure). Use a table of values to estimate \(v(0)\). Check the estimate by using Equation.
Figure \(\PageIndex{8}\): A lead weight suspended from a spring in vertical oscillatory motion.
Solution
We can estimate the instantaneous velocity at \(t=0\) by computing a table of average velocities using values of \(t\) approaching \(0\), as shown in Table.
\(t\)  \(\frac{sint−sin0}{t−0}=\frac{sint}{t}\) 

−0.1  0.998334166 
−0.01  0.9999833333 
−0.001  0.999999833 
0.001  0.999999833 
0.01  0.9999833333 
0.1  0.998334166 
Average velocities using values of \(t\) approaching 0
From the table we see that the average velocity over the time interval \([−0.1,0]\) is \(0.998334166\), the average velocity over the time interval \([−0.01,0]\) is \(0.9999833333\), and so forth. Using this table of values, it appears that a good estimate is \(v(0)=1\).
By using Equation, we can see that
\(v(0)=s′(0)=lim_{t→0}\frac{sint−sin0}{t−0}=lim_{t→0}\frac{sint}{t}=1\).
Thus, in fact, \(v(0)=1\).
Exercise \(\PageIndex{5}\)
A rock is dropped from a height of \(64\) feet. Its height above ground at time t seconds later is given by \(s(t)=−16t^2+64,0≤t≤2\). Find its instantaneous velocity \(1\) second after it is dropped, using Equation.
 Hint

\(v(t)=s′(t)\). Follow the earlier examples of the derivative using Equation.
 Answer

−32 ft/s
As we have seen throughout this section, the slope of a tangent line to a function and instantaneous velocity are related concepts. Each is calculated by computing a derivative and each measures the instantaneous rate of change of a function, or the rate of change of a function at any point along the function.
Definition: instantaneous rate of change
The instantaneous rate of change of a function \(f(x)\) at a value \(a\) is its derivative \(f′(a)\).
Example \(\PageIndex{9}\): Chapter Opener: Estimating Rate of Change of Velocity
Figure \(\PageIndex{9}\): (credit: modification of work by Codex41, Flickr)
Reaching a top speed of \(270.49\) mph, the Hennessey Venom GT is one of the fastest cars in the world. In tests it went from \(0\) to \(60\) mph in \(3.05\) seconds, from \(0\) to \(100\) mph in \(5.88\) seconds, from \(0\) to \(200\) mph in \(14.51\) seconds, and from \(0\) to \(229.9\) mph in \(19.96\) seconds. Use this data to draw a conclusion about the rate of change of velocity (that is, its acceleration) as it approaches \(229.9\) mph. Does the rate at which the car is accelerating appear to be increasing, decreasing, or constant?
Solution: First observe that \(60\) mph = \(88\) ft/s, \(100\) mph ≈\(146.67\) ft/s, \(200\) mph ≈\(293.33\) ft/s, and \(229.9\) mph ≈\(337.19\) ft/s. We can summarize the information in a table.
\(t\)  \(v(t)\) 
0  0 
3.05  88 
5.88  147.67 
14.51  293.33 
19.96  337.19 
\(v(t)\) at different values of \(t\)
Now compute the average acceleration of the car in feet per second on intervals of the form \([t,19.96]\) as \(t\) approaches \(19.96\), as shown in the following table.
\(t\)  \(\frac{v(t)−v(19.96)}{t−19.96}=\frac{v(t)−337.19}{t−19.96}\) 
0.0  16.89 
3.05  14.74 
5.88  13.46 
14.51  8.05 
Average acceleration
The rate at which the car is accelerating is decreasing as its velocity approaches \(229.9\) mph (\(337.19\) ft/s).
Example \(\PageIndex{10}\): Rate of Change of Temperature
A homeowner sets the thermostat so that the temperature in the house begins to drop from \(70°F\) at \(9\) p.m., reaches a low of \(60°\) during the night, and rises back to \(70°\) by \(7\) a.m. the next morning. Suppose that the temperature in the house is given by \(T(t)=0.4t^2−4t+70\) for \(0≤t≤10\), where \(t\) is the number of hours past \(9\) p.m. Find the instantaneous rate of change of the temperature at midnight.
Solution
Since midnight is \(3\) hours past \(9\) p.m., we want to compute \(T′(3)\). Refer to Equation.
\(T′(3)=lim_{t→3}\frac{T(t)−T(3)}{t−3}\) Apply the definition.
\(=lim_{t→3}\frac{0.4t^2−4t+70−61.6}{t−3}\) Substitute \(T(t)=0.4t^2−4t+70\) and \(T(3)=61.6\).
\(=lim_{t→3}\frac{0.4t^2−4t+8.4}{t−3}\) Simplify.
\(=lim_{t→3}\frac{0.4(t−3)(t−7)}{t−3}\) \(=lim_{t→3}\frac{0.4(t−3)(t−7)}{t−3}\)
\(=lim_{t→3}0.4(t−7)\) Cancel.
\(=−1.6\) Evaluate the limit.
The instantaneous rate of change of the temperature at midnight is \(−1.6°F\) per hour.
Example \(\PageIndex{11}\): Rate of Change of Profit
A toy company can sell \(x\) electronic gaming systems at a price of \(p=−0.01x+400\) dollars per gaming system. The cost of manufacturing \(x\) systems is given by \(C(x)=100x+10,000\) dollars. Find the rate of change of profit when \(10,000\) games are produced. Should the toy company increase or decrease production?
Solution
The profit \(P(x)\) earned by producing \(x\) gaming systems is \(R(x)−C(x)\), where \(R(x)\) is the revenue obtained from the sale of \(x\) games. Since the company can sell \(x\) games at \(p=−0.01x+400\) per game,
\(R(x)=xp=x(−0.01x+400)=−0.01x^2+400x\).
Consequently,
\(P(x)=−0.01x^2+300x−10,000\).
Therefore, evaluating the rate of change of profit gives
\(P′(10000)=lim_{x→10000}\frac{P(x)−P(10000)}{x−10000}\)
\(=lim_{x→10000}\frac{−0.01x^2+300x−10000−1990000}{x−10000}\)
\(=lim_{x→10000}\frac{−0.01x^2+300x−2000000}{x−10000}\)
\(=100\).
Since the rate of change of profit \(P′(10,000)>0\) and \(P(10,000)>0\), the company should increase production.
Exercise \(\PageIndex{6}\)
A coffee shop determines that the daily profit on scones obtained by charging s dollars per scone is \(P(s)=−20s^2+150s−10\). The coffee shop currently charges \($3.25\) per scone. Find \(P′(3.25)\), the rate of change of profit when the price is \($3.25\) and decide whether or not the coffee shop should consider raising or lowering its prices on scones.
 Answer

Use Example for a guide.
 Answer

\(P′(3.25)=20>0\); raise prices
Key Concepts
 The slope of the tangent line to a curve measures the instantaneous rate of change of a curve. We can calculate it by finding the limit of the difference quotient or the difference quotient with increment \(h\).
 The derivative of a function \(f(x)\) at a value \(a\) is found using either of the definitions for the slope of the tangent line.
 Velocity is the rate of change of position. As such, the velocity \(v(t)\) at time \(t\) is the derivative of the position \(s(t)\) at time \(t\). Average velocity is given by

\(v_{ave}=\frac{s(t)−s(a)}{t−a}\).
Instantaneous velocity is given by
\(v(a)=s′(a)=lim_{t→a}\frac{s(t)−s(a)}{t−a}\).
Key Equations
 Difference quotient
\(Q=\frac{f(x)−f(a)}{x−a}\)
 Difference quotient with increment h
\(Q=\frac{f(a+h)−f(a)}{a+h−a}=\frac{f(a+h)−f(a)}{h}\)
 Slope of tangent line
\(m_{tan}=lim_{x→a}\frac{f(x)−f(a)}{x−a}\)
\(m_{tan}=lim_{h→0}\frac{f(a+h)−f(a)}{h}\)
 Derivative of f(x) at a
\(f′(a)=lim_{x→a}\frac{f(x)−f(a)}{x−a}\)
\(f′(a)=lim_{h→0}\frac{f(a+h)−f(a)}{h}\)
 Average velocity
\(v_{ave}=\frac{s(t)−s(a)}{t−a}\)
 Instantaneous velocity
\(v(a)=s′(a)=lim_{t→a}\frac{s(t)−s(a)}{t−a}\)
Glossary
 derivative
 the slope of the tangent line to a function at a point, calculated by taking the limit of the difference quotient, is the derivative
 difference quotient

of a function \(f(x)\) at \(a\) is given by
\(\frac{f(a+h)−f(a)}{h}\) or \(\frac{f(x)−f(a)}{x−a}\)
 differentiation
 the process of taking a derivative
 instantaneous rate of change
 the rate of change of a function at any point along the function \(a\), also called \(f′(a)\), or the derivative of the function at \(a\)
.
 Source
 Calculus Applets using GeoGebra by Marc Renault is licensed under a Creative Commons AttributionNonCommercialShareAlike 3.0 Unported License.
Contributors
Gregory Hartman (Virginia Military Institute). Contributions were made by Troy Siemers and Dimplekumar Chalishajar of VMI and Brian Heinold of Mount Saint Mary's University. This content is copyrighted by a Creative Commons Attribution  Noncommercial (BYNC) License. http://www.apexcalculus.com/
Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax is licensed with a CCBYSANC 4.0 license. Download for free at http://cnx.org.
Pamini Thangarajah (Mount Royal University, Calgary, Alberta, Canada)