Skip to main content
Logo image

Chapter 21 Polynomial approximations

Section 21.1 Linear approximations

Subsection 21.1.1 Linearization at a point

In Section 11.6, we interpreted a derivative value as describing the slope of the local linearity of a graph near a specific point. In other words, on a small domain \(a \lt t \lt b\) containing some point of interest \(t = t^\ast\text{,}\) the graph of a differentiable function \(f(t)\) is approximately linear with slope \(m = f'(t^\ast)\text{.}\) A linear formula is much easier to use in computations, so if we do not mind introducing a small amount of error we may replace the function \(f(t)\) in our computations with a linear function on domain \(a \lt t \lt b\text{.}\)
Example 21.1.1. Approximate square roots.
What is the approximate value of \(\sqrt{100.03}\text{?}\) Using the known “nearby” value of \(\sqrt{100} = 10\) as a “base point” for our calculations, we will replace the square root function with a linear function \(L(t)\) that also has \(L(100) = 10\text{,}\) and has the same slope as the graph of the square root function at the point \(t = 100\text{:}\)
\begin{equation*} \funceval{\ddt{(\sqrt{t})}}{t = 100} = \funceval{\frac{1}{2\sqrt{t}}}{t = 100} = \frac{1}{20} \text{.} \end{equation*}
So the graph of \(L(t)\) must pass through the point \((100,10)\) and must create a slope of \(1/20\) with every other point \((t,y)\) on its graph:
\begin{gather*} \frac{y - 10}{t - 100} = \frac{1}{20} \\ y - 10 = \frac{t - 100}{20} \\ y = 10 + \frac{t - 100}{20} \text{.} \end{gather*}
Our approximating linear function to the square root function near the point \(t = 100\) is
\begin{equation*} L(t) = 10 + \frac{t - 100}{20} \text{,} \end{equation*}
and we approximate
\begin{equation*} \sqrt{t} \approx L(t) \qquad \text{for} \qquad t \approx 100 \text{.} \end{equation*}
In particular, we wished to approximate
\begin{align*} \sqrt{100.03} \amp \approx L(100.03) \\ \amp = 10 + \frac{100.03 - 100}{20} \\ \amp = 10 + \frac{0.03}{2 \cdot 10} \\ \amp = 10 + \frac{0.015}{10} \\ \amp = 10 + 0.0015 \\ \amp = 10.0015 \text{.} \end{align*}
(Compare with the result for \(\sqrt{100.03}\) returned by your calculator.)
Remark 21.1.2.
It may seem silly to go to all the trouble of Example 21.1.1 instead of entering \(\sqrt{100.03}\) into a calculator, but if you have billions of similar calculations to do, programming a computer to use a linear formula will save a significant amount of time compared to repeatedly using the sqrt function in your computing language’s math libraries.
We can obtain a general formula for the equation of an approximating linear function in the same manner as in Example 21.1.1: we would like a linear function \(L(t)\) that has “inital value” \(L(t^\ast) = f(t^\ast)\) and slope \(m = f'(t^\ast)\) to replace \(f(t)\) near \(t = t^\ast\text{.}\)
Definition 21.1.3. Linearization of a function.
If \(f(t)\) is defined on domain \(a \lt t \lt b\) and differentiable at \(t = t^\ast\) within that domain, then the linearization of \(f(t)\) based at \(t = t^\ast\) is the linear function
\begin{equation*} L(t) = f(t^\ast) + f'(t^\ast) (t - t^\ast) \text{,} \end{equation*}
restricted to the domain \(a \lt t \lt b\text{.}\)
Remark 21.1.4.
  • A linearization of a function is nothing more than a tangent line, but we are introducing new terminology to emphasize its use a linear “version” of \(f(t)\) to be used as a replacement for \(f(t)\) in computations.
  • The only variable in the formula for \(L(t)\) is the independent variable \(t\text{;}\) the three expressions \(t^\ast\text{,}\) \(f(t^\ast)\text{,}\) and \(f'(t^\ast)\) should be specific numbers obtained by choosing an appropriate value of \(t^\ast\) and calculating the other two values from the function \(f(t)\text{.}\)
Example 21.1.5. Linearizing the natural logarithm.
A known value of the natural logarithm is \(\ln 1 = 0\text{,}\) so we can use the linearization at \(t = 1\) to approximate \(\ln t\) for \(t \approx 1\text{.}\) First compute
\begin{equation*} \funceval{\ddt{(\ln t)}}{t = 1} = \funceval{\frac{1}{t}}{t = 1} = 1 \text{.} \end{equation*}
From this and \(\ln 1 = 0\) we have
\begin{equation*} L(t) = 0 + 1 \cdot (t - 1) = t - 1 \text{.} \end{equation*}
If we have many values of \(\ln (1 + \change{t})\) to compute, all of them with \(\change{t} \approx 0\text{,}\) then really there’s no need to perform expensive logarithm computations at all, as we would have
\begin{align*} \ln (1 + \change{t}) \amp \approx L(1 + \change{t}) \\ \amp = (1 + \change{t}) - 1 \\ \amp = \change{t} \text{.} \end{align*}
For example,
\begin{align*} \ln (1.001) \amp \approx 0.001 \text{,} \amp \ln (0.999) \amp \approx -0.001 \text{.} \end{align*}
Example 21.1.6. Linearizing sine at the origin.
The slope of the graph of \(\sin(t)\) at \(t = 0\) is \(1\text{,}\) since
\begin{equation*} \funceval{\ddt{\bbrac{\sin(t)}}}{t = 0} = \cos(0) = 1 \text{.} \end{equation*}
So the linearization of sine based at \(t = 0\) is
\begin{equation*} L(t) = \sin(0) + 1 \cdot (t - 0) = t \text{.} \end{equation*}
This recovers the familiar approximation
\begin{equation*} \sin(t) \approx t \qquad \text{for} \qquad t \approx 0 \text{.} \end{equation*}

Subsection 21.1.2 Error in a linear approximation

Merely stating \(\ln (1.001) \approx 0.001\) is all well and good, but it is fairly useless as an approximation if you have no idea how good it is as an approximation. This “approximate” value could be way off, for all we know. We could compare this approximate value to the true value, but the whole point of approximating is to avoid a more complicated computation. If we able to easily calcluate \(\ln (1.001)\) exactly, why not just do that instead of approximating it?
However, it is possible to estimate the error involved in a linear approximation.
Example 21.1.8. Adding error bounds to an approximation.
Let’s contextualize the approximation of \(\ln (1.001)\) that we made in Example 21.1.5. We have
\begin{equation*} \abs{\dblddt{(\ln t)}} = \abs{-\frac{1}{t^2}} = \frac{1}{t^2} \text{,} \end{equation*}
and on the closed interval \(1 \le t \le 1.001\) this second derivative magnitude achieves its largest value at \(t = 1\) so that
\begin{equation*} \abs{\dblddt{(\ln t)}} \le \frac{1}{1^2} = 1 \text{.} \end{equation*}
Therefore, the error in our approximation \(\ln(1.001) \approx 0.001\) satisfies
\begin{equation*} \abs{E} \le \frac{1}{2} \, {\abs{1.001 - 1}}^2 = 5 \times {10}^{-7} \text{.} \end{equation*}
In other words, we can confidently say that
\begin{equation*} 0.0009995 \le \ln(1.001) \le 0.0010005 \text{.} \end{equation*}
Remark 21.1.9.
A linear approximation will quickly become a bad approximation if we stray too far from the base point.
Comparing the graphs of a function and its linear approximation.
Figure 21.1.10. The approximation \(f(t) \approx L(t)\) will have a large error if \(t\) is too far from the base point \(t^\ast\text{.}\)

Subsection 21.1.3 Differentials

Subsubsection Another look at linearization
Here is another perspective on linear approximations. Recall that, from a base point \(\bbrac{t^\ast, q(t^\ast)}\) on the graph of \(q(t)\text{,}\) a second point \(\bbrac{t,q(t)}\) creates a secant line. The actual variation in quantity from base time to the second time is
\begin{equation*} \change{q} = q(t) - q(t^\ast) \text{,} \end{equation*}
and this variation occurs over a time period of duration
\begin{equation*} \change{t} = t - t^\ast \text{.} \end{equation*}
Over the same duration, we can contrast that the variation in the linear approximation, which we will label as \(dq\) instead of \(\change{t}\) as it follows the tangent line instead of a secant line.
A graph of a secant line between two points on a quantity graph.
(a) Variation along a secant line between two points on the quantity graph.
A graph of a tangent line as a linear approximation to a quantity graph.
(b) Variation along a tangent line to a point on the quantity graph.
Figure 21.1.11. Comparing variation along a secant line versus along a tangent line.
Mixing differential and derivative-function notation, and abusing notation to represent slope and variation along the tangent (linear approximation) line, we have
\begin{equation*} \dqdt = q'(t^\ast) \quad\implies\quad dq = q'(t^\ast) \, dt \text{.} \end{equation*}
Now, the duration is the same whether we are looking at variation of the original function or variation of the linear approximation, so
\begin{equation*} \change{t} = dt \text{.} \end{equation*}
But a linear approximation is only an approximation, so we have merely \(\change{q} \approx dq \text{.}\) So while we can write
\begin{equation*} q(t) = q(t^\ast + \change{t}) = q(t^\ast) + \change{q} \end{equation*}
exactly, we can only approximate
\begin{equation*} q(t) = q(t^\ast + \change{t}) = q(t^\ast + dt) \approx q(t^\ast) + dq \text{.} \end{equation*}
(But approximating is often what we choose to do if computing exactly is too computationally “expensive”.)
Using \(dq = q'(t^\ast) \, dt \text{,}\) we may rewrite the linearization formula in Definition 21.1.3 in differential notation.
Example 21.1.13. Estimating a square root.
Let’s repeat Example 21.1.1 using this new notation. We would like to estimate \(\sqrt{100.03}\text{,}\) which involves the square root process \(q(t) = \sqrt{t}\text{.}\) We know \(q(100) = 10\text{,}\) so \(t^\ast = 100\) is a convenient “nearby” base point. The difference between this base point and the location \(t = 100.03\) of the desired output value is
\begin{equation*} dt = \change{t} = 0.03 \text{.} \end{equation*}
We also have derivative function \(q'(t) = 1/2\sqrt{t}\text{,}\) and its value at the base point is \(q'(100) = 1/20\text{.}\) So now we are ready to estimate
\begin{align*} \sqrt{100.03} \amp = q(100.03) \\ \amp = q(100 + 0.03) \\ \amp \approx q(100) + q'(100) \cdot 0.03 \\ \amp \approx 10 + 0.03/20 \\ \amp \approx 10.0015 \text{.} \end{align*}
Example 21.1.14. Estimating a cosine value.
Let’s use \(d\bbrac{\cos(t)}/dt = -\sin(t)\) to estimate the value of \(\cos(40 \degree)\text{.}\) A convenient “nearby” base point could be \(45 \degree\text{,}\) where we know that
\begin{align*} \cos(45 \degree) \amp = \sin(45 \degree) = \frac{1}{\sqrt{2}} \text{.} \end{align*}
However, it would be incorrect to use \(-5 \degree\) as the value of \(dt\text{,}\) as we should always calculate in radians. Now, \(45 \degree\) corresponds to \(\pi/4\) radians, and each degree is \(\pi/180\) radians, so we should use
\begin{equation*} dt = -5 \cdot \frac{\pi}{180} = - \frac{\pi}{36} \text{.} \end{equation*}
Now we are ready to approximate
\begin{align*} \cos(40 \degree) \amp = \cos\left( \frac{\pi}{4} - \frac{\pi}{36} \right) \\ \amp \approx \cos\left( \frac{\pi}{4} \right) - \cos'\left( \frac{\pi}{4} \right) \cdot \frac{\pi}{36} \\ \amp = \cos\left( \frac{\pi}{4} \right) - \left(- \sin\left( \frac{\pi}{4} \right) \right) \cdot \frac{\pi}{36} \\ \amp = \frac{1}{\sqrt{2}} + \frac{1}{\sqrt{2}} \cdot \frac{\pi}{36} \\ \amp = \frac{1}{\sqrt{2}} \left( 1 + \frac{\pi}{36} \right) \text{.} \end{align*}
If we just pull out our calculator now to compute the above, that invalidates all our work in avoiding pulling out our calculator to compute \(\cos(40 \degree)\) in the first place. So let’s further approximate
\begin{align*} \sqrt{2} \amp \approx 1.414 \text{,} \amp \pi \amp \approx 3.14159 \text{.} \end{align*}
With these approximations we have
\begin{equation*} \cos(40 \degree) \approx 0.7689 \text{.} \end{equation*}
Subsubsection Relative error in a linear approximation
We expect that the error in the approximation \(\change{q} \approx dq\) should be small if \(dt\) is kept small.
Justification.
The variation in \(q\) from base point \(t^\ast\) to “second” point \(t\) is
\begin{equation*} \change{q} = q(t) - q(t^\ast) = q(t^\ast + dt) - q(t^\ast) \text{,} \end{equation*}
where
\begin{equation*} dt = \change{t} = t - t^\ast \text{.} \end{equation*}
So the error in approximating \(\change{q} \approx dq\) is
\begin{equation*} dq - \change{q} = q'(t^\ast) \, dt - \bigl[q(t^\ast + dt) - q(t^\ast)\bigr] \text{.} \end{equation*}
The error relative to \(dt\) is then
\begin{align*} \frac{dq - \change{q}}{dt} \amp = \frac{q'(t^\ast) \, dt - \bigl[q(t^\ast + dt) - q(t^\ast)\bigr]}{dt} \\ \amp = q'(t^\ast) - \frac{q(t^\ast + dt) - q(t^\ast)}{dt} \end{align*}
But the quotient at the end is precisely the difference quotient that approximates the value of \(q'(t^\ast)\text{.}\) That is, for \(dt \approx 0\) we have
\begin{equation*} \frac{q(t^\ast + dt) - q(t^\ast)}{dt} \approx q'(t^\ast) \text{,} \end{equation*}
and this approximation can be made arbitrarily good by taking \(dt\) to be sufficiently small. Thus
\begin{equation*} \frac{dq - \change{q}}{dt} \approx q'(t^\ast) - q'(t^\ast) = 0 \text{,} \end{equation*}
and again this approximation can be made arbitrarily good by taking \(dt\) to be sufficiently small.
Subsubsection Approximating relative variation
Often what we interested in is the actual amount increase/decrease \(\change{q}\) in the quantity rather than the final amount \(q(t)\text{,}\) in which case we can simply use
\begin{equation*} \change{q} \approx dq = q'(t^\ast) \, dt \text{.} \end{equation*}
Moreover, often we are interested in knowing the increase/decrease not as simply a difference but as a relative difference.
Definition 21.1.16. Relative variation.
The relative variation in a quantity is the ratio of the variation \(\change{q}\) to the initial quantity \(q(t_0)\text{:}\)
\begin{equation*} \frac{\change{q}}{q(t_0)} = \frac{q(t) - q(t_0)}{q(t_0)} \text{.} \end{equation*}
In the context of linear approximations we will usually take the “initial” time to be our base point \(t = t^\ast\text{,}\) and then we may approximate the relative variation as
\begin{equation*} \frac{\change{q}}{q(t^\ast)} \approx \frac{dq}{q(t^\ast)} = \frac{q'(t^\ast)}{q(t^\ast)} \; dt \text{.} \end{equation*}
Example 21.1.17. Relative increase in area of a circle.
You are designing a circular part for a machine. During manufacturing the actual diameter of the completed part can vary by up to \(\pm 2\%\text{.}\) What range of variation in the material used to make the part is possible?
If the part is a uniform thickness, we can use the area of its circular face as a proxy measurement for the amount of material used. Let’s work with the area as a function of the radius: \(A(r) = \pi r^2\text{.}\) A \(\pm 2\%\) variation in the diameter also means a \(\pm 2\%\) variation in the radius, because diameter and radius are proportional. So we have
\begin{equation*} dr = \change{r} = (\pm 2\%) \times r = \pm 0.02 r \text{.} \end{equation*}
The variation in the area can be approximated via differentials:
\begin{equation*} \change{A} \approx dA = \dd{A}{r} \, dr = 2 \pi r dr \text{.} \end{equation*}
Then relative variation is the ratio
\begin{equation*} \frac{\change{A}}{A} \approx \frac{dA}{A} = \frac{2 \pi r dr}{\pi r^2} = \frac{2 dr}{r} \text{.} \end{equation*}
Using \(dr = \pm 0.02 r \) we have
\begin{equation*} \frac{\change{A}}{A} \approx \frac{2 (\pm 0.02 r)}{r} = \pm 0.04 \text{.} \end{equation*}
So a \(\pm 2\%\) variation in the diameter corresponds to an approximate \(\pm 4\%\) variation in the area.

Section 21.2 Quadratic approximations

The linear approximation \(\sin(t) \approx t\) is fine for \(t \approx 0\text{,}\) but it quickly becomes inaccurate as the sine graph curves away from the approximating line. A linearization only matches the originating function in two aspects:
  • Same base value, \(L(t^\ast) = f(t^\ast)\text{.}\)
  • Same slope, \(L'(t^\ast) = f'(t^\ast)\text{.}\)
If we want a better approximating function that stays close to the values of the original function over a wider interval around the base point, we need it to better match the curvature of the original function by having the two functions match in a higher-order aspect:
  • Same concavity, \(L''(t^\ast) = f''(t^\ast)\text{.}\)
In general, this will not work when \(L(t)\) is linear since a line has no concavity. Instead, we will need move up a degree to a quadratic approximating function.
For now, let’s work with base point \(t^\ast = 0\text{.}\) We are looking for a quadratic polynomial
\begin{equation*} p(t) = a_0 + a_1 t + a_2 t^2 \end{equation*}
that matches the above three aspects of the function \(f(t)\) at the base point.
\(p\) \(f\)
Base value \(a_0\) \(f(0)\)
First derivative \(a_1\) \(f'(0)\)
Second derivative \(2 a_2\) \(f''(0)\)
To make these match in all three rows we should use
\begin{align*} a_0 \amp = f(0) \text{,} \amp a_1 \amp = f'(0) \text{,} \amp a_2 \amp = \frac{f''(0)}{2} \text{.} \end{align*}

Example 21.2.2. Quadratic approximation of \(\cos(t)\) near \(t = 0\).

The linear approximation
\begin{equation*} \cos(t) \approx 1 \qquad \text{for} \qquad t \approx 0 \end{equation*}
quickly becomes a poor approximation as the graph of cosine curves downward, away from its “initial” value \(\cos(0) = 1\)
Comparing the graph of the cosine function to the horizontal line at 1.
Figure 21.2.3. Comparing cosine to \(1\text{.}\)
We can use a quadratic approximation to do better. Calculate:
\begin{align*} \cos(0) \amp = 1 \text{,} \amp \funceval{\ddt{\bbrac{\cos(t)}}}{t = 0} \amp = -\sin(0) \amp \funceval{\dblddt{\bbrac{\cos(t)}}}{t = 0} \amp = -\cos(0)\\ \amp \amp \amp = 0 \text{,} \amp \amp = -1 \text{.} \end{align*}
From this we obtain quadratic approximation
\begin{equation*} p(t) = 1 - \frac{t^2}{2} \text{.} \end{equation*}
Notice that this parabola is concave down, just as the cosine graph is around \(t = 0\text{.}\)
Comparing the graph of the cosine function to specially created parabola.
Figure 21.2.4. Comparing cosine to a quadratic approximation.
Working at a different base point \(t = t^\ast\) is effectively just a horizontal shift of the above pattern.

Example 21.2.6. Quadratic approximation of \(\ln(t)\) near \(t = 1\).

Calculate:
\begin{align*} \ln(1) \amp = 0 \text{,} \amp \funceval{\ddt{\bbrac{\ln(t)}}}{t = 1} \amp = \frac{1}{1} \amp \funceval{\dblddt{\bbrac{\ln(t)}}}{t = 1} \amp = -\frac{1}{1^2}\\ \amp \amp \amp = 1 \text{,} \amp \amp = -1 \text{.} \end{align*}
From this we obtain quadratic approximation
\begin{equation*} p(t) = (t - 1) - \frac{1}{2} (t - 1)^2 \text{.} \end{equation*}
A graph of the natural logarithm and its quadratic approximation at base point 1.
Figure 21.2.7. The quadratic approximation of the natural logarithm at \(t = 1\text{.}\)
We can use this quadratic polynomial to improve on the specific approximations we made in Example 21.1.5:
\begin{align*} \ln (1.001) \amp \approx 0.001 - \frac{0.001^2}{2} \amp \ln (0.999) \amp \approx -0.001 - \frac{(-0.001)^2}{2}\\ \amp = 0.0009995 \text{,} \amp \amp = -0.0010005 \text{.} \end{align*}
The approximate error in a linear approximation is related to the magnitude of the second derivative near the base point, as a linear approximation omits concavity information. In the same way, the approximate error in a quadratic linear approximation is related to the magnitude of the third derivative near the base point.

Example 21.2.9. Error in our quadratic approximation of the natural logarithm.

We would like to know something about the quality of our approximation \(\ln (1.001) \approx 0.0009995\) from Example 21.2.6. Arguing similarly to Example 21.1.8, near \(t = 1\) we have
\begin{equation*} \abs{\nthddt[3]{(\ln t)}} = \frac{2}{t^3} \end{equation*}
and can say
\begin{equation*} \abs{\nthddt[3]{(\ln t)}} \le \frac{2}{1^3} = 2 \end{equation*}
on the interval \(1 \le t \le 1.001\text{.}\) Therefore, the error in our approximation \(\ln(1.001) \approx 0.0009995\) satisfies
\begin{equation*} \abs{E} \le \frac{2}{6} \, {\abs{1.001 - 1}}^3 = \frac{1}{3} \times {10}^{-9} \text{.} \end{equation*}
Rounding up so that we can ensure our error estimate is large enough, we can say
\begin{equation*} \abs{E} \le 3.34 \times {10}^{-10} \text{,} \end{equation*}
which implies that
\begin{equation*} 0.000999499666 \le \ln(1.001) \le 0.000999500334 \text{.} \end{equation*}
However, in our linear approximation error estimate, we found \(0.0009995 \le \ln(1.001) \text{,}\) so we could sharpen the above error estimate to
\begin{equation*} 0.0009995 \le \ln(1.001) \le 0.000999500334 \text{.} \end{equation*}

Remark 21.2.10.

We will unify the patterns of this section with the previous section into a general pattern of approximating a function by a polynomial, and the associated approximate error.

Section 21.3 Higher-degree approximations: Maclaurin and Taylor polynomials

Subsection 21.3.1 Higher derivatives

In Section 18.3 we introduce the second derivative of a function. For a quantity \(q(t)\text{,}\) the derivative function \(q'(t)\) represents its rate of variation. But if we view that new derivative function as the “quantity” of variation, then we could ask how that quantity varies, and the answer would be the derivative of that derivative function. Being two derivative calculations removed from the original function \(q(t)\text{,}\) we refer to the derivative of \(q'(t)\) as the second derivative of \(q\text{,}\) and write
\begin{equation*} q''(t) \qquad\text{or}\qquad \dbldqdt \end{equation*}
to represent it.
But we can repeat the process that led us to the concept of second derivative. Viewing the second derivative as the “quantity” of variation of the variation of \(q\text{,}\) we could ask how that quantity varies, and the answer would be the derivative of that second derivative function. Being three derivative calculations removed from the original function \(q(t)\text{,}\) we refer to the derivative of \(q''(t)\) as the third derivative of \(q\text{,}\) and write
\begin{equation*} q'''(t) \qquad\text{or}\qquad \nthdqdt[3] \end{equation*}
to represent it. And so on, creating the higher derivatives of the function \(q(t)\text{.}\)
\begin{align*} \amp\text{first derivative:} \amp q'(t) \;\;\amp\text{or}\;\; \dqdt \amp \amp = \text{ derivative of } q(t) \\ \amp\text{second derivative:} \amp q''(t) \;\;\amp\text{or}\;\; \dbldqdt \amp \amp = \text{ derivative of } q'(t) \\ \amp\text{third derivative:} \amp q'''(t) \;\;\amp\text{or}\;\; \nthdqdt[3] \amp \amp = \text{ derivative of } q''(t) \end{align*}
Eventually the number of tick marks becomes unreasonable, and we switch to a superscript, but in brackets to distinguish it from an exponent.
\begin{align*} \amp\text{fourth derivative:} \amp \nthderiv[4]{q}(t) \;\;\amp\text{or}\;\; \nthdqdt[4] \amp \amp = \text{ derivative of } q'''(t) \\ \amp\text{fifth derivative:} \amp \nthderiv[5]{q}(t) \;\;\amp\text{or}\;\; \nthdqdt[5] \amp \amp = \text{ derivative of } \nthderiv[4]{q}(t) \\ \amp \amp \amp \vdots \end{align*}
Example 21.3.1. Higher derivatives of the natural logarithm function.
We have \(d\bbrac{\ln(t)}/dt = 1/t\text{,}\) and after that we may use the pattern for the Derivative of a power function to compute higher derivatives:
\begin{align*} \opddt \bbrac{\ln(t)} \amp = \frac{1}{t} \\ \opdblddt \bbrac{\ln(t)} \amp = \opddt \left(\frac{1}{t}\right) = - \frac{1}{t^2} \\ \opnthddt[3] \bbrac{\ln(t)} \amp = \opddt \left(-\frac{1}{t^2}\right) = \frac{2}{t^3} \\ \opnthddt[4] \bbrac{\ln(t)} \amp = \opddt \left(\frac{2}{t^3}\right) = - \frac{6}{t^4} \\ \opnthddt[5] \bbrac{\ln(t)} \amp = \opddt \left(- \frac{6}{t^4}\right) = \frac{24}{t^5} \\ \amp \vdots \end{align*}
There appears to be a pattern here, where the higher derivatives alternate between positive and negative coefficients, and the numerator grows by a factor equal to the previous power in the denominator.
\begin{equation*} \opnthddt \bbrac{\ln(t)} = \frac{{(-1)}^{n - 1} (n - 1)!}{t^n} \text{.} \end{equation*}
(Note that \(0! = 1\text{.}\))
Example 21.3.2. Higher derivatives of the natural exponential function.
Because \(d(e^t)/dt = e^t\text{,}\) we have
\begin{equation*} \nthddt{(e^t)} = e^t \end{equation*}
for all \(n\text{.}\)
Checkpoint 21.3.3. Higher derivatives of trig functions.
Work out the general pattern of the higher derivatives of \(\sin(t)\) and \(\cos(t)\text{.}\)

Subsection 21.3.2 Matching higher derivatives

A linear approximation is created by matching function value and derivative value at the base point. Graphically, the linear approximation is the simplest function that shares the same height and the same slope as the original function at the base point. A quadratic approximation is created by matching both the first and second derivative values at the base point. Graphically, the quadratic approximation is the simplest function that shares the same height, the same slope, and the same rate of variation of the slope (that is, the same concavity) as the original function at the base point. To get more accurate approximations, we should create a higher-degree polynomial that matches even more higher derivative values of the function at the base point. Graphically, this means our approximation function will be the simplest function that shares the same height, the same slope, the same concavity, the same rate of variation of concavity, and so on, at the base point.
We begin with the general form of a degree-\(n\) polynomial:
\begin{equation*} p(t) = a_0 + a_1 t + a_2 t^2 + \dotsc + a_n t^n \text{.} \end{equation*}
As before, we will first look for that pattern for base point \(t = 0\text{,}\) as it is simpler to compute derivative values of a polynomial at that point. But what is the pattern in the derivative values of a polynomial?
\begin{align*} p(t) \amp = a_0 + a_1 t + a_2 t^2 + \dotsc + a_k t^k + \dotsc + a_n t^n \\ p'(t) \amp = a_1 + 2 a_2 t + 3 a_3 t^2 + \dotsc + k a_k t^{k - 1} + \dotsc + n a_n t^{n - 1} \\ p''(t) \amp = 2 a_2 + 6 a_3 t + 12 a_4 t^2 + \dotsc + k (k - 1) a_k t^{k - 2} + \dotsc + n (n - 1) a_n t^{n - 2} \\ p'''(t) \amp = 6 a_3 + 24 a_4 t + 60 a_5 t^2 + \dotsc + k (k - 1) (k - 2) a_k t^{k - 3} \\ \amp \qquad + \dotsc + n (n - 1) (n - 2) a_n t^{n - 3} \\ \amp \vdots \\ \nthderiv[k]{p}(t) \amp = k! \cdot a_k + \dotsc + n (n - 1) (n - 2) \dotsm (n - k + 1) a_n t^{n - k} \text{.} \end{align*}
The factorial pattern occurs because as we apply the power rule repeatedly to each term, we repeatedly multiply the coefficient of that term by the decreasing exponent values. And then when we substitute \(t = 0\) into these derivative functions, all but the constant term zeros out:
\begin{equation*} \nthderiv[k]{p}(0) = k! \cdot a_k \text{.} \end{equation*}
To have \(\nthderiv[k]{p}(0) = \nthderiv[k]{f}(0)\) for all \(k\text{,}\) we should set
\begin{equation*} a_k = \frac{\nthderiv[k]{f}(0)}{k!} \text{.} \end{equation*}
Remark 21.3.5.
Notice that a Maclaurin polynomial is just a Taylor polynomial with \(t^\ast = 0\text{:}\)
\begin{equation*} \nthmaclaurin (t) = \nthtaylor{0}(t) \text{.} \end{equation*}
Also notice that our previous linear and quadratic approximation formulas are just Maclaurin/Taylor polynomials of degree 1 and 2, respectively. Finally, to be able to consolidate into summation notation, we have adopted the convention that the “zeroth” derivative of a function is just the function itself: \(\nthderiv[0]{f}(t) = f(t)\text{.}\)
Example 21.3.6. Maclaurin approximation of cosine.
The first four derivative values (beginning at the “zeroth”) of \(\cos(t)\) at \(t = 0\) are
\begin{align*} \cos(0) \amp = 1 \text{,} \amp \funceval{\dblddt{\bbrac{\cos(t)}}}{t = 0} \amp = -1\\ \funceval{\ddt{\bbrac{\cos(t)}}}{t = 0} \amp = 0 \amp \funceval{\nthddt[3]{\bbrac{\cos(t)}}}{t = 0} \amp = 0 \end{align*}
After this, the higher derivative values of \(\cos(t)\) repeat these four values. So only the even-degree terms are present in the Maclaurin polynomial:
\begin{equation*} \nthmaclaurin (t) = \sum_{\substack{k = 0 \\ k \text{ even}}}^n \frac{{(-1)}^{k/2}}{k!} \; t^k \text{.} \end{equation*}
In this case, it is a little cleaner to replace our always-even index variable with the substitution \(k = 2 m\text{:}\)
\begin{equation*} \nthmaclaurin (t) = \sum_{m = 0}^{\floor{n/2}} \frac{{(-1)}^m}{(2m)!} \; t^{2 m} \text{.} \end{equation*}
Notice that in both versions, in case that \(n\) is odd, then the final term will involve \(t^{n - 1}\text{,}\) not \(t^n\text{.}\)
Checkpoint 21.3.7. Maclaurin approximation of \(\sin(t)\).
Perform a similar analysis as in Example 21.3.6 to create the Maclaurin polynomial \(\nthmaclaurin (t)\) for \(\sin(t)\text{.}\) You should see a similar alternating pattern to the coefficients.
Checkpoint 21.3.8. Maclaurin approximation of the natural exponential function.
Use the fact that
\begin{equation*} \ddt{(e^t)} = e^t \end{equation*}
to create the Maclaurin polynomial \(\nthmaclaurin (t)\) for the exponential function \(\exp(t)\text{.}\)
Example 21.3.9. Taylor polynomial for \(\ln(t)\) based at \(t = 1\).
From the derivative calculations
\begin{align*} \ddt{\bbrac{\ln(t)}} \amp = \frac{1}{t} \amp \nthddt[3]{\bbrac{\ln(t)}} \amp = \frac{2}{t^3}\\ \dblddt{\bbrac{\ln(t)}} \amp = - \frac{1}{t^2} \amp \nthddt[4]{\bbrac{\ln(t)}} \amp = - \frac{6}{t^4}\text{,} \end{align*}
we see a pattern emerging:
\begin{equation*} \nthddt[k]{\bbrac{\ln(t)}} = {(-1)}^{k - 1} \frac{(k - 1)!}{t^k} \qquad \text{for } k \ge 1 \text{.} \end{equation*}
(Recall that \(0! = 1\text{.}\))
The index \(k = 0\) represents the constant term in the Taylor polynomial, which is always the function value at the base point. Substituting the base point \(t = 1\) into the derivative pattern above and combining with the constant term, we have
\begin{align*} \nthtaylor{1}(t) \amp = \ln(1) + \sum_{k = 1}^n \frac{{(-1)}^{k - 1} (k - 1)!}{k!} \; (t - 1)^k \\ \amp = \sum_{k = 1}^n \frac{{(-1)}^{k - 1}}{k} \; (t - 1)^k \text{.} \end{align*}
(Recall that \(\ln(1) = 0\text{.}\))
Once again, an approximation is worthless without some idea of its accuracy. And, just as in the linear and quadratic cases, the error is approximately measured the the derivative value that is not being matched by the polynomial.
Example 21.3.11.
What value of \(n\) can we use so that \(\cos(1) \approx \nthmaclaurin (1)\) is accurate to within \(\pm 0.001\text{?}\) The derivatives of \(\sin(t)\) are all sine or cosine or their negatives, so we can say \(\abs{\nthderiv[n+1]{\sin}(t)} \le 1\) for all \(n\) and all \(t\text{.}\) Thus
\begin{equation*} \abs{E} \le \frac{1}{(n + 1)!} \, {\abs{1 - 0}}^{n + 1} = \frac{1}{(n + 1)!} \text{.} \end{equation*}
We first have \((n + 1)! \ge 1000\) for \(n = 6\text{,}\) so using \(\cos(1) \approx \nthmaclaurin[6](1)\) will give us the desired accuracy. From the pattern in Example 21.3.6 we have
\begin{equation*} \nthmaclaurin[6](t) = 1 - \frac{t^2}{2} + \frac{t^4}{4!} - \frac{t^6}{6!} \text{,} \end{equation*}
and so at \(t = 1\) we have
\begin{align*} \nthmaclaurin[6](t) \amp = 1 - \frac{1}{2} + \frac{1}{4!} - \frac{1}{6!} \\ \amp = \frac{6!}{6!} - \frac{360}{6!} + \frac{30}{6!} - \frac{1}{6!} \\ \amp = \frac{389}{720} \text{.} \end{align*}
Conclude that
\begin{equation*} \cos(1) \approx 0.540 \pm 0.001 \text{.} \end{equation*}