Tangent lines and rates of change
This chapter is about the derivative. The derivative answers two questions that look different but turn out to be the same:
- What is the slope of the tangent line to a curve at a point?
- How fast is a quantity changing at one instant?
Both questions are answered with a limit. This page shows how.
Secant lines and tangent lines
Recall that the slope of the line through two points $(x_1,y_1)$ and $(x_2,y_2)$ is
$m=\dfrac{y_2-y_1}{x_2-x_1}$.
(See slope of a line for a review.)
A secant line is a line through two points on a curve. A tangent line at a point $P$ touches the curve at $P$ and points in the same direction as the curve there.
To find the slope of a tangent line, we use secant lines. Look at the curve $y=x^2$ and the point $P(1,1)$ on it. Take a second point $Q(x,x^2)$ on the curve. The slope of the secant line $PQ$ is
$m_{PQ}=\dfrac{x^2-1}{x-1}$.
Now move $Q$ closer and closer to $P$, from both sides. The table shows the slopes of the secant lines:
| $x$ | $m_{PQ}=\dfrac{x^2-1}{x-1}$ |
|---|---|
| 2 | 3 |
| 1.5 | 2.5 |
| 1.1 | 2.1 |
| 1.01 | 2.01 |
| 1.001 | 2.001 |
| 0 | 1 |
| 0.5 | 1.5 |
| 0.9 | 1.9 |
| 0.99 | 1.99 |
| 0.999 | 1.999 |
As $x$ approaches $1$, the secant slopes approach $2$. The secant lines turn toward one line: the tangent line at $P$. So the slope of the tangent line is $2$.
The slope of a tangent line
This idea gives a definition. The tangent line to the curve $y=f(x)$ at the point $P(a,f(a))$ is the line through $P$ with slope
$m=\displaystyle\lim_{x\to a}\dfrac{f(x)-f(a)}{x-a}$,
as long as this limit exists.
There is a second form that is often easier to use. Let $h$ be the distance from $a$ to $x$, so $x=a+h$. As $x$ approaches $a$, $h$ approaches $0$. Then
$m=\displaystyle\lim_{h\to 0}\dfrac{f(a+h)-f(a)}{h}$.
Once we know the slope $m$, we can write the equation of the tangent line with the point-slope form (see equations of a line):
$y-f(a)=m(x-a)$.
Example 1: Find the equation of the tangent line to $y=x^2$ at the point $(1,1)$.
Solution:
Here $f(x)=x^2$ and $a=1$. Use the second form of the slope:
$\begin{align*}&m\\&=\lim_{h\to 0}\dfrac{(1+h)^2-1}{h}\end{align*}$
Expand $(1+h)^2$. The $1$s cancel:
$\begin{align*}&=\lim_{h\to 0}\dfrac{1+2h+h^2-1}{h}\\&=\lim_{h\to 0}\dfrac{2h+h^2}{h}\end{align*}$
Cancel the common factor $h$:
$\begin{align*}&=\lim_{h\to 0}(2+h)\end{align*}$
Let $h$ approach $0$. Put $0$ in for $h$:
$\begin{align*}&m=2+0=2\end{align*}$
This matches the table. Now use the point-slope form with the point $(1,1)$ and $m=2$:
$\begin{align*}y-1&=2(x-1)\\y&=2x-1\end{align*}$
Example 2: Find the equation of the tangent line to $y=\dfrac{3}{x}$ at the point $(3,1)$.
Solution:
Here $f(x)=3/x$ and $a=3$, so $f(3)=1$. Use the second form of the slope:
$\begin{align*}&m\\&=\lim_{h\to 0}\dfrac{\dfrac{3}{3+h}-1}{h}\end{align*}$
Combine the fractions in the numerator, using the common denominator $3+h$:
$\begin{align*}&=\lim_{h\to 0}\dfrac{\dfrac{3-(3+h)}{3+h}}{h}\end{align*}$
Simplify the numerator. Dividing by $h$ puts $h$ in the denominator:
$\begin{align*}&=\lim_{h\to 0}\dfrac{-h}{h(3+h)}\end{align*}$
Cancel the common factor $h$:
$\begin{align*}&=\lim_{h\to 0}\dfrac{-1}{3+h}\end{align*}$
Let $h$ approach $0$:
$\begin{align*}&m=-\dfrac{1}{3}\end{align*}$
The tangent line goes through $(3,1)$ with slope $-\dfrac{1}{3}$:
$\begin{align*}y-1&=-\dfrac{1}{3}(x-3)\\y&=-\dfrac{1}{3}x+2\end{align*}$
Example 3: Find the equation of the tangent line to $y=\sqrt{x}$ at the point $(4,2)$.
Solution:
Here $f(x)=\sqrt{x}$ and $a=4$, so $f(4)=2$. Use the second form of the slope:
$\begin{align*}&m\\&=\lim_{h\to 0}\dfrac{\sqrt{4+h}-2}{h}\end{align*}$
Direct substitution gives $0/0$. Multiply the numerator and the denominator by the conjugate of the numerator, $\sqrt{4+h}+2$. The numerator becomes a difference of squares:
$\begin{align*}&=\lim_{h\to 0}\dfrac{(\sqrt{4+h})^2-2^2}{h(\sqrt{4+h}+2)}\end{align*}$
Simplify the numerator:
$\begin{align*}&=\lim_{h\to 0}\dfrac{(4+h)-4}{h(\sqrt{4+h}+2)}\\&=\lim_{h\to 0}\dfrac{h}{h(\sqrt{4+h}+2)}\end{align*}$
Cancel the common factor $h$:
$\begin{align*}&=\lim_{h\to 0}\dfrac{1}{\sqrt{4+h}+2}\end{align*}$
Let $h$ approach $0$:
$\begin{align*}&m=\dfrac{1}{2+2}=\dfrac{1}{4}\end{align*}$
The tangent line goes through $(4,2)$ with slope $\dfrac{1}{4}$:
$\begin{align*}y-2&=\dfrac{1}{4}(x-4)\\y&=\dfrac{1}{4}x+1\end{align*}$
Velocity
Suppose an object moves along a straight line. Its position at time $t$ is $s(t)$. This is called the position function.
The average velocity over a time interval is the change in position divided by the change in time. From time $a$ to time $a+h$, it is
average velocity $=\dfrac{s(a+h)-s(a)}{h}$.
This is the slope of a secant line on the graph of $s(t)$.
The instantaneous velocity is the velocity at one instant, $t=a$. To find it, we let the time interval shrink to $0$:
$v(a)=\displaystyle\lim_{h\to 0}\dfrac{s(a+h)-s(a)}{h}$.
This is the slope of the tangent line to the graph of $s(t)$ at $t=a$.
Example 4: A ball is dropped from a tall tower. After $t$ seconds, it has fallen $s(t)=4.9t^2$ meters. (We ignore air resistance.)
(a) Find the average velocity from $t=2$ to $t=3$ seconds.
(b) Find the velocity at $t=2$ seconds.
Solution:
(a) Here $s(2)=4.9(2)^2=19.6$ and $s(3)=4.9(3)^2=44.1$. So,
$\begin{align*}&\text{average velocity}\\&=\dfrac{s(3)-s(2)}{3-2}\\&=\dfrac{44.1-19.6}{1}\\&=24.5\ \text{m/s}\end{align*}$
(b) First, look at average velocities over shorter and shorter time intervals, starting at $t=2$:
| $h$ (s) | $\dfrac{s(2+h)-s(2)}{h}$ (m/s) |
|---|---|
| 1 | 24.5 |
| 0.1 | 20.09 |
| 0.01 | 19.649 |
| 0.001 | 19.6049 |
The values approach $19.6$. To find the exact value, use the limit:
$\begin{align*}&v(2)\\&=\lim_{h\to 0}\dfrac{4.9(2+h)^2-19.6}{h}\end{align*}$
Expand $(2+h)^2$:
$\begin{align*}&=\lim_{h\to 0}\dfrac{4.9(4+4h+h^2)-19.6}{h}\end{align*}$
Multiply out. The $19.6$s cancel:
$\begin{align*}&=\lim_{h\to 0}\dfrac{19.6h+4.9h^2}{h}\end{align*}$
Cancel the common factor $h$:
$\begin{align*}&=\lim_{h\to 0}(19.6+4.9h)\end{align*}$
Let $h$ approach $0$:
$\begin{align*}&v(2)=19.6\ \text{m/s}\end{align*}$
Rates of change
Velocity is the rate of change of position. The same idea works for any quantity. Suppose $y=f(x)$. When $x$ changes from $x_1$ to $x_2$:
- The change in $x$ is $\Delta x=x_2-x_1$. (The symbol $\Delta$, the Greek letter delta, means "change in.")
- The change in $y$ is $\Delta y=f(x_2)-f(x_1)$.
The average rate of change of $y$ with respect to $x$ is
$\dfrac{\Delta y}{\Delta x}=\dfrac{f(x_2)-f(x_1)}{x_2-x_1}$.
The instantaneous rate of change at $x=a$ is the limit of the average rate of change as $\Delta x$ approaches $0$:
$\displaystyle\lim_{h\to 0}\dfrac{f(a+h)-f(a)}{h}$.
This is the same limit as the slope of the tangent line. The units are the units of $y$ divided by the units of $x$.
Example 5: The area of a square with side $x$ centimeters is $A(x)=x^2$ square centimeters. Find the instantaneous rate of change of the area with respect to the side when $x=3$ cm.
Solution:
Use the limit with $a=3$:
$\begin{align*}&\lim_{h\to 0}\dfrac{A(3+h)-A(3)}{h}\\&=\lim_{h\to 0}\dfrac{(3+h)^2-9}{h}\end{align*}$
Expand $(3+h)^2$. The $9$s cancel:
$\begin{align*}&=\lim_{h\to 0}\dfrac{6h+h^2}{h}\end{align*}$
Cancel the common factor $h$:
$\begin{align*}&=\lim_{h\to 0}(6+h)\end{align*}$
Let $h$ approach $0$:
$\begin{align*}&\lim_{h\to 0}\dfrac{A(3+h)-A(3)}{h}=6\end{align*}$
You found this limit in computing limits (Example 8). So, when the side is $3$ cm, the area is increasing at $6$ square centimeters per centimeter of side.
Summary
The slope of a tangent line, the instantaneous velocity, and the instantaneous rate of change are all the same limit:
$\displaystyle\lim_{h\to 0}\dfrac{f(a+h)-f(a)}{h}$.
This limit is so important that it has its own name: the derivative. It is the subject of the next section.