4.2 Linear Approximations and Differentials

Learning Objectives

  • Describe the linear approximation to a function at a point.
  • Write the linearization of a given function.
  • Draw a graph that illustrates the use of differentials to approximate the change in a quantity.
  • Calculate the relative error and percentage error in using a differential approximation.

We have just seen how derivatives allow us to compare related quantities that are changing over time. In this section, we examine another application of derivatives: the ability to approximate functions locally by linear functions. Linear functions are the easiest functions with which to work, so they provide a useful tool for approximating function values. In addition, the ideas presented in this section are generalized in the second volume of this text, when we studied how to approximate functions by higher-degree polynomials in the Introduction to Power Series and Functions.

Linear Approximation of a Function at a Point

Consider a function [latex]f[/latex] that is differentiable at a point [latex]x=a[/latex]. Recall that the tangent line to the graph of [latex]f[/latex] at [latex]a[/latex] is given by the equation

[latex]y=f(a)+f^{\prime}(a)(x-a)[/latex].

For example, consider the function [latex]f(x)=\frac{1}{x}[/latex] at [latex]a=2[/latex]. Since [latex]f[/latex] is differentiable at [latex]x=2[/latex] and [latex]f^{\prime}(x)=-\frac{1}{x^2}[/latex], we see that [latex]f^{\prime}(2)=-\frac{1}{4}[/latex]. Therefore, the tangent line to the graph of [latex]f[/latex] at [latex]a=2[/latex] is given by the equation

[latex]y=\frac{1}{2}-\frac{1}{4}(x-2)[/latex].

(Figure)(a) shows a graph of [latex]f(x)=\frac{1}{x}[/latex] along with the tangent line to [latex]f[/latex] at [latex]x=2[/latex]. Note that for [latex]x[/latex] near 2, the graph of the tangent line is close to the graph of [latex]f[/latex]. As a result, we can use the equation of the tangent line to approximate [latex]f(x)[/latex] for [latex]x[/latex] near 2. For example, if [latex]x=2.1[/latex], the [latex]y[/latex] value of the corresponding point on the tangent line is

[latex]y=\frac{1}{2}-\frac{1}{4}(2.1-2)=0.475[/latex].

The actual value of [latex]f(2.1)[/latex] is given by

[latex]f(2.1)=\frac{1}{2.1}\approx 0.47619[/latex].

Therefore, the tangent line gives us a fairly good approximation of [latex]f(2.1)[/latex] ((Figure)(b)). However, note that for values of [latex]x[/latex] far from 2, the equation of the tangent line does not give us a good approximation. For example, if [latex]x=10[/latex], the [latex]y[/latex]-value of the corresponding point on the tangent line is

[latex]y=\frac{1}{2}-\frac{1}{4}(10-2)=\frac{1}{2}-2=-1.5[/latex],

whereas the value of the function at [latex]x=10[/latex] is [latex]f(10)=0.1[/latex].

This figure has two parts a and b. In figure a, the line f(x) = 1/x is shown with its tangent line at x = 2. In figure b, the area near the tangent point is blown up to show how good of an approximation the tangent is near x = 2.

Figure 1. (a) The tangent line to [latex]f(x)=1/x[/latex] at [latex]x=2[/latex] provides a good approximation to [latex]f[/latex] for [latex]x[/latex] near 2. (b) At [latex]x=2.1[/latex], the value of [latex]y[/latex] on the tangent line to [latex]f(x)=1/x[/latex] is 0.475. The actual value of [latex]f(2.1)[/latex] is [latex]1/2.1[/latex], which is approximately 0.47619.

In general, for a differentiable function [latex]f[/latex], the equation of the tangent line to [latex]f[/latex] at [latex]x=a[/latex] can be used to approximate [latex]f(x)[/latex] for [latex]x[/latex] near [latex]a[/latex]. Therefore, we can write

[latex]f(x)\approx f(a)+f^{\prime}(a)(x-a)[/latex] for [latex]x[/latex] near [latex]a[/latex].

We call the linear function

[latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex]

the linear approximation, or tangent line approximation, of [latex]f[/latex] at [latex]x=a[/latex]. This function [latex]L[/latex] is also known as the linearization of [latex]f[/latex] at [latex]x=a[/latex].

To show how useful the linear approximation can be, we look at how to find the linear approximation for [latex]f(x)=\sqrt{x}[/latex] at [latex]x=9[/latex].

Linear Approximation of [latex]\sqrt{x}[/latex]

Find the linear approximation of [latex]f(x)=\sqrt{x}[/latex] at [latex]x=9[/latex] and use the approximation to estimate [latex]\sqrt{9.1}[/latex].

Analysis

Using a calculator, the value of [latex]\sqrt{9.1}[/latex] to four decimal places is 3.0166. The value given by the linear approximation, 3.0167, is very close to the value obtained with a calculator, so it appears that using this linear approximation is a good way to estimate [latex]\sqrt{x}[/latex], at least for [latex]x[/latex] near 9. At the same time, it may seem odd to use a linear approximation when we can just push a few buttons on a calculator to evaluate [latex]\sqrt{9.1}[/latex]. However, how does the calculator evaluate [latex]\sqrt{9.1}[/latex]? The calculator uses an approximation! In fact, calculators and computers use approximations all the time to evaluate mathematical expressions; they just use higher-degree approximations.

Find the local linear approximation to [latex]f(x)=\sqrt[3]{x}[/latex] at [latex]x=8[/latex]. Use it to approximate [latex]\sqrt[3]{8.1}[/latex] to five decimal places.

Hint

[latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex]

Linear Approximation of [latex]\sin x[/latex]

Find the linear approximation of [latex]f(x)= \sin x[/latex] at [latex]x=\frac{\pi}{3}[/latex] and use it to approximate [latex]\sin (62^{\circ})[/latex].

Find the linear approximation for [latex]f(x)= \cos x[/latex] at [latex]x=\frac{\pi }{2}[/latex].

Hint

[latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex]

Linear approximations may be used in estimating roots and powers. In the next example, we find the linear approximation for [latex]f(x)=(1+x)^n[/latex] at [latex]x=0[/latex], which can be used to estimate roots and powers for real numbers near 1. The same idea can be extended to a function of the form [latex]f(x)=(m+x)^n[/latex] to estimate roots and powers near a different number [latex]m[/latex].

Approximating Roots and Powers

Find the linear approximation of [latex]f(x)=(1+x)^n[/latex] at [latex]x=0[/latex]. Use this approximation to estimate [latex](1.01)^3[/latex].

Find the linear approximation of [latex]f(x)=(1+x)^4[/latex] at [latex]x=0[/latex] without using the result from the preceding example.

Hint

[latex]f^{\prime}(x)=4(1+x)^3[/latex]

Differentials

We have seen that linear approximations can be used to estimate function values. They can also be used to estimate the amount a function value changes as a result of a small change in the input. To discuss this more formally, we define a related concept: differentials. Differentials provide us with a way of estimating the amount a function changes as a result of a small change in input values.

When we first looked at derivatives, we used the Leibniz notation [latex]dy/dx[/latex] to represent the derivative of [latex]y[/latex] with respect to [latex]x[/latex]. Although we used the expressions [latex]dy[/latex] and [latex]dx[/latex] in this notation, they did not have meaning on their own. Here we see a meaning to the expressions [latex]dy[/latex] and [latex]dx[/latex]. Suppose [latex]y=f(x)[/latex] is a differentiable function. Let [latex]dx[/latex] be an independent variable that can be assigned any nonzero real number, and define the dependent variable [latex]dy[/latex] by

[latex]dy=f^{\prime}(x) \, dx[/latex].

It is important to notice that [latex]dy[/latex] is a function of both [latex]x[/latex] and [latex]dx[/latex]. The expressions [latex]dy[/latex] and [latex]dx[/latex] are called differentials. We can divide both sides of (Figure) by [latex]dx[/latex], which yields

[latex]\frac{dy}{dx}=f^{\prime}(x)[/latex].

This is the familiar expression we have used to denote a derivative. (Figure) is known as the differential form of (Figure).

Computing differentials

For each of the following functions, find [latex]dy[/latex] and evaluate when [latex]x=3[/latex] and [latex]dx=0.1[/latex].

  1. [latex]y=x^2+2x[/latex]
  2. [latex]y= \cos x[/latex]

For [latex]y=e^{x^2}[/latex], find [latex]dy[/latex].

Hint

[latex]dy=f^{\prime}(x)dx[/latex]

We now connect differentials to linear approximations. Differentials can be used to estimate the change in the value of a function resulting from a small change in input values. Consider a function [latex]f[/latex] that is differentiable at point [latex]a[/latex]. Suppose the input [latex]x[/latex] changes by a small amount. We are interested in how much the output [latex]y[/latex] changes. If [latex]x[/latex] changes from [latex]a[/latex] to [latex]a+dx[/latex], then the change in [latex]x[/latex] is [latex]dx[/latex] (also denoted [latex]\Delta x[/latex]), and the change in [latex]y[/latex] is given by

[latex]\Delta y=f(a+dx)-f(a)[/latex].

Instead of calculating the exact change in [latex]y[/latex], however, it is often easier to approximate the change in [latex]y[/latex] by using a linear approximation. For [latex]x[/latex] near [latex]a[/latex], [latex]f(x)[/latex] can be approximated by the linear approximation

[latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex].

Therefore, if [latex]dx[/latex] is small,

[latex]f(a+dx)\approx L(a+dx)=f(a)+f^{\prime}(a)(a+dx-a)[/latex].

That is,

[latex]f(a+dx)-f(a)\approx L(a+dx)-f(a)=f^{\prime}(a) \, dx.[/latex]

In other words, the actual change in the function [latex]f[/latex] if [latex]x[/latex] increases from [latex]a[/latex] to [latex]a+dx[/latex] is approximately the difference between [latex]L(a+dx)[/latex] and [latex]f(a)[/latex], where [latex]L(x)[/latex] is the linear approximation of [latex]f[/latex] at [latex]a[/latex]. By definition of [latex]L(x)[/latex], this difference is equal to [latex]f^{\prime}(a)dx[/latex]. In summary,

[latex]\Delta y=f(a+dx)-f(a)\approx L(a+dx)-f(a)=f^{\prime}(a) \, dx=dy[/latex].

Therefore, we can use the differential [latex]dy=f^{\prime}(a) \, dx[/latex] to approximate the change in [latex]y[/latex] if [latex]x[/latex] increases from [latex]x=a[/latex] to [latex]x=a+dx[/latex]. We can see this in the following graph.

A function y = f(x) is shown along with its tangent line at (a, f(a)). The tangent line is denoted L(x). The x axis is marked with a and a + dx, with a dashed line showing the distance between a and a + dx as dx. The points (a + dx, f(a + dx)) and (a + dx, L(a + dx)) are marked on the curves for y = f(x) and y = L(x), respectively. The distance between f(a) and L(a + dx) is marked as dy = f’(a) dx, and the distance between f(a) and f(a + dx) is marked as Δy = f(a + dx) – f(a).

Figure 5. The differential [latex]dy=f^{\prime}(a) \, dx[/latex] is used to approximate the actual change in [latex]y[/latex] if [latex]x[/latex] increases from [latex]a[/latex] to [latex]a+dx[/latex].

We now take a look at how to use differentials to approximate the change in the value of the function that results from a small change in the value of the input. Note the calculation with differentials is much simpler than calculating actual values of functions and the result is very close to what we would obtain with the more exact calculation.

Approximating Change with Differentials

Let [latex]y=x^2+2x[/latex]. Compute [latex]\Delta y[/latex] and [latex]dy[/latex] at [latex]x=3[/latex] if [latex]dx=0.1[/latex].

For [latex]y=x^2+2x[/latex], find [latex]\Delta y[/latex] and [latex]dy[/latex] at [latex]x=3[/latex] if [latex]dx=0.2[/latex].

Hint

[latex]dy=f^{\prime}(3) \, dx[/latex], [latex]\Delta y=f(3.2)-f(3)[/latex]

Calculating the Amount of Error

Any type of measurement is prone to a certain amount of error. In many applications, certain quantities are calculated based on measurements. For example, the area of a circle is calculated by measuring the radius of the circle. An error in the measurement of the radius leads to an error in the computed value of the area. Here we examine this type of error and study how differentials can be used to estimate the error.

Consider a function [latex]f[/latex] with an input that is a measured quantity. Suppose the exact value of the measured quantity is [latex]a[/latex], but the measured value is [latex]a+dx[/latex]. We say the measurement error is [latex]dx[/latex] (or [latex]\Delta x[/latex]). As a result, an error occurs in the calculated quantity [latex]f(x)[/latex]. This type of error is known as a propagated error and is given by

[latex]\Delta y=f(a+dx)-f(a)[/latex].

Since all measurements are prone to some degree of error, we do not know the exact value of a measured quantity, so we cannot calculate the propagated error exactly. However, given an estimate of the accuracy of a measurement, we can use differentials to approximate the propagated error [latex]\Delta y[/latex]. Specifically, if [latex]f[/latex] is a differentiable function at [latex]a[/latex], the propagated error is

[latex]\Delta y\approx dy=f^{\prime}(a) \, dx[/latex].

Unfortunately, we do not know the exact value [latex]a[/latex]. However, we can use the measured value [latex]a+dx[/latex], and estimate

[latex]\Delta y\approx dy\approx f^{\prime}(a+dx) \, dx[/latex].

In the next example, we look at how differentials can be used to estimate the error in calculating the volume of a box if we assume the measurement of the side length is made with a certain amount of accuracy.

Volume of a Cube

Suppose the side length of a cube is measured to be 5 cm with an accuracy of 0.1 cm.

  1. Use differentials to estimate the error in the computed volume of the cube.
  2. Compute the volume of the cube if the side length is (i) 4.9 cm and (ii) 5.1 cm to compare the estimated error with the actual potential error.

Estimate the error in the computed volume of a cube if the side length is measured to be 6 cm with an accuracy of 0.2 cm.

Hint

[latex]dV=3x^2 \, dx[/latex]

The measurement error [latex]dx \, (=\Delta x)[/latex] and the propagated error [latex]\Delta y[/latex] are absolute errors. We are typically interested in the size of an error relative to the size of the quantity being measured or calculated. Given an absolute error [latex]\Delta q[/latex] for a particular quantity, we define the relative error as [latex]\frac{\Delta q}{q}[/latex], where [latex]q[/latex] is the actual value of the quantity. The percentage error is the relative error expressed as a percentage. For example, if we measure the height of a ladder to be 63 in. when the actual height is 62 in., the absolute error is 1 in. but the relative error is [latex]\frac{1}{62}=0.016[/latex], or [latex]1.6 \%[/latex]. By comparison, if we measure the width of a piece of cardboard to be 8.25 in. when the actual width is 8 in., our absolute error is [latex]\frac{1}{4}[/latex] in., whereas the relative error is [latex]\frac{0.25}{8}=\frac{1}{32}[/latex], or [latex]3.1\%[/latex]. Therefore, the percentage error in the measurement of the cardboard is larger, even though 0.25 in. is less than 1 in.

Relative and Percentage Error

An astronaut using a camera measures the radius of Earth as 4000 mi with an error of [latex]\pm 80[/latex] mi. Let’s use differentials to estimate the relative and percentage error of using this radius measurement to calculate the volume of Earth, assuming the planet is a perfect sphere.

Determine the percentage error if the radius of Earth is measured to be 3950 mi with an error of [latex]\pm 100[/latex] mi.

Hint

Use the fact that [latex]dV=4\pi r^2 \, dr[/latex] to find [latex]dV/V[/latex].

Key Concepts

  • A differentiable function [latex]y=f(x)[/latex] can be approximated at [latex]a[/latex] by the linear function
    [latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex].
  • For a function [latex]y=f(x)[/latex], if [latex]x[/latex] changes from [latex]a[/latex] to [latex]a+dx[/latex], then
    [latex]dy=f^{\prime}(x) \, dx[/latex]

    is an approximation for the change in [latex]y[/latex]. The actual change in [latex]y[/latex] is

    [latex]\Delta y=f(a+dx)-f(a)[/latex].
  • A measurement error [latex]dx[/latex] can lead to an error in a calculated quantity [latex]f(x)[/latex]. The error in the calculated quantity is known as the propagated error. The propagated error can be estimated by
    [latex]dy\approx f^{\prime}(x) \, dx[/latex].
  • To estimate the relative error of a particular quantity [latex]q[/latex], we estimate [latex]\frac{\Delta q}{q}[/latex].

Key Equations

  • Linear approximation
    [latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex]
  • A differential
    [latex]dy=f^{\prime}(x) \, dx[/latex].

1. What is the linear approximation for any generic linear function [latex]y=mx+b[/latex]?

2. Determine the necessary conditions such that the linear approximation function is constant. Use a graph to prove your result.

3. Explain why the linear approximation becomes less accurate as you increase the distance between [latex]x[/latex] and [latex]a[/latex]. Use a graph to prove your argument.

4. When is the linear approximation exact?

For the following exercises, find the linear approximation [latex]L(x)[/latex] to [latex]y=f(x)[/latex] near [latex]x=a[/latex] for the function.

5. [T][latex]f(x)=x+x^4, \, a=0[/latex]

6. [T][latex]f(x)=\frac{1}{x}, \, a=2[/latex]

7. [T][latex]f(x)= \tan x, \, a=\frac{\pi }{4}[/latex]

8. [T][latex]f(x)= \sin x, \, a=\frac{\pi }{2}[/latex]

9. [T][latex]f(x)=x \sin x, \, a=2\pi[/latex]

10. [T][latex]f(x)= \sin^2 x, \, a=0[/latex]

For the following exercises, compute the values given within 0.01 by deciding on the appropriate [latex]f(x)[/latex] and [latex]a[/latex], and evaluating [latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex]. Check your answer using a calculator.

11. [T] [latex](2.001)^6[/latex]

12. [T] [latex]\sin (0.02)[/latex]

13. [T] [latex]\cos (0.03)[/latex]

14. [T] [latex](15.99)^{1/4}[/latex]

15. [T] [latex]\frac{1}{0.98}[/latex]

16. [T] [latex]\sin (3.14)[/latex]

For the following exercises, determine the appropriate [latex]f(x)[/latex] and [latex]a[/latex], and evaluate [latex]L(x)=f(a)+f^{\prime}(a)(x-a).[/latex] Calculate the numerical error in the linear approximations that follow.

17. [latex](1.01)^3[/latex]

18. [latex]\cos (0.01)[/latex]

19. [latex](\sin (0.01))^2[/latex]

20. [latex](1.01)^{-3}[/latex]

21. [latex](1+\frac{1}{10})^{10}[/latex]

22. [latex]\sqrt{8.99}[/latex]

For the following exercises, find the differential of the function.

23. [latex]y=3x^4+x^2-2x+1[/latex]

24. [latex]y=x \cos x[/latex]

25. [latex]y=\sqrt{1+x}[/latex]

26. [latex]y=\frac{x^2+2}{x-1}[/latex]

For the following exercises, find the differential and evaluate for the given [latex]x[/latex] and [latex]dx[/latex].

27. [latex]y=3x^2-x+6[/latex], [latex]x=2[/latex], [latex]dx=0.1[/latex]

28. [latex]y=\frac{1}{x+1}[/latex], [latex]x=1[/latex], [latex]dx=0.25[/latex]

29. [latex]y= \tan x[/latex], [latex]x=0[/latex], [latex]dx=\frac{\pi }{10}[/latex]

30. [latex]y=\frac{3x^2+2}{\sqrt{x+1}}[/latex], [latex]x=0[/latex], [latex]dx=0.1[/latex]

31. [latex]y=\frac{\sin (2x)}{x}[/latex], [latex]x=\pi[/latex], [latex]dx=0.25[/latex]

32. [latex]y=x^3+2x+\frac{1}{x}[/latex], [latex]x=1[/latex], [latex]dx=0.05[/latex]

For the following exercises, find the change in volume [latex]dV[/latex] or in surface area [latex]dA[/latex].

33. [latex]dV[/latex] if the sides of a cube change from 10 to 10.1.

34. [latex]dA[/latex] if the sides of a cube change from [latex]x[/latex] to [latex]x+dx[/latex].

35. [latex]dA[/latex] if the radius of a sphere changes from [latex]r[/latex] by [latex]dr[/latex].

36. [latex]dV[/latex] if the radius of a sphere changes from [latex]r[/latex] by [latex]dr[/latex].

37. [latex]dV[/latex] if a circular cylinder with [latex]r=2[/latex] changes height from 3 cm to [latex]3.05[/latex] cm.

38. [latex]dV[/latex] if a circular cylinder of height 3 changes from [latex]r=2[/latex] to [latex]r=1.9[/latex] cm.

For the following exercises, use differentials to estimate the maximum and relative error when computing the surface area or volume.

39. A spherical golf ball is measured to have a radius of [latex]5[/latex] mm, with a possible measurement error of [latex]0.1[/latex] mm. What is the possible change in volume?

40. A pool has a rectangular base of 10 ft by 20 ft and a depth of 6 ft. What is the change in volume if you only fill it up to 5.5 ft?

41. An ice cream cone has height 4 in. and radius 1 in. If the cone is 0.1 in. thick, what is the difference between the volume of the cone, including the shell, and the volume of the ice cream you can fit inside the shell?

For the following exercises, confirm the approximations by using the linear approximation at [latex]x=0[/latex].

42. [latex]\sqrt{1-x}\approx 1-\frac{1}{2}x[/latex]

43. [latex]\frac{1}{\sqrt{1-x^2}}\approx 1[/latex]

44. [latex]\sqrt{c^2+x^2}\approx c[/latex]

Glossary

differential
the differential [latex]dx[/latex] is an independent variable that can be assigned any nonzero real number; the differential [latex]dy[/latex] is defined to be [latex]dy=f^{\prime}(x) \, dx[/latex]
differential form
given a differentiable function [latex]y=f^{\prime}(x)[/latex], the equation [latex]dy=f^{\prime}(x) \, dx[/latex] is the differential form of the derivative of [latex]y[/latex] with respect to [latex]x[/latex]
linear approximation
the linear function [latex]L(x)=f(a)+f^{\prime}(a)(x-a)[/latex] is the linear approximation of [latex]f[/latex] at [latex]x=a[/latex]
percentage error
the relative error expressed as a percentage
propagated error
the error that results in a calculated quantity [latex]f(x)[/latex] resulting from a measurement error [latex]dx[/latex]
relative error
given an absolute error [latex]\Delta q[/latex] for a particular quantity, [latex]\frac{\Delta q}{q}[/latex] is the relative error.
tangent line approximation (linearization)
since the linear approximation of [latex]f[/latex] at [latex]x=a[/latex] is defined using the equation of the tangent line, the linear approximation of [latex]f[/latex] at [latex]x=a[/latex] is also known as the tangent line approximation to [latex]f[/latex] at [latex]x=a[/latex]