maths.free › Calculus › 8. Taylor Polynomials and Taylor Series › Extending local linearization
Extending local linearization
Early in our study of calculus in Section, we learned that if a function f has a derivative at a fixed value x=a, when we zoom in on its graph near (a,f(a)), the function looks linear.
Introduction
Early in our study of calculus in Section, we learned that if a function \(f\) has a derivative at a fixed value \(x=a\), when we zoom in on its graph near \((a,f(a))\), the function looks linear. Indeed, such a function is differentiable, and we know that near a fixed input value \(a\), \[\begin{aligned}\end{aligned}\] where \(L\) is the tangent line approximation to \(f\) at \(a\).
In this section, we use the function \(f(x) = e^x\) as a case study to investigate how we can use other basic functions to better approximate the value of \(f(x)\) near \(a = 0\).
Exploration
Exploration
Finding a quadratic approximation
In Preview Activity, we found that the error in the tangent line approximation of \(f(x) = e^x\) at \(a = 0\) grows significantly as we consider \(x\)-values further and further from \(0\). This is due to the fact that the tangent line is straight while the function \(f(x) = e^x\) has some curvature. To hopefully improve the approximation, we are going to try to find a quadratic function whose curvature matches that of \(f(x) = e^x\) at the point of tangency.
While we have usually used the notation \(L(x)\) for the tangent line, in what follows we will instead write \(T_1(x)\), and think of this as the degree \(1\) approximation. In a similar way, we will write \(T_2(x)\) for the quadratic (degree \(2\)) approximation.
Recall that for any function \(f\) that has a derivative at \(a=0\), its tangent line approximation at \(a=0\) is \[\begin{aligned}\end{aligned}\]. Moreover, the functions \(T_1\) and \(f\) have two exact values in common. First, their function values agree at the point of tangency: \(T_1(0) = f(0)\). And second, since \(T_1(x)\) is a linear function whose slope is \(f'(0)\), it is also true that their derivative values agree at the point of tangency: \(T_1'(0) = f'(0)\).
To generate a quadratic function that approximates \(f\) near \(a = 0\), we choose to have this quadratic function not only share the same function value and derivative value as \(f\) at \(a=0\), but also the same second derivative valueHere we are implicitly assuming that the function \(f(x)\) has a second derivative at \(a=0\), which is a property that holds for \(f(x) = e^x\). at \(a=0\) in order to match the concavity or curvature of \(f\). In other words, we are adding a term to the linear approximation that gives the same amount of curvature as the function \(f\).
We can state these requirements more formally as follows.
To extend the linear approximation of \(f(x) = e^x\) to a quadratic approximation, we seek a function \(T_2(x)\) of the form \[\begin{aligned}\end{aligned}\] that satisfies
\(T_2(0) = f(0)\), so \(T_2\) and \(f\) share the same height at \(a = 0\);
\(T_2'(0) = f'(0)\), so \(T_2\) and \(f\) share the same slope at \(a = 0\);
\(T_2''(0) = f''(0)\), so \(T_2\) and \(f\) share the same concavity at \(a = 0\).
In Activity, we explore how these three requirements determine \(b_0\), \(b_1\), and \(b_2\) in \(T_2(x)\) for the function \(f(x) = e^x\).
Over and over again
A remarkable feature of mathematics is that when a process effectively generates an approximation, doing that same process again (perhaps with some slight modifications) often improves the approximation. In Activity, we found a quadratic approximation of \(f(x)=e^x\) near the point \((0,f(0))\) that results in an improvement over the linear approximation of \(f\). It is reasonable to hope that a degree 3 polynomial approximation of \(f(x) = e^x\) will be even better.
To investigate, we seek a degree \(3\) polynomial \(T_3(x)\) of the form \[\begin{aligned}\end{aligned}\] that satisfies
the same conditions we imposed on \(T_2(x)\): \[\begin{aligned}\end{aligned}\] so that \(T_3\) and \(f\) share the same function value, first derivative value, and second derivative value at \(a = 0\),
plus the additional condition that \[\begin{aligned}\end{aligned}\], so \(T_3\) and \(f\) share the same third derivative valueHere we are assuming that the original function \(f\) has a third derivative at \(a = 0\), which is valid since \(f'''(x) = e^x\). at \(a = 0\).
Like in our work with \(T_2\), we observe that since \(T_3\) is a polynomial, its derivatives are straightforward to compute. For instance, \[\begin{aligned}\end{aligned}\] We continue our investigation of this new approximation of \(f(x) = e^x\) in Activity, where we work to determine the values of \(c_0\), \(c_1\), \(c_2\), and \(c_3\) plus explore how well \(T_3(x)\) approximates \(f(x)\) near \(a = 0\).
As the degree of the approximation increases
Our work so far with the case study function \(f(x) = e^x\) suggests that as we find degree \(n\) polynomial approximations, \(T_n\), that satisfy \[\begin{aligned}\end{aligned}\], increasing the value of \(n\) improves the accuracy of the approximation.
In the next activity, we introduce the idea of the error of a polynomial approximation and investigate explicitly how the error varies for approximations of \(f(x) = e^x\) as we vary \(n\) and vary \(x\).
One important application of our work so far is that these polynomial approximations provide a way to approximate values of the function \(f(x) = e^x\). For example, since we've shown that \[\begin{aligned}\end{aligned}\], it follows that \[\begin{aligned}\end{aligned}\]. In fact, this approach through polynomial approximation is one way that computers determine the value of \(e^{\frac{1}{2}}\), which is approximately \(1.64872127\), to whatever accuracy is needed: by using even better polynomial approximations than the degree-\(4\) one that we found, computers are able to generate the approximate value \(1.64872127\) simply by the basic computations of addition and multiplication with enough terms.
Throughout this section, we have focused on \(f(x) = e^x\). One of the characteristics that makes \(f(x) = e^x\) special is the fact that its derivative is itself; indeed, the \(n^{\text{th}}\) derivative of \(f\) is \(f^{(n)}(x) = e^x\) for every natural number \(n\), which in turn implies that \(f^{(n)}(0) = 1\) for every value of \(n\). This will ultimately help to find patterns in the coefficients of the degree \(n\) polynomial approximation, \(T_n(x)\), and be able to easily write down a formula for any value of \(n\).
It is natural to think that we can find similar approximations of other functions, especially ones such as \(\sin(x)\) and \(\cos(x)\) that also exhibit repeating patterns in their derivatives. In Section, we will develop a general approach to finding the coefficient of \(x^n\) in the degree \(n\) approximation of any function with \(n\) derivatives and learn how to find a general expression for the degree \(n\) approximation.
Summary
For the function \(f(x) = e^x\), which bends considerably as we move away from \(a = 0\) (especially for \(x \gt 0\)), the tangent line, \(T_1(x)\), is not a very good approximation for \(x\)-values that satisfy \(|x| \gt 0.5\). For example, \(|e^{0.5} - T_1(0.5)| \approx 0.148721\), so the linear approximation has an absolute error of more than \(0.1\) at \(x = 0.5\).
Using the strategy of finding a higher degree polynomial whose function and derivative values match at the selected point of tangency, we are able to find higher degree polynomials that much more effectively approximate \(f(x) = e^x\) near \(a = 0\) than the approximation generated by the tangent line. For example, using the degree \(3\) approximation \(T_3(x) = 1 + x + \frac{1}{2}x^2 + \frac{1}{6}x^3\), we see that \(|f(x) - T_3(x)| \lt 0.01\) for all \(x\) that satisfy \(|x| \lt 0.6\).
It appears that the degree of the polynomial impacts the accuracy of the approximation of \(f(x) = e^x\) in at least two ways: if we fix an \(x\)-value, the higher the degree of the polynomial, the more accurate the approximation. In addition, raising the degree of the polynomial approximation appears to widen the interval on which the approximation is effective.
Symbols used here
Ratios of sides in a right triangle; coordinates on the unit circle.
2.71828…, the base whose exponential is its own derivative.
Equal to the precision shown, not exactly.
Ratio of a circle's circumference to its diameter, 3.14159…
Not a number: "grows without bound" in limits and intervals.
The exponent b must be raised to for x; ln uses base e.
Add a_k for k = 1 up to n.
The value f(x) approaches as x approaches a.
Instantaneous rate of change; slope of the graph.
Antiderivative (indefinite) or signed area from a to b (definite).
Prime notation for derivatives with respect to x (or t).
Constants of integration fixed by initial conditions.
How to: Extending local linearization
- How well does the tangent line at a = 0 approximate the function f(x) = e^x near a = 0?
- Can we find higher degree polynomials that approximate f(x) = e^x near a = 0 more effectively than the approximation generated by the tangent line?
- How does the degree of the polynomial impact the accuracy of the approximation of f(x) = e^x?
Questions people ask
What is a derivative in one sentence?
The slope of the graph at a point — the rate at which the output is changing there. Speed is the derivative of position.
What is an integral in one sentence?
The accumulated total of a rate — the area under the curve. Distance travelled is the integral of speed.
Why are derivatives and integrals opposites?
That is the fundamental theorem of calculus: accumulating a rate and then measuring how fast the accumulation grows gets you back the rate. Integration undoes differentiation up to a constant.
When do I use substitution and when integration by parts?
Substitution when part of the integrand is the derivative of another part (u and du both present). Parts when the integrand is a product of two unrelated kinds of function — a polynomial times an exponential, log or trig function.
নিজের চেষ্টা করো
Parts of this page are adapted from Boelkins, Active Calculus (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.
আরও Calculus
LimitsDerivativesIntegralsDefinite integralsTaylor seriesSeries and sumsMaxima and minimaThe chain ruleImplicit differentiationRelated rates and optimisationIntegration techniques: substitution, parts, partial fractionsApplications of integration: area, volume, arc lengthInfinite series and convergence tests