Linear approximation and differentials
A tangent line hugs its curve near the point of contact. How much can that line tell you about nearby values of the function, and how far does a small error in a measurement spread into a quantity computed from it?
Where you are 11 in Applications of derivatives
When you reach for it
Reach for a linearization when you know a function’s value and slope at one convenient input a and want its value at a nearby input that is awkward to compute, such as \displaystyle \sqrt[3]{66} or e^{0.05}. Reach for differentials when a quantity is computed from a measurement, the measurement carries an error, and you want to know how large the error in the computed quantity can be.
Both rest on one fact from tangent lines: near the point of contact, the tangent line is the line that fits the curve best, closer than any other line through that point. Example 6 there, Hema’s cube, already used the tangent line to estimate a volume. This lesson makes the idea a tool: when the estimate is high or low, how fast its error shrinks, and how an error in an input moves through a formula. Reading a derivative in context used “rate times a small change” for one step; here that step gets a name, dy, and a measure of how good it is.
The procedure
Day 1: the linearization
The line. For a function f that is differentiable at a, the linearization (or local linear approximation) of f at a is the tangent line written as a function,
It agrees with f at a and has the same slope there. For x near a we use it in place of f:
The input a is a choice. Pick it close to the input you care about and with f(a) and f'(a) easy to find exactly: a = 64 for a cube root near 66, a = 0 for e^x with x near 0. The right-hand side then needs only arithmetic. The rules available so far are enough: the power rule for x^n with any rational exponent, \dfrac{d}{dx}\big[e^{kx}\big] = ke^{kx} and \dfrac{d}{dx}\big[a^x\big] = a^x \ln a from derivatives of exponentials, and the product rule.
At a = 0 two linearizations come up so often that they are worth knowing on sight. Since e^0 = 1 and the slope of e^x at 0 is e^0 = 1, and the slope of (1 + x)^n at 0 is n,
both for x near 0.
High or low, from the shape of the graph. Where the graph bends upward, like a cup, it lies above each of its tangent lines nearby, so L(x) is below f(x) and the estimate is low. Where the graph bends downward, like a cap, it lies below its tangent lines, and the estimate is high. A way to see the bending from the derivative: on a stretch where f' is increasing the tangent slopes steepen as you move right, which is the upward bend; where f' is decreasing the graph bends downward. For now this is read from a picture or from how f' behaves; Concavity and inflection points turns it into a test with the Second and higher derivatives.
How fast the error shrinks. Call the error E(x) = f(x) - L(x). The tangent-line lesson showed that \dfrac{E(x)}{x - a} \to 0, so the error is small even compared with the distance x - a. Much more is true. If the slope f' itself changes at a bounded rate near a, then there is a constant K such that, for every x near a,
This is stated here without proof. It follows from the mean value theorem, and one K that works is half the largest size of the Second and higher derivatives near a; Taylor polynomials make it exact. In practice it means that the error behaves like a constant times (x - a)^2: halving the distance from a cuts the error to about a quarter, and a distance ten times smaller gives an error about a hundred times smaller.
Day 2: differentials and the error in a measurement
Two kinds of change. Fix an input x and a change dx in it; dx is a new variable, the differential of x, and it may be any number. The differential of y = f(x) is
It is the change in height along the tangent line when the input moves by dx. The actual change along the curve is \Delta y = f(x + dx) - f(x). Since f(x + dx) \approx f(x) + f'(x)\,dx is the linearization at x, the two agree to first order:
with \Delta y - dy = E(x + dx), the linearization’s error, which is at most about a constant times (dx)^2. When dx \ne 0 the derivative is now an honest quotient of differentials, f'(x) = \dfrac{dy}{dx}, which is one reason for the Leibniz notation. The differential is used rather than \Delta y because it is linear in dx: doubling dx doubles dy exactly, and a formula for dy is a product, easy to work with.
Errors that spread. Suppose a length is measured as x, and the true value is x + dx for some dx we do not know, only a bound |dx| \le \delta. A quantity y = f(x) computed from the measurement is then off by \Delta y, which we estimate by dy:
- the absolute error in y is about |dy| = |f'(x)|\,|dx|, in the units of y;
- the relative error is about \dfrac{|dy|}{|y|}, a pure number with no units;
- the percentage error is the relative error times 100\%.
The sign of dx is unknown, so the result is a “plus or minus” bound. The relative error is the one that says whether an error matters: an error of 1 square centimeter is negligible on a mirror of 300 square centimeters and serious on one of 3. Relative change itself is the Percent change of earlier courses, now estimated with a derivative.
Worked examples
Day 1: a cube root and a fourth power
Estimate (a) \displaystyle \sqrt[3]{66} and (b) 1.98^4 with linearizations, and decide from the shape of each graph whether the estimate is high or low.
Solution(a) Take f(x) = x^{1/3} and a = 64, the perfect cube nearest 66. Then f(64) = 4, and by the power rule \displaystyle f'(x) = \frac{1}{3}x^{-2/3}, so f'(64) = \dfrac{1}{3 \cdot 16} = \dfrac{1}{48}. The linearization is \displaystyle L(x) = 4 + \frac{1}{48}(x - 64), and
The slope \displaystyle \frac{1}{3}x^{-2/3} decreases as x grows, so the graph bends downward and lies below its tangent: the estimate is high. Indeed \displaystyle \sqrt[3]{66} \approx 4.04124, so the estimate is high by about 0.00043.
(b) Take g(x) = x^4 and a = 2. Then g(2) = 16, g'(x) = 4x^3, g'(2) = 32, and
The slope 4x^3 increases for x > 0, so the graph bends upward, lies above its tangent, and the estimate is low. The exact value is 1.98^4 = 15.36953616, so the estimate is low by about 0.0095.
Day 1: e^x near 0, and the error watched as it shrinks
Use e^x \approx 1 + x to estimate e^{0.2}, e^{0.1} and e^{0.05}. Compute each error E(x) = e^x - (1 + x) and compare it with x^2.
SolutionThe linearization of e^x at 0 is L(x) = 1 + x, since e^0 = 1 and \dfrac{d}{dx}\big[e^x\big] = e^x equals 1 at 0. The estimates are 1.2, 1.1 and 1.05. Calculator values give
| x | e^x | E(x) | E(x)/x^2 |
|---|---|---|---|
| 0.2 | 1.2214028 | 0.0214028 | 0.535 |
| 0.1 | 1.1051709 | 0.0051709 | 0.517 |
| 0.05 | 1.0512711 | 0.0012711 | 0.508 |
Every error is positive: as the figure shows, the graph of e^x bends upward and lies above its tangent, so each estimate is low. Each time x is halved the error drops by a factor of about 4 (0.0214 / 0.00517 \approx 4.14 and 0.00517 / 0.00127 \approx 4.07), and the last column settles near \displaystyle \frac{1}{2}. So \displaystyle E(x) \approx \frac{1}{2}x^2 near 0: the error shrinks like the square of the distance, as stated in the procedure.
Day 1: Firuz’s grinding depth
Firuz grinds a hollow into the center of a glass disk that will become a telescope mirror. He models the depth of the hollow as h(t) = 0.4t\,e^{-0.1t} millimeters after t hours of grinding, for 0 \le t \le 10. Use the linearization at t = 5 to estimate the depth at t = 5.5, decide whether the estimate is high or low, and compare with the model.
Solutionh is a product, so we use the product rule. The second factor is an exponential with a fixed base, e^{-0.1t} = \left(e^{-0.1}\right)^t, and \ln e^{-0.1} = -0.1, so \dfrac{d}{dt}\big[e^{-0.1t}\big] = -0.1e^{-0.1t}. Then
At t = 5: h(5) = 2e^{-0.5} \approx 1.21306 millimeters, and h'(5) = 0.4e^{-0.5}(0.5) = 0.2e^{-0.5} \approx 0.12131 millimeters per hour. The linearization gives
millimeters.
The rate h'(t) = 0.4e^{-0.1t}(1 - 0.1t) falls as t grows, since both factors shrink while staying positive on 0 \le t < 10; at t = 5.5 it is about 0.10385. Falling slopes mean the graph bends downward, so it lies below its tangent and the estimate is high. The model gives h(5.5) = 2.2e^{-0.55} \approx 1.26929 millimeters, so the estimate is high by about 0.0044 millimeters.
Day 2: dy against the actual change
For y = 2x^3 - x, write the differential dy. At x = 1, compare dy with \Delta y for dx = 0.1 and for dx = 0.01.
SolutionThe derivative is 6x^2 - 1, so dy = (6x^2 - 1)\,dx, and at x = 1, dy = 5\,dx.
For dx = 0.1: dy = 0.5, while \Delta y = f(1.1) - f(1), which is (2.662 - 1.1) - 1 = 0.562. For dx = 0.01: dy = 0.05, while \Delta y = f(1.01) - f(1), which is (2.060602 - 1.01) - 1, so \Delta y = 0.050602.
The gap \Delta y - dy is 0.062 and then 0.000602: a step ten times smaller gives a gap about a hundred times smaller, which is the (dx)^2 behavior. As a fraction of the change itself the gap goes from about 11\% to about 1.2\%, so the smaller the step, the better dy describes it.
Day 2: Dilorom measures the mirror
Dilorom measures the diameter of a finished mirror as 20.0 centimeters with calipers good to \pm 0.05 centimeters. The light the mirror gathers depends on its area A = \dfrac{\pi D^2}{4}. Estimate the absolute, relative and percentage error in the computed area.
SolutionThe computed area is A(20) = 100\pi \approx 314.16 square centimeters. The differential is
and at D = 20 with |dD| \le 0.05 it gives |dA| \le 10\pi(0.05) = 0.5\pi \approx 1.57 square centimeters. That is the absolute error: the area is 314.16 \pm 1.57 square centimeters.
The relative error is \dfrac{0.5\pi}{100\pi} = 0.005, a percentage error of 0.5\%. Notice it is twice the relative error in the diameter, \displaystyle \frac{0.05}{20} = 0.0025, because
For comparison, the actual change for dD = 0.05 is \displaystyle \frac{\pi}{4}(20.05^2 - 20^2) = 0.500625\pi, very close to dA.
Day 2: Shahlo’s volume of glass, and the accuracy it demands
Shahlo shapes the hollow as a paraboloid with focal length F = 100 centimeters, treated as exact. Take as a model, stated here without proof, that the volume of glass ground out of a mirror of diameter D is V = \dfrac{\pi D^4}{128F} cubic centimeters. (It is half the volume of a cylinder with the mirror’s width and the hollow’s depth; integrals prove it later.) (a) With D = 20.0 \pm 0.05 centimeters, estimate the error in V, absolute and relative. (b) How accurately must D be measured for the volume to be known within 0.5\%?
Solution(a) With F = 100, V = \dfrac{\pi D^4}{12{,}800}, so V(20) = \dfrac{160{,}000\pi}{12{,}800}, which is 12.5\pi \approx 39.27 cubic centimeters. By the power rule
and at D = 20, |dV| \le \dfrac{32{,}000\pi}{12{,}800}(0.05), which is 0.125\pi \approx 0.39 cubic centimeters. The relative error is \dfrac{0.125\pi}{12.5\pi} = 0.01, or 1\%.
Dividing dV by V shows why: \dfrac{dV}{V} = 4\,\dfrac{dD}{D}. The fourth power multiplies the relative error by 4, just as the square multiplied it by 2 in Example 5.
(b) We need 4\,\dfrac{|dD|}{D} \le 0.005, so \dfrac{|dD|}{D} \le 0.00125, and with D = 20, |dD| \le 0.025 centimeters. The calipers must be twice as precise as Dilorom’s.
Day 2: when the estimate is poor
Dilorom’s calipers are away, and a quick tape reading gives D = 20 centimeters, possibly off by 2 centimeters. Compare the differential estimate of the error in Shahlo’s V with the actual changes V(22) - V(20) and V(18) - V(20).
SolutionFrom Example 6, at D = 20 the differential is dV = 2.5\pi\,dD, so dD = \pm 2 gives dV = \pm 5\pi \approx \pm 15.71 cubic centimeters, a relative error of \pm 40\%.
The actual changes are
These are +46.4\% and -34.4\% of V(20), not \pm 40\%. Against \pm 5\pi, the actual change is larger by 0.80125\pi going up and smaller in size by 0.70125\pi going down: lopsided, and in both cases above the tangent line, since the graph of V bends upward. Expanding,
which shows where the gap comes from: dV keeps only the first term, and with d = \pm 2 the term 2400d^2 is no longer small beside 32{,}000d. An error of 10\% in the input is too big for the linear estimate. With d = 0.05 the same term is 6 against 1600, which is why Example 6 was trustworthy.
Boundaries
- The function must be differentiable at a. At a corner or a cusp, such as y = x^{2/3} at 0, there is no tangent line and no linearization (see Differentiability: corners, cusps and piecewise functions).
- “Near” is not a fixed distance. The error behaves like K(x - a)^2, and K depends on how sharply the graph bends. A linearization can be excellent over a tenth and useless over a whole unit, as Example 7 shows.
- High or low needs a single bend. If the graph changes from bending down to bending up at a, as y = x^3 does at 0, the tangent crosses the curve there and the estimate is high on one side and low on the other.
- A zero derivative hides the change. If f'(x) = 0, then dy = 0 for every dx while \Delta y need not be 0; the differential then says nothing about the size of the error, which is of order (dx)^2.
- Relative error needs y \ne 0, and it is meaningless when y is close to 0.
- Differentials estimate; they do not bound. The absolute error |dy| is an approximation to the error, not a guarantee. A guaranteed bound needs the K(x - a)^2 term as well.
Where this goes next
Newton's method runs the linearization backward: instead of estimating f(x) from a tangent line, it finds where the tangent line crosses zero and uses that as the next guess at a root. Related rates uses the same relationship between changes, \displaystyle dA = \frac{\pi D}{2}\,dD, divided by a change in time. Concavity and inflection points turns “bends up or down” into a test, which settles whether a linear estimate is high or low without a picture. Taylor polynomials add an (x - a)^2 term and higher ones to the linearization, and the error drops to a higher power of x - a each time. The differential dx returns in substitution for integrals, where du = g'(x)\,dx is exactly the rule written here.
Exercises
Day 1: linearizations and estimates
- Find the linearization of f(x) = x^3 - 5x + 2 at a = 2 and use it to estimate f(2.05). Compare with the exact value.
- Estimate \displaystyle \sqrt{36.6} with a linearization, and say whether the estimate is high or low.
- Estimate \displaystyle \sqrt[3]{7.88} with a linearization, and say whether the estimate is high or low.
- Use (1 + x)^n \approx 1 + nx to estimate (1.01)^{10}. Is the estimate high or low?
- Estimate \dfrac{1}{0.98^2} by linearizing f(x) = x^{-2} at a = 1. Is the estimate high or low?
- Estimate e^{-0.04} with the linearization of e^x at 0, and compare with a calculator value.
- Find the linearization of 3^x at 0 and use it to estimate 3^{0.02}. Is the estimate high or low?
- Find the linearization of g(x) = (x + 2)e^x at 0 and use it to estimate g(0.1). Compare with the exact value.
- A function has f(3) = 5 and f'(3) = 2, and f' is increasing on [3, 4]. Estimate f(3.2) and say whether the estimate is high or low.
- For f(x) = \dfrac{1}{x}, find the linearization L at a = 1 and show that f(x) - L(x) = \dfrac{(x - 1)^2}{x}. Use this to find the error at x = 1.1 and at x = 1.05, and the ratio of the two errors.
- After a grinding session Shahlo’s glass disk is warm, and its temperature is T(t) = 20 + 15e^{-0.4t} degrees Celsius t hours later. Use the linearization at t = 0 to estimate T(0.5), compare with the model, and explain from the slope whether the estimate is high or low.
Day 2: differentials and errors
- For y = x^4 - 2x^3, find dy. At x = 1 with dx = 0.05, compute dy and \Delta y.
- For y = x e^{2x}, find dy. At x = 0 with dx = 0.1, compute dy and \Delta y.
- The radius of a circular mirror is measured as 7.5 centimeters, with an error of at most 0.02 centimeters. Estimate the absolute, relative and percentage error in its computed area.
- A steel ball in Firuz’s mirror support has a measured radius of 0.5 centimeters, with an error of at most 0.01 centimeters. Estimate the absolute and percentage error in its computed volume \displaystyle V = \frac{4}{3}\pi r^3.
- How accurately must the radius of a circle of about 7.5 centimeters be measured for its area to be known within 1\%?
- The focal ratio of a telescope is N = \dfrac{F}{D}. With F = 150 centimeters exact and D = 25.0 \pm 0.1 centimeters, find N and estimate its absolute and percentage error.
- The depth at the center of a paraboloid mirror of diameter D and focal length F is s = \dfrac{D^2}{16F}. With F = 75 centimeters exact and D = 15.0 \pm 0.04 centimeters, find s and estimate its absolute and percentage error.
- For y = x^2 - 6x + 10 at x = 3 with dx = 0.1, compute dy and \Delta y, and explain why the differential fails here.
Reasoning
- Show that for y = kx^n, with k and n nonzero constants, the relative error in y is about |n| times the relative error in x.
- For the area of a circle, A = \pi r^2, show that \Delta A - dA = \pi(dr)^2 exactly. Interpret dA and the leftover \pi(dr)^2 in terms of a thin ring around the circle.
- Explain why 1 + x underestimates e^x for every x \ne 0, using the derivative of e^x - (1 + x).
- Firuz says that measuring a mirror’s diameter twice as precisely halves the error estimate dA for its area. Shahlo says it cuts the gap between the estimate and the actual change to a quarter. Who is right?
Answers
- L(x) = 7(x - 2), so f(2.05) \approx 0.35; exactly f(2.05) = 0.365125. Here f(2) = 0 and f'(x) = 3x^2 - 5 gives f'(2) = 7. The estimate is low by 0.015125.
- \displaystyle \sqrt{36.6} \approx 6.05, high. With a = 36, \displaystyle L(x) = 6 + \frac{1}{12}(x - 36), and L(36.6) = 6.05, while \displaystyle \sqrt{36.6} \approx 6.04979. The slope \displaystyle \frac{1}{2}x^{-1/2} decreases, so the graph bends downward.
- \displaystyle \sqrt[3]{7.88} \approx 1.99, high. With a = 8, \displaystyle f'(8) = \frac{1}{3}(8)^{-2/3} = \frac{1}{12}, so \displaystyle L(7.88) = 2 - \frac{0.12}{12} = 1.99. Indeed 1.99^3 = 7.880599 > 7.88, and \displaystyle \sqrt[3]{7.88} \approx 1.98995.
- (1.01)^{10} \approx 1.1, low. The value is about 1.104622; the slope 10x^9 of x^{10} increases for x > 0, so the graph bends upward.
- \dfrac{1}{0.98^2} \approx 1.04, low. f(1) = 1 and f'(x) = -2x^{-3} gives f'(1) = -2, so L(0.98) = 1 - 2(-0.02) = 1.04; the value is about 1.041233.
- e^{-0.04} \approx 0.96; the calculator gives 0.960789, so the estimate is low by about 0.00079.
- L(x) = 1 + x\ln 3, so 3^{0.02} \approx 1.021972, low. The slope at 0 is 3^0 \ln 3 = \ln 3; the value is about 1.022215, and the slope 3^x \ln 3 increases, so the graph bends upward.
- L(x) = 2 + 3x, so g(0.1) \approx 2.3; exactly g(0.1) = 2.1e^{0.1} \approx 2.320859. By the product rule g'(x) = e^x + (x + 2)e^x = (x + 3)e^x, so g(0) = 2 and g'(0) = 3.
- f(3.2) \approx 5 + 2(0.2) = 5.4, low. An increasing f' means the graph bends upward and lies above its tangent.
- L(x) = 2 - x, since f(1) = 1 and f'(1) = -1. Then f(x) - L(x) = \dfrac{1}{x} - 2 + x, and over the common denominator this is \dfrac{1 - 2x + x^2}{x} = \dfrac{(x - 1)^2}{x}. The errors are \displaystyle \frac{1}{110} \approx 0.009091 and \displaystyle \frac{1}{420} \approx 0.002381, with ratio \displaystyle \frac{42}{11} \approx 3.82, close to 4.
- T(0.5) \approx 32 degrees; the model gives 32.281. T(0) = 35 and T'(t) = -6e^{-0.4t}, so L(t) = 35 - 6t. The slope -6e^{-0.4t} rises toward 0 as t grows, so the graph bends upward and the estimate is low.
- dy = (4x^3 - 6x^2)\,dx. At x = 1: dy = -2(0.05) = -0.1, and \Delta y = (1.05^4 - 2 \cdot 1.05^3) - (1 - 2), which is -0.09974375.
- dy = (1 + 2x)e^{2x}\,dx, by the product rule. At x = 0: dy = 0.1, and \Delta y = 0.1e^{0.2} \approx 0.122140.
- A = 56.25\pi \approx 176.71 square centimeters; |dA| \le 2\pi(7.5)(0.02), which is 0.3\pi \approx 0.94 square centimeters; relative error \displaystyle \frac{0.3\pi}{56.25\pi} \approx 0.00533, about 0.53\%.
- \displaystyle V = \frac{\pi}{6} \approx 0.5236 cubic centimeters; |dV| \le 4\pi(0.5)^2(0.01), which is 0.01\pi \approx 0.0314 cubic centimeters; the percentage error is \displaystyle \frac{0.01\pi}{\pi/6} = 0.06, or 6\%.
- To within 0.0375 centimeters. \displaystyle \frac{dA}{A} = 2\frac{dr}{r}, so \displaystyle 2\frac{|dr|}{7.5} \le 0.01 gives |dr| \le 0.0375, a relative error in r of 0.5\%.
- N = 6; \displaystyle |dN| \le \frac{150}{25^2}(0.1) = 0.024; percentage error \displaystyle \frac{0.024}{6} = 0.4\%. Here \displaystyle dN = -\frac{F}{D^2}\,dD.
- \displaystyle s = \frac{225}{1200} = 0.1875 centimeters; \displaystyle ds = \frac{D}{8F}\,dD, so \displaystyle |ds| \le \frac{15}{600}(0.04) = 0.001 centimeters; percentage error \displaystyle \frac{0.001}{0.1875} \approx 0.53\%.
- dy = 0 and \Delta y = 0.01. The derivative 2x - 6 is 0 at x = 3, so the tangent is horizontal and dy = 0 for every dx, but f(3.1) - f(3) = 1.01 - 1 = 0.01. The whole change is the (dx)^2 part that the differential leaves out.
- dy = knx^{n-1}\,dx, so \dfrac{dy}{y} = \dfrac{knx^{n-1}\,dx}{kx^n}, which simplifies to n\,\dfrac{dx}{x}. Taking absolute values, \dfrac{|dy|}{|y|} = |n|\,\dfrac{|dx|}{|x|}.
- \Delta A = \pi(r + dr)^2 - \pi r^2, which expands to 2\pi r\,dr + \pi(dr)^2, and dA = 2\pi r\,dr, so \Delta A - dA = \pi(dr)^2. The ring of width dr has area \Delta A; dA is the circumference times the width, as if the ring were cut and laid flat as a strip, and \pi(dr)^2 is the extra area from the outer edge being longer than the inner one.
- Let g(x) = e^x - (1 + x), so g(0) = 0 and g'(x) = e^x - 1. For x > 0, g' > 0, so g rises from 0 and is positive; for x < 0, g' < 0, so g falls to 0 at x = 0 and is positive before it. Either way e^x > 1 + x.
- Both. \displaystyle dA = \frac{\pi D}{2}\,dD is linear in dD, so halving dD halves it. The gap \displaystyle \Delta A - dA = \frac{\pi}{4}(dD)^2 is quadratic in dD, so halving dD quarters it.