3.3: Local Linearity
- Page ID
- 83926
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)The last two sections examined rate of change in both the discrete and continuous case. The first application for rate of change at a point is to make projections for values of the function close to that point. We want to find the equation of a linear function that can be used to approximate our function. This is straightforward using the point-slope version of a linear equation.
For the discrete case, given a function \(y=f(x)\text{,}\) where we know value of, \(mf(a+1)\text{,}\) the marginal change in \(f(x)\) to get to \(x=a+1\text{,}\) then our discrete linear approximation has the form:
\[ \text{discrete linear}\, f_a (x)=f(a)+mf(a+1)*(x-a)\text{.} \nonumber \]


In the differentiable case, given a function \(y=f(x)\text{,}\) where we know value of, \(f'(a)\text{,}\) the derivative of \(f(x)\) at \(x=a\text{,}\) then our linear approximation has the form:
\[ \linear f_a (x)=f(a)+f'(a)*(x-a)\text{.} \nonumber \]


The two formulas are almost the same. The discrete case uses the slope of a secant line obtained by looking at points where the x values differ by 1. In the differentiable case we look at the slope of the tangent line. One of the reasons for looking at the linear approximation of a function is that linear functions are easy to evaluate.
The profit from selling 10,000 gizmos is $487,253. We also know that marginal profit(10001)=$45. Estimate the profit from selling 10,013 gizmos.
Solution
We use the formula from above:
\[ \text{discrete linear profit}_a (x)=\profit(a)+\Mprofit(a+1)*(x-a)\text{.} \nonumber \]
Filling in the values from the problem yields:
\begin{align*} \text{discrete linear profit}_{10000} (x)\amp =487253+45*(x-10000)\\ \text{discrete linear profit}_{10000} (10013)\amp =487253+45*(13)=487838\text{.} \end{align*}
Thus we estimate the profit from selling 10013 gizmos to be $487,838.
Figure \(3.3.3.\) Video presentation of this example
Use information about \(f(x)=\sqrt{x}\) near \(x_0=100\) to estimate the square roots of 96 through 104. Check the accuracy of your approximations.
Solution
We first use Excel to find the value of the function and its derivative at 100. For the derivative we use the calculator approximation.




Thus the linear approximation is
\begin{align*} \linear f(x) \amp = f(100)+f'(100)(x-100)\\ \amp =10+(0.05)(x-100)\text{.} \end{align*}
We can set up the worksheet to compute the approximation and to give us the error, both as a number and as a percentage of the correct answer.




It is then straightforward to compute values and check accuracy. On the given domain, the linear approximation has an error under 0.03%.
Figure \(3.3.5.\) Video presentation of this example
Use information about \(f(x)=100/x\) near \(x_0=400\) to estimate the reciprocals of the integers from of 396 through 404. Check the accuracy of your approximations.
Solution
Once again, we use Excel to find the value of the function and its derivative at 400. For the derivative we use the calculator approximation.


Thus the linear approximation is
\begin{align*} \linear f(x) \amp = f(400)+f'(400)(x-400)\\ \amp =.25+(-0.000625)(x-400)\text{.} \end{align*}


It is then straightforward to compute values and check accuracy. On the given domain, the linear approximation has an error under 0.01%.
Figure \(3.3.7.\) Video presentation of this example
For approximating interest with continual compounding it is useful to have a linear approximation of \(f(r)=exp(r)\) when \(r\) is close to 0. Use information about \(f(r)=exp(r)\) near \(r_0=0\) to estimate the exponential function for numbers near 0. Check the accuracy of your approximations and give a domain where the approximation is good enough to use.
Solution
Once again, we use Excel to find the value of the function and its derivative at 0. For the derivative we use the calculator approximation.


Thus the linear approximation is
\begin{align*} \linear f(x) \amp = f(0)+f'(0)(r-0)\\ \amp = 1+(1)(r)\text{.} \end{align*}
This is much easier to compute than the exponential function. However when we check accuracy we find that it is not very accurate for other integer values.


That brings us back to the last part of the question, which asks for a domain where the approximation is good enough to use. The phrase “good enough to use” will depend on the setting, but we will be happy with an estimate that is within 1%. Since we are going to use this for interest rates, we are interested in positive rates.
We modify the worksheet to allow a step size, \(\Delta x\text{,}\) to be used. Then we experiment with step sized till we get a domain where the error is under 1%.


We see that \(\exp(r)\approx 1+r\) for \(0\le r\lt 0.15\text{.}\) This gives us an approximation we can use for rates of up to 15%.
The last example illustrates that linear approximations should only be used for a limited domain. The size of the domain where the linear approximation is “good enough” will depend on the definition of “good enough” or the acceptable error in our approximation. The good domain will also depend on how far the graph is from linear, or how fast it is bending.
class="Exercises: Local Linearity
- For Exercise \(3.3.1–3.3.5\), for the given function and value for \(x_0\text{:}\)
- Give the formula for the discrete linear approximation.
- Evaluate the approximation at \(x_1\text{.}\)
\(x_0=10\text{,}\) \(f(10)=50\text{,}\) \(mf(11)=6\text{,}\) and \(x_1=15\text{.}\)
- Answer
-
\begin{align*} f(x) \amp \approx f(10)+mf(11)*(x-10)\\ f(x) \amp \approx 50+6*(x-10)\text{.} \end{align*}
Next we evaluate the linear approximation at 15:
\[ f(15)\approx 50+6*(15-10)=50+30=80\text{.} \nonumber \]
\(x_0=15\text{,}\) \(\profit(15)=50\text{,}\) \(\Mprofit(16)=2\text{,}\) and \(x_1=6\text{.}\)
\(x_0=20\text{,}\) \(f(19)=191\text{,}\) \(f(20)=200\text{,}\) \(f(21)=210\text{,}\) and \(x_1=28\text{.}\)
- Answer
-
\[ f(x)\approx f(20)+mf(21)*(x-20)\text{.} \nonumber \]
Note that we have to compute \(mf(21)\text{.}\)
\begin{align*} mf(21)\amp =f(21)-f(20)= 210-200=10\\ f(x) \amp \approx 200+10*(x-20)\text{.} \end{align*}
Next we evaluate the linear approximation at 28:
\[ f(28)\approx 200+10*(28-20)=200+80=280\text{.} \nonumber \]
\(x_0=50\text{,}\) \(\revenue(49)=1007\text{,}\) \(\revenue(50)=1000\text{,}\) \(\revenue(51)=994\text{,}\) and \(x_1=45\text{.}\)
\(x_0=100\text{,}\) \(cost(99)=3740\text{,}\) \(cost(100)=3743\text{,}\) \(cost(101)=3754\text{,}\) and \(x_1=112\text{.}\)
- Answer
-
\[ \cost(x)\approx \cost(100)+\Mcost(101)*(x-100)\text{.} \nonumber \]
Note that we have to compute \(\Mcost(101)\)
\begin{gather*} \Mcost(101)=\cost(101)-\cost(100)=3754-3743=11\\ cost(x)\approx3743+11*(x-100)\text{.} \end{gather*}
Next we evaluate the linear approximation at 112:
\[ \cost(112)\approx 3743+11*(112-100)=3743+132=3875\text{.} \nonumber \]
- For Exercise \(3.3.6–3.3.10\), for the given function and value for \(x_0\text{:}\)
- Calculate the numeric approximation of the derivative at \(x_0\text{.}\)
- Give the formula for the linear approximation at that point.
- Evaluate the approximation at \(x_1\text{.}\)
- Evaluate the function at \(x_1\) and compute the accuracy of the approximation.
\(f(x)=\ln(x)\text{,}\) \(x_0=100\text{,}\) and \(x_1=105\text{.}\)
\(g(x)=\sqrt{x}\text{,}\) \(x_0=81\) and \(x_1=85\text{.}\)
- Answer
-
- \[ g(x)\approx g(81)+g'(81)*(x-81)\text{.} \nonumber \]
\[ g'(81)\approx \frac{g(81+.001)-g(81-.001)}{0.002}= \frac{\sqrt{81.001}-\sqrt{80.999}}{0.002}=.056\text{.} \nonumber \]