Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

2.10: Linear Approximations and Differentials

( \newcommand{\kernel}{\mathrm{null}\,}\)

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 and percentage error when using a differential approximation.

CRC-Logo-Vertical-RGB.png
Hawk A.I. Section-Specific Tutor
Please note that, to access the Hawk A.I. Tutor, you will need a (free) OpenAI account.

We have just seen how derivatives allow us to compare related quantities that change over time. In this section, we examine another application of derivatives: the ability to approximate functions locally by linear functions. Linear functions are the most straightforward functions to work with, so they provide a valuable tool for approximating function values. In addition, the ideas presented in this section are generalized later in the text when we study how to approximate functions by higher-degree polynomials using Taylor Polynomial Expansions.

Linear Approximation of a Function at a Point

Consider a function f that is differentiable at a point x=a. The tangent line to f at the point (a,f(a)) isyf(a)=f(a)(xa)y=f(a)+f(a)(xa).

For example, consider the function f(x)=1x at a=2. Since f is differentiable at x=2 and f(x)=1x2, we see that f(2)=14. Therefore, the tangent line to the graph of f at a=2 is given by the equationy=1214(x2).
Figure 2.10.1a shows a graph of f(x)=1x along with the tangent line to f at x=2. Note that for x near 2, the graph of the tangent line is close to the graph of f. As a result, we can use the equation of the tangent line to approximate f(x) for x near 2. For example, if x=2.1, the y value of the corresponding point on the tangent line isy=1214(2.12)=0.475.
The actual value of f(2.1) is given byf(2.1)=12.10.47619.
Therefore, the tangent line gives us a fairly good approximation of f(2.1) (Figure 2.10.1b). However, note that for values of x far from 2, the equation of the tangent line does not give us a good approximation. For example, if x=10, the y-value of the corresponding point on the tangent line isy=1214(102)=122=1.5,
whereas the value of the function at x=10 is f(10)=0.1.

This figure has two parts a and b. Figure a shows the line f(x) = 1/x 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 2.10.1a: The tangent line to f(x)=1/x at x=2 provides a good approximation to f for x near 2.
Figure 2.10.1b: At x=2.1, the value of y on the tangent line to f(x)=1/x is 0.475. The actual value of f(2.1) is 1/2.1, which is approximately 0.47619.

In general, for a differentiable function f, the equation of the tangent line to f at x=a can be used to approximate f(x) for x near a. Therefore, we can writef(x)f(a)+f(a)(xa) for x near a.

We call the linear functionL(x)=f(a)+f(a)(xa)
the linear approximation, or tangent line approximation, of f at x=a. This function L is also known as the linearization of f at x=a.

To show how beneficial the linear approximation can be, we look at how to find the linear approximation for f(x)=x at x=9.

Example 2.10.1: Linear Approximation of x

Find the linear approximation of f(x)=x at x=9 and use the approximation to estimate 9.1.

Solution

Since we are looking for the linear approximation at x=9, using Equation ??? we know the linear approximation is given byL(x)=f(9)+f(9)(x9).We need to find f(9) and f(9).f(x)=xf(9)=9=3andf(x)=12xf(9)=129=16.Therefore, the linear approximation is given by Figure 2.10.2.L(x)=3+16(x9)Using the linear approximation, we can estimate 9.1 by writing9.1=f(9.1)L(9.1)=3+16(9.19)3.0167.

The function f(x) = the square root of x is shown with its tangent at (9, 3). The tangent appears to be an excellent approximation from x = 6 to x = 12.
Figure 2.10.2: The local linear approximation to f(x)=x at x=9 provides an approximation to f for x near 9.

Analysis

Using a calculator, the value of 9.1 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 x, at least for x near 9. At the same time, it may seem odd to use a linear approximation when we can push a few buttons on a calculator to evaluate 9.1. However, how does the calculator evaluate 9.1? The calculator uses an approximation! Calculators and computers always use approximations to evaluate mathematical expressions; they just use higher-degree approximations.

Checkpoint 2.10.1

Find the local linear approximation to f(x)=3x at x=8. Use it to approximate 38.1 to five decimal places.

Answer

L(x)=2+112(x8); 2.00833

Example 2.10.2: Linear Approximation of sinx

Find the linear approximation of f(x)=sin(x) at x=π3 and use it to approximate sin(62).

Solution

First, we recall that degree measure and calculus do not work well together. Therefore, we trade out 60 for π3 radians. The linear approximation is given byL(x)=f(π3)+f(π3)(xπ3).We see thatf(x)=sin(x)f(π3)=sin(π3)=32f(x)=cos(x)f(π3)=cos(π3)=12Therefore, the linear approximation of f at x=π/3 is given by Figure 2.10.3.L(x)=32+12(xπ3)To estimate sin(62) using L, we must first convert 62 to radians. We have 62=62π180 radians, so the estimate for sin(62) is given bysin(62)=f(62π180)L(62π180)=32+12(62π180π3)=32+12(2π180)=32+π1800.88348.

The function f(x) = sin x is shown with its tangent at (π/3, square root of 3 / 2). The tangent appears to be a very good approximation for x near π / 3.
Figure 2.10.3: The linear approximation to f(x)=sinx at x=π/3 provides an approximation to sinx for x near π/3.

Checkpoint 2.10.2

Find the linear approximation for f(x)=cosx at x=π2.

Answer

L(x)=x+π2

Linear approximations may be used in estimating roots and powers. In the next example, we find the linear approximation for f(x)=(1+x)n at x=0, 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 f(x)=(m+x)n to estimate roots and powers near a different number m.

Example 2.10.3: Approximating Roots and Powers

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

Solution

The linear approximation at x=0 is given byL(x)=f(0)+f(0)(x0).Becausef(x)=(1+x)nf(0)=1f(x)=n(1+x)n1f(0)=n,the linear approximation is given by Figure 2.10.4a.L(x)=1+n(x0)=1+nxWe can approximate (1.01)3 by evaluating L(0.01) when n=3. We conclude that(1.01)3=f(1.01)L(1.01)=1+3(0.01)=1.03.

This figure has two parts a and b. In figure a, the line f(x) = (1 + x)3 is shown with its tangent line at (0, 1). In figure b, the area near the tangent point is blown up to show how good of an approximation the tangent is near (0, 1).
Figure 2.10.4a: The linear approximation of f(x) at x=0 is L(x).
Figure 2.10.4b: The actual value of 1.013 is 1.030301. The linear approximation of f(x) at x=0 estimates 1.013 to be 1.03.

Common Mistake

In Example 2.10.3, we linearized the function f(x)=(1+x)3 at x=0 to approximate (1.01)3. In this case, (1.01)3=f(0.01)L(0.01). It's common for students to make the mistake of thinking, to approximate (1.01)3, we need to evaluate f (and, therefore, L) at 1.01; however, f(x)=(1+x)3 already has the 1 (also known as the whole part) built-in. Therefore, we need to evaluate f (and, therefore, L) at the decimal part.

Checkpoint 2.10.3

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

Answer

L(x)=1+4x

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 due to 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 due to a small change in input values.

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

The expressions dy and dx are called differentials. It is important to notice that dy is a function of both x and dx.

Example 2.10.4: Computing Differentials

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

  1. y=x2+2x
  2. y=cosx
Solutions

The key step is calculating the derivative. We can obtain dy directly when we have that.

  1. Since f(x)=x2+2x, we know f(x)=2x+2, and thereforedy=(2x+2)dx.When x=3 and dx=0.1,dy=(23+2)(0.1)=0.8.
  2. Since f(x)=cosx,f(x)=sin(x). This gives usdy=sinxdx.When x=3 and dx=0.1,dy=sin(3)(0.1)=0.1sin(3).
Checkpoint 2.10.4

For y=ex2, find dy.

Answer

dy=2xex2dx

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 f that is differentiable at point a. Suppose the input x changes by a small amount. We are interested in how much the output y changes. If x changes from a to a+dx, then the change in x is dx (also denoted Δx), and the change in y is given byΔy=f(a+dx)f(a).

Instead of calculating the exact change in y, however, it is often easier to approximate the change in y by using a linear approximation. For x near a,f(x) can be approximated by the linear approximation (Equation ???)L(x)=f(a)+f(a)(xa).
Therefore, if dx is small,f(a+dx)L(a+dx)=f(a)+f(a)(a+dxa).
That is,f(a+dx)f(a)L(a+dx)f(a)=f(a)dx.
In other words, the actual change in the function f if x increases from a to a+dx is approximately the difference between L(a+dx) and f(a), where L(x) is the linear approximation of f at a. By definition of L(x), this difference is equal to f(a)dx. In summary,Δy=f(a+dx)f(a)L(a+dx)f(a)=f(a)dx=dy.
Therefore, we can use the differential dy=f(a)dx to approximate the change in y if x increases from x=a to x=a+dx. 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 2.10.5: The differential dy=f(a)dx is used to approximate the actual change in y if x increases from a to a+dx.

We now 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 that 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 a more exact calculation.

Example 2.10.5: Approximating Change with Differentials

Let y=x2+2x. Compute Δy and dy at x=3 if dx=0.1.

Solution

The actual change in y if x changes from x=3 to x=3.1 is given byΔy=f(3.1)f(3)=[(3.1)2+2(3.1)][32+2(3)]=0.81.The approximate change in y is given by dy=f(3)dx. Since f(x)=2x+2, we havedy=f(3)dx=(2(3)+2)(0.1)=0.8.

Checkpoint 2.10.5

For y=x2+2x, find Δy and dy at x=3 if dx=0.2.

Answer

dy=1.6,Δy=1.64

A Technical Aside: The Happy Accident of Leibniz's Notation

Leibniz notation is handy throughout Calculus; however, it can be confusing for students when it comes to differentials. Visually, it looks like we can divide both sides of Equation ??? by dx to arrive atdydx=f(x),

however, this equivalence is a happy accident.

Technically speaking, ddx is an operator. That is, it is a set of instructions that accepts a function and returns the derivative of that function. For example, ddx(y)=dydx is the operator that returns the derivative of the function y with respect to x; however, to say that you can "pull apart" the operator and multiply both sides by dx to get dy=f(x)dx is an abuse of logic. Notationally, it works, but to be clear, it is not true that we are multiplying both sides by dx.dydx is defined to be f(x).

Whereas,dy is defined to be f(x)dx.
As a simple clarification, you have dealt with operators your entire life. For example, + is an operator that accepts two numbers and returns the sum of those two numbers. Therefore, 3+2=5 is true because the operator, +, returns the sum of 3 and 2 (which is 5). I hope you would agree that "pulling apart" the operator and dividing by a "piece" of the operator to get3|2=53|2=5
leads to a breakdown in logic (and notation).

All of this is to say that, technically, you should not tell someone, "I see you have dy=f(x)dx. Just divide both sides by dx to get the derivative dydx=f(x)." That statement is (again, very technically) an abuse of logic. Moreover, saying to your friend, "Oh, you have dydx=f(x)? Great! Just multiply both sides by dx to get dy=f(x)dx," is a similar abuse in logic.

It's okay to silently view the notation this way, but you should realize this result is just a happy accident of Leibniz's notation.

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 f with an input that is a measured quantity. Suppose the exact value of the measured quantity is a, but the measured value is a+dx. We say the measurement error is dx (or Δx). As a result, an error occurs in the calculated quantity f(x). This type of error is known as a propagated error and is given byΔy=f(a+dx)f(a).

Since all measurements are prone to some 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 Δy. Specifically, if f is a differentiable function at a, the propagated error isΔydy=f(a)dx.
Unfortunately, we do not know the exact value a. However, we can use the measured value a+dx, and estimateΔydyf(a+dx)dx.
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.

Example 2.10.6: Volume of a Cube

Suppose the side length of a cube is measured to be 5 cm, but we think this could be off by at most 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.
Solutions
  1. The measurement of the side length is accurate to within ±0.1 cm. Therefore,0.1dx0.1.The volume of a cube is given by V=x3, which leads todV=3x2dx.Using the measured side length of 5 cm, we can estimate that3(5)2(0.1)dV3(5)2(0.1).Therefore,7.5dV7.5.That is, with our possible measurement error of ±0.1 cm, our estimation of the volume could be off by at most ±7.5 cm3.
  2. If the side length is actually 4.9 cm, then the volume of the cube isV(4.9)=(4.9)3=117.649cm3.If the side length is actually 5.1 cm, then the volume of the cube isV(5.1)=(5.1)3=132.651cm3.Therefore, the actual volume of the cube is between 117.649 and 132.651. Since the side length is measured to be 5 cm, the computed volume is V(5)=53=125. Therefore, the error in the computed volume is117.649125ΔV132.651125.That is,7.351ΔV7.651.We see the estimated error dV is relatively close to the actual potential error in the computed volume.
Checkpoint 2.10.6

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.

Answer

The volume measurement is accurate to within 21.6cm3.

The measurement error dx (=Δx) and the propagated error Δy 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 Δq for a particular quantity, we define the relative error as Δqq, where q 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 162=0.016, or 1.6%. 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 14 in., whereas the relative error is 0.258=132, or 3.1%. Therefore, the percentage error in the measurement of the cardboard is larger, even though 0.25 in. is less than 1 in.

Example 2.10.7: Relative and Percentage Error

An astronaut using a camera measures the radius of Earth as 4000 mi with an error of ±80 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.

Solution

If the measurement of the radius is accurate to within ±80, we have80dr80.Since the volume of a sphere is given by V=(43)πr3, we havedV=4πr2dr.Using the measured radius of 4000 mi, we can estimate4π(4000)2(80)dV4π(4000)2(80).To estimate the relative error, consider dVV. Since we do not know the exact value of the volume V, we use the measured radius r=4000 mi to estimate V. We obtain V(43)π(4000)3. Therefore the relative error satisfies4π(4000)2(80)4π(4000)3/3dVV4π(4000)2(80)4π(4000)3/3,which simplifies to0.06dVV0.06.The relative error is 0.06 and the percentage error is 6%.

Checkpoint 2.10.7

Determine the percentage error if the radius of Earth is measured to be 3950 mi with an error of ±100 mi.

Answer

7.6%


This page titled 2.10: Linear Approximations and Differentials is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Gilbert Strang & Edwin “Jed” Herman via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?