Unit 4 · Topic 4.6

Approximate with a tangent line

Builds on the tangent line, the derivative rules and the second derivative. 13 minutes.

  1. Example 1Build a tangent-line approximation
  2. Example 2Estimate a nearby function value
  3. Example 3Predict whether the estimate is high or low
  4. Example 4Use supplied values or a table

Near a point where a function is differentiable, its graph is almost straight, so its tangent line can replace it there. A line is easy to evaluate, so this topic uses the tangent line to estimate values of the function. It also decides whether an estimate is too high or too low.

The tangent line follows the graph

The graph of f(x) = x cubed near the orange point P = (2, 8), with the orange tangent line through P, which the curve lies above. A faint dashed line marks an input x to the right of P, where an orange dot on the line and a chalk dot on the curve are joined by a red segment. The window narrows around P as x moves toward 2: the steps between the numbers on the axes shrink, and the curve and the line become hard to tell apart. A button puts a V-shaped corner in the graph at P; the line, the dots, the segment and the dashed line disappear, and the corner stays sharp at every width.

Figure 1The orange line is tangent to the graph of \(f(x)=x^3\) at \(\cy{P}=(2,8)\), and the figure zooms in on \(\cy{P}\) as \(x\) moves toward 2. On the faint dashed line at \(x\), a red segment joins the orange dot on the line to the chalk dot on the curve.

In Figure 1, the orange line is tangent to the graph of \(f(x)=x^3\) at \(\cy{P}=(2,8)\). In general, the tangent line at \(\cy{P}=\big(a,f(a)\big)\) is the line through \(\cy{P}\) with slope \(f'(a)\) (topic 2.1), so its equation in point-slope form is

\[y-f(a)=f'(a)\,(x-a)\]

Solved for \(y\), the equation gives the linear function \(\cy{L(x)}=f(a)+f'(a)\,(x-a)\). It is the linearization of \(f\) at \(a\), and \(a\) is its center. AP exam questions call \(\cy{L(x)}\) the local linear approximation or the tangent line approximation of \(f(x)\). At \(a\), \(L\) has the value and the slope of \(f\). In Figure 1, \(f(2)=8\), and \(f'(x)=3x^2\) gives \(f'(2)=12\), so \(\cy{L(x)}=8+12(x-2)\).

At an input \(x\), the orange dot on the line has height \(\cy{L(x)}\), and the chalk dot on the curve has height \(f(x)\). The red segment between them shows the error of the approximation, \(\cr{E(x)}=f(x)-\cy{L(x)}\). Substitute the formula for \(L\). For \(x\neq a\), divide by \(x-a\):

\[\frac{\cr{E(x)}}{x-a}=\frac{f(x)-f(a)}{x-a}-f'(a)\]

As \(x\) approaches \(a\), the difference quotient \(\frac{f(x)-f(a)}{x-a}\) approaches \(f'(a)\) by the definition of the derivative (topic 2.2). The quotient \(\cr{E(x)}/(x-a)\) therefore approaches 0, so the error is small even compared with the distance between \(x\) and \(a\). For \(x\) near \(a\), \(f(x)\approx\cy{L(x)}\).

The window of Figure 1 is the part of the plane that it shows. Narrow it with the slider or the button under the figure. The steps between the numbers on the axes shrink, and the curve and the line become hard to tell apart. Under the figure, the quotient falls from 7 at \(x-a=1\) to 0.61 at \(x-a=0.1\).

For a line through \(\cy{P}\) with any other slope \(m\), its error divided by \(x-a\) approaches \(f'(a)-m\), which is not 0. Only the tangent line stays this close to the graph. Even so, it stays close only near \(a\). At the start of Figure 1, where \(x=3\), the line gives \(\cy{L(3)}=20\), but \(f(3)=27\).

The linearization needs \(f'(a)\) to exist. Use the button under Figure 1 to put a corner in the graph at \(\cy{P}\). The line, the two dots at \(x\), the red segment and the dashed line disappear, because a corner has no tangent line (topic 2.4). Then narrow the window. The corner stays sharp at every width, so no line through \(\cy{P}\) follows the graph on both sides of \(a\).

Estimating a value

To estimate \(f(x)\), choose a center \(a\) close to \(x\) at which \(f(a)\) and \(f'(a)\) have exact values. Then substitute \(x\) into the linearization. The estimate is the value \(f(a)\) plus the change along the tangent line, \(f'(a)\,(x-a)\), which is the slope times the offset \(x-a\). If \(x\) lies to the left of \(a\), the offset is negative, so a rising tangent line gives an estimate below \(f(a)\).

The linearization uses only the two numbers \(f(a)\) and \(f'(a)\), not a formula for \(f\). A problem can give them in words or in a table. If a table gives values of \(f\) only, a difference quotient from the values at the nearest inputs (topic 2.3) can replace \(f'(a)\). The estimate then also carries the error of that slope.

Too high or too low

An estimate \(\cy{L(x)}\) is an underestimate of \(f(x)\) if \(\cy{L(x)}<f(x)\), so that the error \(\cr{E(x)}\) is positive, and an overestimate if \(\cy{L(x)}>f(x)\). Which one it is depends on how the graph bends. A function \(f\) that is differentiable on an interval is concave up there if \(f'\) increases on the interval. Its tangent lines then turn counterclockwise as their point moves to the right (topic 3.6). It is concave down if \(f'\) decreases.

A curve through an orange point P, with the orange tangent line through P, which rises from left to right. A faint dashed line marks an input x, which can move to either side of P, where an orange dot on the line and a chalk dot on the curve are joined by a red segment. At first the curve bends upward and lies above the line on both sides of P. One button bends it downward, so that it lies below the line on both sides. Another makes it bend upward near P and downward farther to the right, where it crosses the line.

Figure 2The orange line is tangent to the curve at \(\cy{P}=\big(a,f(a)\big)\) in every state of the figure. On the faint dashed line at \(x\), a red segment joins the orange dot on the line to the chalk dot on the curve.

The curve in Figure 2 is concave up, and it lies above its tangent line on both sides of \(\cy{P}\). Move \(x\) to either side of \(\cy{P}\): the estimate is too low. Then bend the curve downward with the button under Figure 2. It is now concave down and lies below the line, so the estimate is too high on both sides.

To see why, suppose that \(f\) is concave up on an interval that contains \(a\) and \(x\). The error is 0 at \(a\), and it is differentiable on the interval, because \(f\) is. Because \(\cy{L}\) has the constant slope \(f'(a)\), the rate of change of the error is

\[E'(x)=f'(x)-f'(a)\]

Because \(f'\) increases, \(E'\) is positive to the right of \(a\) and negative to the left of \(a\). The argument uses one fact about rates, the fact that makes a particle with positive velocity move to the right (topic 4.2). Suppose that a function is differentiable from one input to a later one. If its derivative is positive at every input between them, the function has a larger value at the later input. If the derivative is negative there, the value at the later input is smaller. Topic 5.3 proves this fact, the Increasing/Decreasing Test.

From \(a\) to an input \(x>a\), the error therefore increases from 0, so \(\cr{E(x)}>0\). From an input \(x<a\) to \(a\), the error decreases to 0, so again \(\cr{E(x)}>0\). The graph lies above its tangent line, and \(\cy{L(x)}\) is an underestimate. If \(f\) is concave down, the same argument with every inequality reversed shows that \(\cy{L(x)}\) is an overestimate.

The second derivative gives the concavity. If \(f''>0\) at every input from \(a\) to \(x\), the same fact applied to \(f'\) shows that \(f'\) increases there. The function is then concave up from \(a\) to \(x\). If \(f''<0\) there, it is concave down. The sign of \(f'\) does not decide. In Figure 2, the tangent line rises in every state, but the estimate can be too low or too high.

If \(f''\) changes sign between \(a\) and \(x\), neither rule applies. Use the last button under Figure 2. The curve is concave up near \(\cy{P}\) and concave down farther to the right, where it crosses the line. Move \(x\) past the crossing, and the estimate changes from too low to too high.

Example 1

Build a tangent-line approximation

The values of \(g(x)=\cos x\) for \(x\) near 1 are hard to compute by hand. Find the local linear approximation of \(g\) at a suitable center near 1.

Solution

A suitable center is close to 1, and \(g\) and \(g'\) have exact values there. Of the special angles of the unit circle, the multiples of \(\frac{\pi}{6}\) and \(\frac{\pi}{4}\), the closest to 1 is \(\frac{\pi}{3}\approx 1.047\). The cosine is differentiable everywhere, with \(g'(x)=-\sin x\), so at the center \(a=\frac{\pi}{3}\)

\[\begin{aligned}g\big(\tfrac{\pi}{3}\big)&=\cos\tfrac{\pi}{3}=\tfrac12\\g'\big(\tfrac{\pi}{3}\big)&=-\sin\tfrac{\pi}{3}=-\tfrac{\sqrt3}{2}\end{aligned}\]

The linearization has this value and this slope at \(\frac{\pi}{3}\):

\[L(x)=\frac12-\frac{\sqrt3}{2}\left(x-\frac{\pi}{3}\right)\]

Example 2

Estimate a nearby function value

Let \(h(x)=\sqrt{x}\). Use the line tangent to the graph of \(h\) at \(x=25\) to estimate \(\sqrt{24.6}\).

Solution

The function \(h\) is differentiable for \(x>0\), with \(h'(x)=\dfrac{1}{2\sqrt{x}}\). At the center, \(h(25)=5\) and \(h'(25)=\frac{1}{10}\). The input 24.6 lies to the left of 25, so the offset is \(24.6-25=-0.4\), and

\[\begin{aligned}\sqrt{24.6}\approx L(24.6)&=5+\tfrac{1}{10}(-0.4)\\&=5-0.04=4.96\end{aligned}\]

As a check, \(4.96^2=24.6016\), which is close to 24.6.

Example 3

Predict whether the estimate is high or low

Let \(p(x)=\arctan x\). Use the line tangent to the graph of \(p\) at \(x=1\) to approximate \(p(1.1)\). Is the approximation an overestimate or an underestimate? Give a reason for your answer.

Solution

The function \(p\) is differentiable everywhere, with \(p'(x)=\dfrac{1}{1+x^2}\) (topic 3.4). At the center, \(p(1)=\frac{\pi}{4}\) and \(p'(1)=\frac12\), so

\[\begin{aligned}p(1.1)&\approx\frac{\pi}{4}+\frac12(1.1-1)\\&=\frac{\pi}{4}+0.05\end{aligned}\]

Write \(p'(x)=\left(1+x^2\right)^{-1}\). The chain rule gives the second derivative:

\[\begin{aligned}p''(x)&=-\left(1+x^2\right)^{-2}\cdot 2x\\&=-\frac{2x}{\left(1+x^2\right)^2}\end{aligned}\]

For \(1\le x\le 1.1\), the numerator \(-2x\) is negative and the denominator is positive, so \(p''(x)<0\). The graph of \(p\) is concave down from 1 to 1.1, so it lies below its tangent line there. The approximation \(\frac{\pi}{4}+0.05\) is an overestimate.

As a check, \(\frac{\pi}{4}+0.05\approx 0.8354\), and a calculator gives \(\arctan 1.1\approx 0.8330\), which is less.

Example 4

Use supplied values or a table

The temperature of a cup of coffee is \(C(t)\) degrees Celsius, \(t\) minutes after it is poured. The function \(C\) is differentiable, and the table gives selected values of \(C(t)\) and \(C'(t)\). Use a tangent line approximation at one of these times to estimate the temperature at \(t=6.4\). \[\begin{array}{c|cc} t & C(t) & C'(t)\\ \hline 0 & 90 & -4.5\\ 3 & 78 & -3.4\\ 6 & 69 & -2.5\\ 9 & 62 & -2.0 \end{array}\]

Solution

No formula for \(C\) is given, and none is needed, because the tangent line at a time \(a\) uses only \(C(a)\) and \(C'(a)\). Of the times in the table, 6 is the closest to 6.4, so take \(a=6\), where \(C(6)=69\) and \(C'(6)=-2.5\) degrees Celsius per minute. The offset is \(6.4-6=0.4\) minutes:

\[\begin{aligned}C(6.4)&\approx 69+(-2.5)(0.4)\\&=69-1=68\end{aligned}\]

At 6.4 minutes, the coffee is about 68 degrees Celsius.

Each example is one of the four skills of topic 4.6 in Which & Why: AP Calculus.