The tangent line

Some functions are easy to evaluate at a few convenient inputs and much harder at nearby ones. If we already know a function's value and rate of change at one input, how much can that local information tell us about another?
The derivative gives us a useful shortcut: near a known point, we can replace a curve by the line that matches its value and slope. This local model lets us estimate nearby values and decide when an approximation is useful.
By the end of this lesson, you should be able to:
- Use \( \Delta y\approx f'(a)\Delta x \) to estimate small changes in a function.
- Construct and interpret a tangent line approximation from a formula, graph, or table.
- Use concavity, error measures, and tangent-line models to evaluate approximations and estimate tolerances.
Whenever you play a video game with 3D graphics, lighting is a big part of what makes the scene feel real. But to draw even one frame, the computer may need to repeat the same lighting calculation at many points on many surfaces. When a calculation must be repeated this often, a fast approximation can be extremely useful.
For instance, at one point in the scene, we might have to evaluate the expression
\[\frac1{\sqrt{2^2+3^2+4^2}}=\frac1{\sqrt{29}}\text.\]
While squaring and adding are quick for a computer, the challenging part is the reciprocal of the square root. Let
\[s(x)=\frac1{\sqrt x}=x^{-1/2}\text{.}\]
This means our lighting calculation now asks for \( s(29) \).
One simple idea is to look for a nearby input that is friendlier. Since \( 25 \) has an easy square root, we can quickly compute \( s(25) \):
\(\displaystyle s(25)=\)\(\displaystyle \text{.}\)
Then, since \( \sqrt{29} \) is close to \( \sqrt{25} \) but a bit greater, we should expect that \( s(29) \) is close to \( s(25) \) but .
How much smaller should \( s(29) \) be? The input changes from \( 25 \) to \( 29 \), so
\(\displaystyle \Delta x=29-25=\)\(\displaystyle \text{.}\)
What we want to know is the corresponding change in the output,
\[\Delta s=s(29)-s(25)\text{.}\]
If we can estimate \( \Delta s \), then we can estimate the value we wanted in the first place by computing \( s(29)=s(25)+\Delta s \).
To connect the known input change \( \Delta x \) with the unknown output change \( \Delta s \), we need to know how quickly \( s \) is changing near \( x=25 \). The central idea is to pretend that \( s \) is linear nearby, so that the average rate over this short interval is approximately the instantaneous rate:
\[\frac{\Delta s}{\Delta x}\approx\eval{\dv{s}{x}}_{x=25}=s'(25)\text{.}\]
This tells us what information we need next. The Power Rule gives
\(\displaystyle s'(x)=\)\(\displaystyle \text{,}\)
At \( x=25 \), this derivative is \( s'(25)= \). Its sign confirms that . In differential form,
\(\displaystyle \dd{s}= \)\(\displaystyle \text.\)
This differential relationship describes infinitesimal changes. Since our finite change \( \Delta x=4 \) is fairly small compared with the starting input \( 25 \), we use the same relationship to predict the finite change:
\[\begin{aligned}\frac{\Delta s}{\Delta x}&\approx\dv{s}{x}\\ \Delta s &\approx s'(x)\Delta x\\ &=-\frac12x^{-3/2}\Delta x\end{aligned}\]
Using \( x=25 \) and \( \Delta x=4 \), the predicted change is \( \Delta s\approx \).
Starting at \( s(25)=0.2 \) and adding this predicted change gives the tangent line approximation
\(\displaystyle s(29)\approx s(25)+\Delta s =\)\(\displaystyle \text{.}\)
This worked because we recognized \( 25 \) as a convenient starting point. A computer, however, needs a systematic way to find useful nearby information.
Computers often store numbers in a binary form that resembles scientific notation: a leading number between \( 1 \) and \( 2 \) multiplied by a power of \( 2 \). For \( 29 \), let the leading number be \( m \):
\(\displaystyle 29=m\times2^4,\qquad m=\)\(\displaystyle \text{.}\)
Exponent properties now separate the leading number from the easy power-of-two scale:
\[\begin{aligned}s(29)&=(1.8125\cdot 2^4)^{-1/2}\\ &=1.8125^{-1/2}\cdot (2^4)^{-1/2}\\ &=s(1.8125)\cdot2^{-2}\text{.}\end{aligned}\]
The same idea lets a computer bring positive inputs of many different sizes into the short interval from \( 1 \) to \( 2 \).
Suppose the program has already stored this small lookup table for \( \displaystyle s(x)=\frac{1}{\sqrt x} \), with values shown to six decimal places:
| \( x \) | \( s(x) \) | \( s'(x) \) |
|---|---|---|
| \( 1 \) | \( 1.000000 \) | \( -0.500000 \) |
| \( 1.25 \) | \( 0.894427 \) | \( -0.357771 \) |
| \( 1.5 \) | \( 0.816497 \) | \( -0.272166 \) |
| \( 1.75 \) | \( 0.755929 \) | \( -0.215980 \) |
| \( 2 \) | \( 0.707107 \) | \( -0.176777 \) |
For the leading input \( 1.8125 \), the closest stored input is . The change away from this base point is
\(\displaystyle \Delta x=1.8125-1.75=\)\(\displaystyle \text{.}\)
Pretending once again that the function is linear nearby, the stored slope predicts a change of
\(\displaystyle \Delta s\approx s'(1.75)\cdot \Delta x =\)\(\displaystyle \text{.}\)
Adding that change to the stored value gives
\(\displaystyle s(1.8125)\approx s(1.75)+\Delta s =\)\(\displaystyle \text{.}\)
Finally, restoring the power-of-two scale completes the original calculation:
\(\displaystyle \frac1{\sqrt{29}}\approx s(1.8125)\cdot 2^{-2} =\)\(\displaystyle \text{.}\)
A calculator gives the actual value
\[\frac{1}{\sqrt{29}}\approx0.1856953\text{.}\]
Both of our estimates were close, but the lookup-table estimate was closer. There's an additional benefit as well: once the table has been computed once and stored, each new estimate needs only a lookup, multiplication, addition, and power-of-two scaling instead of a whole new inverse-square-root calculation.
Modern computers may store more values and use more sophisticated ways to refine their guesses. Even so, this small example captures the essential idea: by treating a function as linear nearby, we can replace a difficult repeated calculation with a fast, useful approximation.
Linearization
In Chapter 1, we used an infinitely magnified view of a graph to understand the derivative. A smooth curve may bend when we view it at an ordinary scale, but when we zoom in closer and closer around one point, it becomes increasingly difficult to distinguish from a straight line.
At \( x=a \), the slope of that straightened view is \( f'(a) \). In terms of differentials, this says that an infinitesimal change \( \dd{x} \) produces the corresponding infinitesimal change \[\dd{y}=f'(a)\dd{x}\text{.}\]
Continue the straight line produced by the infinitely magnified view outward in both directions. This continued line is the tangent line. When we return to the ordinary-scale graph, the curve begins to bend away, but the tangent line keeps going in the direction the curve was pointing at \( x=a \).
Why continue the line outward at all? A nonlinear function may be difficult to evaluate or work with, while a linear function is comparatively simple. If the tangent line stays close to the curve for a short distance, we can use the line as a stand-in for the function nearby. In effect, we temporarily pretend that the function continues linearly.
This process of replacing a nonlinear function near a base point with its tangent line is called linearization. We write the resulting linear approximation as
\[L(x)=f(a)+f'(a)(x-a)\text{.}\]
Thus, for inputs near \( a \), \( f(x)\approx L(x) \). The function \( L \) is the linear approximation, or tangent-line approximation, to \( f \) near \( a \).
Suppose we move from \( x=a \) to \( x=a+\Delta x \). The actual change in the function is \[\Delta y=f(a+\Delta x)-f(a)\text{,}\] but the tangent line predicts the simpler change \( f'(a)\Delta x \): slope times horizontal change. The tangent line does not account for the curve's bending, so the two changes are not usually equal. Near the base point, however, they are often close.
Evaluating approximation error
An approximation is more useful when we understand how much to trust it. Once we have replaced a function with its tangent line, two natural questions arise: Should the estimate be larger or smaller than the actual value? And how far apart are the two values?
Concavity helps with the first question. A tangent line continues in the direction the curve is pointing at the base point, while the curve itself may begin bending away from that line. The direction of this bending tells us whether the tangent line approximation will be too high or too low:
If \( f''(x)>0 \) near \( a \), the graph is concave up, so the tangent line lies under it. Thus \( L(x) \) is an underestimate.
If \( f''(x)<0 \) near \( a \), the graph is concave down, so the tangent line lies on top of it. Thus \( L(x) \) is an overestimate.
Concavity predicts the direction of the error, but not its size. To measure how far an estimate is from the actual value, let \( y \) be the actual value and \( y_{\mathrm{approx}} \) the approximation.
The absolute error is simply the distance between the two numbers:
\[\text{absolute error}=|y-y_{\mathrm{approx}}|\text{.}\]
That distance needs some context. An error of \( 1 \) centimeter may be negligible when estimating a kilometer and serious when manufacturing a small component. When \( y\ne0 \), the relative error compares the absolute error with the size of the actual value.
\[\text{relative error}=\frac{|y-y_{\mathrm{approx}}|}{|y|}\text{.}\]
The relative error can sometimes be written as a percent error; for example, a relative error of \( 0.02 \) can also be written as \( 2\% \).
Absolute and relative error therefore answer different questions. Absolute error tells us the size of the error in the original units. Relative error has no units; it tells us whether that error is large or small compared with the quantity itself.
Tolerance
Sometimes we know our desired accuracy before we make any measurement. A manufactured part, for example, may be allowed to vary only slightly from its intended dimensions. This acceptable variation is called a tolerance.
Tolerance uses the same local relationship we used for approximation:
\[\Delta y\approx f'(a)\Delta x\text{.}\]
Because a tolerance describes the size of an allowed change rather than its direction, we use absolute values:
\[|\Delta y|\approx|f'(a)\Delta x|\text{.}\]
This relationship lets us reason in either direction. On one hand, if we know how much the input might vary, we can estimate the resulting variation in the output. On the other hand, if we know how much output variation is acceptable, we can substitute that value for \( |\Delta y| \) and solve for how tightly the input must be controlled.
The magnitude \( |f'(a)| \) measures how strongly the output responds near the base point. When this magnitude is large, even a small input error can produce a substantial output error, so the input tolerance must be tight. When it is small, the output is less sensitive and a wider input tolerance may be acceptable.
Estimate \( \sqrt{${target_text}} \) using linearization.
Choose a function and a convenient base point, and explain your choice.
Solution
Use \( f(x)=\sqrt{x} \). The nearby input \( a=${base} \) is convenient because \( f(${base})=${n} \) is easy to compute.
Find the equation of the tangent line.
Solution
Since \( f'(x)=1/(2\sqrt{x}) \), we have \( f'(${base})=${slope} \). Therefore,
\[L(x)=${n}+${slope}(x-${base})\text{.}\]
Find the estimate.
Solution
Here \( \Delta x=${dx_text} \), so \( \Delta y\approx(${slope})(${dx_text})=${dy_text} \). Therefore \( \sqrt{${target_text}}\approx${estimate_text} \).
Is the estimate high or low?
Solution
Because \( f''(x)=-1/(4x^{3/2})<0 \), the square-root graph is concave down and the tangent line gives an overestimate.
Estimate \( (${target_text})^{${p}} \) using \( f(x)=x^{${p}} \) near \( x=1 \).
Solution
Since \( f(1)=1 \), \( f'(1)=${p} \), and \( \Delta x=${dx_text} \),
\[(${target_text})^{${p}}\approx1+${p}(${dx_text})=${estimate_text}\text{.}\]
Here \( f''(x)=${second_coefficient}x^{${p-2}}>0 \) near \( 1 \), so the tangent line gives an underestimate. Indeed, the actual value is approximately \( ${actual_text} \).
The volume of a spherical balloon is \( V=\frac43\pi r^3 \). Its radius is measured as \( ${R} \) cm, with a possible measurement error of \( ${radius_error_text} \) cm.
Use a local linear approximation to estimate the resulting magnitude of the volume error.
Solution
Since \( \dv{V}{r}=4\pi r^2 \),
\[|\Delta V|\approx4\pi(${R})^2|\Delta r|\le4\pi(${R})^2(${radius_error_text})=${volume_bound_coefficient_text}\pi\approx${volume_bound_text}\text{ cm}^3\text{.}\]
Explain what the estimate means.
Solution
A radius error with magnitude at most \( ${radius_error_text} \) cm is predicted to produce a volume error of no more than approximately \( ${volume_bound_text} \) cubic centimeters near a radius of \( ${R} \) cm. This is a local approximation, not an exact error bound.
Suppose instead that the balloon's volume must stay within \( ${volume_tolerance}\text{ cm}^3 \) of its intended volume. Estimate a suitable tolerance for the radius.
Solution
Near \( r=${R} \), the tangent-line model gives \( |\Delta V|\approx${sensitivity}\pi|\Delta r| \). Setting the allowable volume variation equal to \( ${volume_tolerance}\text{ cm}^3 \) gives
\[|\Delta r|\approx\frac{${volume_tolerance}}{${sensitivity}\pi}\approx${radius_tolerance_text}\text{ cm}\text{.}\]
A radius tolerance of about \( ${radius_tolerance_text} \) cm should keep the volume within approximately \( ${volume_tolerance}\text{ cm}^3 \) of its intended value.
The graph shows a function \( f \) and its tangent line at \( x=2 \). The gray vertical line marks the target input \( x=2.6 \).
The blue curve is \( f \). The red dashed line is tangent to the curve at \( (2,3) \); the marked point \( (4,4) \) helps show its slope. Use the marked points to determine \( f(2) \) and \( f'(2) \).
Solution
The point of tangency is \( (2,3) \), so \( f(2)=3 \). The tangent line passes through \( (2,3) \) and \( (4,4) \), so its slope is
\[f'(2)=\frac{4-3}{4-2}=\frac12\text{.}\]
Use the tangent line to estimate \( f(2.6) \).
Solution
The input change is \( \Delta x=2.6-2=0.6 \), so
\[f(2.6)\approx3+\frac12(0.6)=3.3\text{.}\]
Is the estimate an overestimate or an underestimate? Explain how the graph shows this.
Solution
The graph is concave down between \( 2 \) and \( 2.6 \), and the red tangent line lies above the blue curve there. Therefore \( 3.3 \) is an overestimate.
Use linearization at \( a=4 \) to estimate \( 1/4.1 \). Before comparing with the exact value, predict whether the estimate is an overestimate or an underestimate. Then find its absolute and relative errors.
Solution
Let \( f(x)=1/x \). Since \( f(4)=1/4 \) and \( f'(4)=-1/16 \), the tangent-line function is
\[L(x)=\frac14-\frac{x-4}{16}\text{.}\]
Therefore,
\[\frac1{4.1}\approx L(4.1)=\frac{39}{160}=0.24375\text{.}\]
Because \( f''(x)=2/x^3>0 \) for positive inputs, the function is concave up near \( 4 \). Its tangent line lies below the curve, so we expect an underestimate.
The exact value is \( 1/4.1=10/41\approx0.24390244 \), which confirms that prediction. The absolute error is
\[\left|\frac{10}{41}-\frac{39}{160}\right|=\frac1{6560}\approx0.00015244\text{,}\]
and the relative error is
\[\frac{1/6560}{10/41}=\frac1{1600}=0.000625\text{,}\]
or \( 0.0625\% \).
A sensor reports that at \( t=${t0} \) minutes, the concentration of a dissolved substance is \( C(${t0})=${concentration_text} \) mg/L and is changing at a rate of \( C'(${t0})=${rate_text} \) mg/L per minute.
Estimate the concentration at \( t=${target_time_text} \) minutes.
mg/L
Solution
The time change is \( ${dt_text} \) minute, so \( \Delta C\approx(${rate_text})(${dt_text})=${change_text} \) mg/L. Thus \( C(${target_time_text})\approx${concentration_text}+(${change_text})=${estimate_text} \) mg/L.
Interpret the negative predicted change.
Solution
The model predicts that the concentration falls by about \( ${drop_text} \) mg/L during the \( ${dt_text} \)-minute interval. The sign describes the direction of change, not a negative concentration.
Can the sensor report determine whether \( ${estimate_text} \) is an overestimate or an underestimate?
Solution
No. That judgment requires information about how \( C'(t) \) changes, such as the sign of \( C'' \), over the interval.
A student writes \( \Delta y=f'(a)\Delta x \) for every differentiable function and every input change. Correct the statement and explain the distinction the student has lost.
For the linear function \( f(x)=7-3x \), compare the actual change \( \Delta y \) with the change predicted by the tangent line for an arbitrary finite change \( \Delta x \).
Solution
The actual change is
\[\Delta y=f(x+\Delta x)-f(x)=-3\Delta x\text{.}\]
Since \( f'(x)=-3 \), the tangent line also predicts \( f'(x)\Delta x=-3\Delta x \). The predicted and actual changes agree for every input change because a linear function is identical to each of its tangent lines.
Use this comparison to correct the student's statement.
Solution
In general, \( \Delta y\approx f'(a)\Delta x \) only when the input change is sufficiently small for the tangent line to model the curve well. The actual change follows the function: \( \Delta y=f(a+\Delta x)-f(a) \). The quantity \( f'(a)\Delta x \) is the change predicted by continuing the tangent line across the finite interval. Equality holds for every input change when the function itself is linear, but not for a general curve.