Taylor polynomials
A tangent line matches a function’s value and slope at one point. If a polynomial also matched the bending, and the change in the bending, and so on, how close could it stay to the function, and what would its coefficients have to be?
Where you are 5 in Taylor and Maclaurin series
Why this exists
The linearization L(x) = f(a) + f'(a)(x - a) is the line that agrees with f in value and slope at a. It estimates nearby values well, and its error shrinks like the square of the distance from a. But a line cannot bend. Wherever f curves, the line peels away, and the only way to push the error down further is to stay ever closer to a.
A polynomial can bend as much as you like. A quadratic can match value, slope and second derivative; a cubic can match the third derivative too. The question is which polynomial to take, and the answer turns out to be forced: once you decide how many derivatives to match at a, there is exactly one polynomial of that degree that does it, and its coefficients are derivatives divided by factorials. That polynomial is the Taylor polynomial. It turns values you cannot compute by hand, such as \displaystyle \sqrt[4]{17} or \arctan 1.1, into a few multiplications, and it is how a calculator, an optics shop or a physics model replaces a hard function by an easy one near a point of interest.
Definition
Let f have n derivatives at the point a. The Taylor polynomial of degree n for f about a (also “centered at a”) is
Here f^{(0)} = f, 0! = 1 and k! = 1 \cdot 2 \cdots k. The number c_k = \dfrac{f^{(k)}(a)}{k!} is the k-th Taylor coefficient. Plain words first: the coefficient of (x - a)^k is the k-th derivative at the center, divided by k!.
When the center is a = 0, the Taylor polynomial is called the Maclaurin polynomial of degree n:
“Degree n” is used loosely: if f^{(n)}(a) = 0, the polynomial P_n has a lower actual degree, and it is still called P_n.
Intuition
Each derivative at a records one more feature of the graph there: the value says where it is, the first derivative which way it tilts, the second how it bends, the third how the bending changes. A polynomial in powers of (x - a) keeps those features in separate drawers, one coefficient each, because each power (x - a)^k is invisible to every derivative at a except the k-th. So you can tune the coefficients one at a time, and each one is set by a single derivative.
Matching more features makes the polynomial and the function agree more closely near a, in a precise way: near the center, the error of P_n behaves like a constant times (x - a)^{n+1}, provided f^{(n+1)}(a) \neq 0 (if it is 0, the error shrinks even faster). Halving the distance to the center then cuts the error of P_1 by about 4, of P_2 by about 8, of P_3 by about 16. Figure 1 shows the higher degree staying close longer for \sec x.
Results
Coefficients from derivatives. If f has n derivatives at a, there is exactly one polynomial P of degree at most n with P^{(k)}(a) = f^{(k)}(a) for k = 0, 1, \ldots, n, and it is
The first two cases. P_0(x) = f(a), a constant. P_1(x) = f(a) + f'(a)(x - a) is the linearization L(x). Each P_n is P_{n-1} plus one new term, so raising the degree never changes the terms already found.
Polynomials re-centered. If p is a polynomial of degree n, then its Taylor polynomial of degree n (or higher) about any center a is p itself, written in powers of (x - a).
Observed accuracy near the center (stated here without proof). If f has n + 1 continuous derivatives near a, then \lvert f(x) - P_n(x) \rvert is at most a constant times \lvert x - a \rvert^{n+1} for x near a. The constant, and a usable bound on the error, come in the Lagrange error bound; this lesson only watches the error numerically.
Why it is true
Write any polynomial of degree at most n in powers of (x - a):
Look at one term c_j(x - a)^j and differentiate it k times. If j < k, it is gone after j + 1 differentiations, so its k-th derivative is 0. If j > k, its k-th derivative is a constant times (x - a)^{j-k}, which still has a factor (x - a) and is 0 at x = a. Only j = k survives: differentiating (x - a)^k a total of k times brings down k, then k - 1, down to 1, leaving the constant k!. So
Asking P^{(k)}(a) = f^{(k)}(a) therefore forces c_k = f^{(k)}(a)/k!, one coefficient at a time, with no choice left. That proves both existence and uniqueness. The k! is not decoration: it is the number of ways the power rule peels the exponent down to 0, the same count as the k! orderings in counting.
For the re-centering result, every polynomial p of degree n can be written in powers of (x - a): replace each x by (x - a) + a and expand. Then p is a polynomial of degree at most n whose derivatives at a match its own, so by uniqueness it is its own P_n. Beyond degree n every derivative of p is 0, so the higher Taylor polynomials add only zero terms.
Worked examples
Day 1: the fourth root of 17
Build the Taylor polynomials of degrees 1, 2 and 3 for \displaystyle f(x) = \sqrt[4]{x} about a = 16, and use each to estimate \displaystyle \sqrt[4]{17}.
SolutionThe center 16 is chosen because \displaystyle \sqrt[4]{16} = 2 exactly and 16 is close to 17. Write f(x) = x^{1/4} and differentiate with the power rule, then evaluate at 16, using 16^{1/4} = 2:
| k | f^{(k)}(x) | f^{(k)}(16) | c_k = f^{(k)}(16)/k! |
|---|---|---|---|
| 0 | x^{1/4} | 2 | 2 |
| 1 | \displaystyle \frac{1}{4}x^{-3/4} | \displaystyle \frac{1}{4} \cdot \frac{1}{8} = \frac{1}{32} | \displaystyle \frac{1}{32} |
| 2 | \displaystyle -\frac{3}{16}x^{-7/4} | \displaystyle -\frac{3}{16} \cdot \frac{1}{128} = -\frac{3}{2048} | \displaystyle -\frac{3}{4096} |
| 3 | \displaystyle \frac{21}{64}x^{-11/4} | \displaystyle \frac{21}{64} \cdot \frac{1}{2048} = \frac{21}{131072} | \displaystyle \frac{7}{262144} |
So
and P_1, P_2 are the first two and three terms. At x = 17 every power of (x - 16) equals 1, so the estimates are partial sums of the coefficients:
A calculator gives \displaystyle \sqrt[4]{17} \approx 2.0305432. The linear estimate is off by about 7 \times 10^{-4}, the quadratic by about 3 \times 10^{-5}, the cubic by about 1 \times 10^{-6}. Each added term cuts the error by a factor of more than 20 here, because the step x - a = 1 is small next to 16, where all the derivatives are taken.
Day 1: a Maclaurin polynomial for sec x
Find the Maclaurin polynomial of degree 4 for f(x) = \sec x.
SolutionThe derivatives come from \displaystyle \frac{d}{dx}\sec x = \sec x \tan x and \displaystyle \frac{d}{dx}\tan x = \sec^2 x (derivatives of the other trig functions). Rewriting \tan^2 x = \sec^2 x - 1 after each step keeps them short:
The last line is the product rule on each term of f''': \displaystyle \frac{d}{dx}(\sec^3 x) = 3\sec^3 x \tan x and \displaystyle \frac{d}{dx}\tan x = \sec^2 x. At x = 0, \sec 0 = 1 and \tan 0 = 0, so every term with a factor \tan x vanishes:
The coefficients are 1, 0, \displaystyle \frac{1}{2!} = \frac{1}{2}, 0, \displaystyle \frac{5}{4!} = \frac{5}{24}:
The odd powers are missing for a reason: \sec x is an even function, its graph is symmetric about the y-axis, and the odd derivatives of an even function are odd functions, which are 0 at 0. Figure 1 shows P_2 and P_4 against the curve.
Day 1: arctan x about 1
Find the Taylor polynomial of degree 2 for f(x) = \arctan x about a = 1, and use P_1 and P_2 to estimate \arctan 1.1.
Solution\displaystyle \arctan 1 = \frac{\pi}{4} because \displaystyle \tan \frac{\pi}{4} = 1. From the derivative of the inverse tangent, f'(x) = \dfrac{1}{1 + x^2}, and by the chain rule f''(x) = -\dfrac{2x}{(1 + x^2)^2}. At x = 1: \displaystyle f'(1) = \frac{1}{2} and \displaystyle f''(1) = -\frac{2}{4} = -\frac{1}{2}. The second coefficient is \displaystyle -\frac{1}{2}/2! = -\frac{1}{4}:
At x = 1.1, x - 1 = 0.1:
A calculator gives \arctan 1.1 \approx 0.832981. The tangent line is high by about 0.0024; the quadratic is low by about 0.00008, thirty times closer. The negative second coefficient is the graph’s downward bend at 1, which the line could not see.
Day 1: a cubic written around 2
Find every Taylor polynomial of p(x) = x^3 - 4x^2 + 3x + 5 about a = 2.
Solutionp'(x) = 3x^2 - 8x + 3, p''(x) = 6x - 8, p'''(x) = 6, and every higher derivative is 0. At 2:
The coefficients are 3, -1, \displaystyle \frac{4}{2} = 2 and \displaystyle \frac{6}{6} = 1, so
and P_n = P_3 for every n \ge 3. Expanding confirms it is p itself: (x - 2)^3 = x^3 - 6x^2 + 12x - 8 and 2(x - 2)^2 = 2x^2 - 8x + 8, and adding -(x - 2) + 3 = -x + 5 gives x^3 - 4x^2 + 3x + 5.
The lower ones are P_0 = 3, P_1 = 3 - (x - 2) and P_2 = 3 - (x - 2) + 2(x - 2)^2. Here the error of P_2 is exactly the dropped term, p(x) - P_2(x) = (x - 2)^3: at x = 2.1 it is 0.001, at x = 2.2 it is 0.008. Doubling the distance multiplies the error by exactly 8, the clean version of the pattern Day 2 watches in other functions.
Day 2: watching the error shrink
Using the polynomials of Example 1, compute \displaystyle \sqrt[4]{x} - P_n(x) for n = 1, 2, 3 at x = 20, 18 and 17, and describe how each error changes as the distance h = x - 16 halves.
SolutionEach entry is \displaystyle \sqrt[4]{16 + h} - P_n(16 + h), in millionths (10^{-6}):
| h | P_1 | P_2 | P_3 |
|---|---|---|---|
| 4 | -10{,}258 | 1461.3 | -247.71 |
| 2 | -2732.9 | 196.83 | -16.792 |
| 1 | -706.82 | 25.607 | -1.0961 |
Divide each error by the one below it. For P_1: 3.75 and 3.87, close to 4 = 2^2. For P_2: 7.42 and 7.69, close to 8 = 2^3. For P_3: 14.8 and 15.3, close to 16 = 2^4. Halving h divides the error of P_n by roughly 2^{n+1}, and the ratios creep toward it as h shrinks, which is the behavior \lvert f(x) - P_n(x) \rvert \approx C\lvert x - a \rvert^{n+1} predicts.
Two more things show in the table. The errors alternate in sign: the next term dropped is negative for P_1, positive for P_2, negative for P_3, and the error takes the sign of the first term left out. And the gain from one more degree is larger the smaller h is: at h = 4 the cubic beats the linear estimate by a factor of 41; at h = 1, by 645.
Day 2: how far from the center
Compare P_1 and P_2 from Example 3 with \arctan x at x = 1.1, 1.5 and 2.
Solution| x | \arctan x | \arctan x - P_1(x) | \arctan x - P_2(x) |
|---|---|---|---|
| 1.1 | 0.832981 | -0.002417 | 0.0000831 |
| 1.5 | 0.982794 | -0.05260 | 0.009896 |
| 2 | 1.107149 | -0.1782 | 0.07175 |
At every point the quadratic is closer, but its advantage fades with distance: 29 times better at 1.1, 5 times at 1.5, 2.5 times at 2. Going from h = 0.1 to h = 0.5, five times farther out, the error of P_2 grows by a factor of 119, close to 5^3 = 125. At h = 1 the cubic pattern would predict a factor of 1000 over h = 0.1; the actual factor is 863. The power law describes behavior near the center, and it says nothing about how good an estimate is at a fixed distance. That needs the bound in the next lessons.
Day 2: Afsaneh’s lens depth
Afsaneh grinds spherical lens surfaces. For a surface of radius R, the depth of the curve over a half-width r (its sagitta, Figure 2) is
from the right triangle with hypotenuse R and legs r and R - s. Her shop rule is s \approx \dfrac{r^2}{2R}. Find the Maclaurin polynomials of s in r (with R fixed) up to degree 4, explain the shop rule, and compare both approximations with the exact depth for R = 100 millimeters and r = 25 millimeters.
Treat R as a constant. Differentiate, each time with the chain rule on (R^2 - r^2)^{\text{power}}:
(For s'', the quotient rule gives \dfrac{(R^2 - r^2) + r^2}{(R^2 - r^2)^{3/2}}, and the numerator is R^2.) At r = 0, using (R^2)^{m/2} = R^m:
So P_2(r) = P_3(r) = \dfrac{r^2}{2R} and
The shop rule is the Maclaurin polynomial of degree 2, which is also of degree 3, because s is even in r. The linearization would be useless here: P_1 = 0, since the surface is flat at its vertex.
With R = 100 and r = 25:
in millimeters. The shop rule is short by about 0.050 millimeter, which matters at the precision a lens needs; the correction term \displaystyle \frac{r^4}{8R^3} brings the error down to about 0.0016 millimeter. Both approximations are low, because the dropped terms here are all positive.
Boundaries
The derivatives must exist at the center. P_n about a needs f'(a), \ldots, f^{(n)}(a). The function \displaystyle \sqrt[4]{x} has no Taylor polynomial of degree 1 about 0, because it has no derivative there (the tangent line is vertical), and \lvert x \rvert has none about 0 because of its corner.
Close to the center only. The accuracy statement is about x near a. Farther away a higher degree can be worse (Exercise 20), and a polynomial can never follow a function to a vertical asymptote: P_4 for \sec x is a finite number at \displaystyle x = \frac{\pi}{2}, where \sec x is undefined.
Derivatives at one point fix only the polynomial, not the function. Two different functions with the same n derivatives at a have the same P_n (Exercise 22). A Taylor polynomial cannot tell you what a function does away from a; how large its error can be is a separate question, answered by the Lagrange error bound.
Trigonometric derivatives assume radians. \displaystyle \frac{d}{dx}\sin x = \cos x holds only for x in radians, so every coefficient for a trig function is wrong if x is in degrees.
A polynomial, not a series. P_n is a finite sum. Letting n grow without end is the Taylor series, which raises a question this lesson does not answer: whether the infinite sum converges to f.
Where this goes next
Taylor polynomials are the finite stages of the Taylor series, which keeps every term. The functions whose derivatives at 0 repeat in a short cycle (e^x, \sin x, \cos x, \ln(1 + x)) get the treatment in the common Maclaurin series, and powers like \displaystyle \sqrt[4]{x} in the binomial series. The error this lesson only watches gets a guaranteed ceiling in the Lagrange error bound, which turns the “about 3 \times 10^{-5}” of the quadratic in Example 1 into “certainly less than 3 \times 10^{-5}”. And once a function is replaced by a polynomial, integrals that have no elementary antiderivative become sums of powers, which is using series to estimate integrals.
Exercises
Day 1: building Taylor polynomials
- Find the Maclaurin polynomial of degree 3 for f(x) = \dfrac{1}{3 + x}.
- Find the Taylor polynomial of degree 3 for f(x) = x^{3/2} about a = 4, and use it to estimate 5^{3/2}.
- Find the Taylor polynomial of degree 2 for f(x) = \cos x about \displaystyle a = \frac{\pi}{3}.
- Find the Taylor polynomial of degree 3 for f(x) = \dfrac{1}{x^2} about a = 2.
- Find the Taylor polynomial of degree 2 for f(x) = \ln x about a = e.
Day 1: polynomials and derivative data
- Write q(x) = 2x^3 + x^2 - 5x + 1 in powers of (x + 1) by finding its Taylor polynomial about a = -1.
- Write x^4 in powers of (x - 1).
- Find the Maclaurin polynomials of degrees 2 and 5 for g(x) = 7 - 2x + 5x^2 - x^3 + 4x^4.
- The Taylor polynomial of degree 4 for a function f about 3 is \displaystyle 2 - 5(x - 3) + 6(x - 3)^2 + \frac{1}{2}(x - 3)^4. Find f(3), f'(3), f''(3), f'''(3) and f^{(4)}(3).
- A function has f(1) = 4, f'(1) = -2, f''(1) = 3 and f'''(1) = -12. Write P_3 about 1 and use P_2 and P_3 to estimate f(1.2).
Day 2: estimates and how good they are
- Use the Taylor polynomials of degrees 1 and 2 for \displaystyle \sqrt[5]{x} about 32 to estimate \displaystyle \sqrt[5]{33}, and find the error of each with a calculator.
- Use P_2 and P_4 for \sec x (Example 2) to estimate \sec 0.2, and find each error.
- Use P_2 from Example 3 to estimate \arctan 0.9 and find its error. Compare with the error at 1.1 in Example 3 and explain what you see.
- With P_2 from Exercise 3, find \cos x - P_2(x) at \displaystyle x = \frac{\pi}{3} + 0.2 and at \displaystyle x = \frac{\pi}{3} + 0.1. By what factor did the error shrink, and what factor does the pattern of Example 5 predict?
- Daiki grinds a surface with R = 250 millimeters over a half-width r = 40 millimeters. Find the sagitta from P_2, from P_4 (Example 7) and exactly.
- A drawing calls for a surface of radius R = 80 millimeters over r = 20 millimeters, with the depth correct to within 0.01 millimeter. Is the shop rule \displaystyle \frac{r^2}{2R} good enough? Is P_4?
Reasoning
- Explain where the k! in c_k = \dfrac{f^{(k)}(a)}{k!} comes from.
- Show that a polynomial of degree at most n is equal to its own Taylor polynomial of degree n about any center.
- Explain why every Maclaurin polynomial of \sec x has only even powers of x.
- A claim: “A Taylor polynomial of higher degree is closer to the function at every x.” Test it with f(x) = x^2 - x^3, its Maclaurin polynomials P_1 and P_2, and x = 2.
- Explain why the Taylor polynomial of degree 1 is the linearization, and what the sign of the coefficient of (x - a)^2 says about whether the tangent line runs above or below the graph near a.
- Show that \sec x and \displaystyle g(x) = 1 + \frac{x^2}{2} + \frac{5x^4}{24} have the same Maclaurin polynomial of degree 4. Then compare \sec 1.5 with g(1.5) and explain what the derivatives at 0 could not tell you.
Answers
- \displaystyle \frac{1}{3} - \frac{x}{9} + \frac{x^2}{27} - \frac{x^3}{81}. With f = (3 + x)^{-1}, f^{(k)}(x) = (-1)^k k!\,(3 + x)^{-k-1}, so c_k = (-1)^k/3^{k+1}.
- The polynomial is P_3(x) = 8 + 3(x - 4) \displaystyle + \frac{3}{16}(x - 4)^2 - \frac{1}{128}(x - 4)^3, and P_3(5) = 11.1796875. The derivatives at 4 are 8, \displaystyle \frac{3}{2} \cdot 2 = 3, \displaystyle \frac{3}{4} \cdot \frac{1}{2} = \frac{3}{8} and \displaystyle -\frac{3}{8} \cdot \frac{1}{8} = -\frac{3}{64}; divide by 1, 1, 2, 6. The exact value \displaystyle 5\sqrt{5} \approx 11.18034, so the error is about 0.00065.
- \displaystyle \frac{1}{2} - \frac{\sqrt{3}}{2}(x - \frac{\pi}{3}) - \frac{1}{4}(x - \frac{\pi}{3})^2. The values at \displaystyle \frac{\pi}{3} are \displaystyle \cos = \frac{1}{2}, \displaystyle -\sin = -\frac{\sqrt{3}}{2}, \displaystyle -\cos = -\frac{1}{2}, and \displaystyle -\frac{1}{2}/2 = -\frac{1}{4}.
- \displaystyle \frac{1}{4} - \frac{1}{4}(x - 2) + \frac{3}{16}(x - 2)^2 - \frac{1}{8}(x - 2)^3. The derivatives x^{-2}, -2x^{-3}, 6x^{-4}, -24x^{-5} at 2 are \displaystyle \frac{1}{4}, \displaystyle -\frac{1}{4}, \displaystyle \frac{3}{8}, \displaystyle -\frac{3}{4}; divide by 1, 1, 2, 6.
- \displaystyle 1 + \frac{1}{e}(x - e) - \frac{1}{2e^2}(x - e)^2. \ln e = 1, \displaystyle f'(e) = \frac{1}{e}, \displaystyle f''(e) = -\frac{1}{e^2}, halved.
- q(x) = 5 - (x + 1) - 5(x + 1)^2 + 2(x + 1)^3. q(-1) = 5, q'(-1) = 6 - 2 - 5 = -1, q''(-1) = -12 + 2 = -10, q'''(-1) = 12; divide by 1, 1, 2, 6. Expanding gives back q.
- In powers of (x - 1), x^4 = 1 + 4(x - 1) + 6(x - 1)^2 + 4(x - 1)^3 + (x - 1)^4. The derivatives at 1 are 1, 4, 12, 24, 24; divided by 0! to 4! they give 1, 4, 6, 4, 1.
- P_2(x) = 7 - 2x + 5x^2 and P_5(x) = g(x). For a polynomial in powers of x, g^{(k)}(0)/k! is just the coefficient of x^k, so P_n keeps the terms up to x^n; beyond degree 4 nothing is added.
- f(3) = 2, f'(3) = -5, f''(3) = 12, f'''(3) = 0, f^{(4)}(3) = 12. Each derivative is k!\,c_k: 2! \cdot 6, 3! \cdot 0, \displaystyle 4! \cdot \frac{1}{2}.
- \displaystyle P_3(x) = 4 - 2(x - 1) + \frac{3}{2}(x - 1)^2 - 2(x - 1)^3; P_2(1.2) = 3.66 and P_3(1.2) = 3.644. The cubic coefficient is -12/6 = -2, and at x - 1 = 0.2 the terms are 4 - 0.4 + 0.06 - 0.016.
- P_1(33) = 2.0125 and P_2(33) = 2.01234375; \displaystyle \sqrt[5]{33} \approx 2.0123466, so the errors are about -0.000153 and 0.0000029. The coefficients are 2, \displaystyle \frac{1}{5} \cdot 32^{-4/5} = \frac{1}{80}, and \displaystyle -\frac{4}{25} \cdot 32^{-9/5} / 2 = -\frac{1}{6400}.
- P_2(0.2) = 1.02 and P_4(0.2) \approx 1.0203333; \sec 0.2 \approx 1.0203388, so the errors are about 0.00034 and 0.0000055. The x^4 term, \displaystyle \frac{5(0.0016)}{24}, removes almost all of the error.
- \displaystyle P_2(0.9) = \frac{\pi}{4} - 0.05 - 0.0025 \approx 0.732898 and \arctan 0.9 \approx 0.732815, so the error is about -0.0000831. At 1.1 it was about +0.0000831: the same size with the opposite sign, because near the center the error behaves like a constant times (x - 1)^3, and the cube of -0.1 is the negative of the cube of 0.1.
- About 0.0011857 at h = 0.2 and 0.00014635 at h = 0.1, a factor of about 8.1. The pattern predicts 2^{3} = 8 for P_2. The values are \cos x \approx 0.317981 against P_2 \approx 0.316795, then 0.411044 against 0.410897.
- \displaystyle P_2 = \frac{1600}{500} = 3.2, \displaystyle P_4 = 3.2 + \frac{2{,}560{,}000}{125{,}000{,}000} = 3.22048, and \displaystyle s = 250 - \sqrt{60{,}900} \approx 3.22075 millimeters. The shop rule is short by about 0.021 millimeter, P_4 by about 0.00027.
- The shop rule is not; P_4 is. \displaystyle s = 80 - \sqrt{6000} \approx 2.54033; \displaystyle \frac{r^2}{2R} = 2.5 is short by about 0.040, more than 0.01; \displaystyle P_4 = 2.5 + \frac{160{,}000}{4{,}096{,}000} \approx 2.53906 is short by about 0.0013.
- Differentiating (x - a)^k once brings down k, the next time k - 1, and so on to 1, so the k-th derivative of c_k(x - a)^k is k!\,c_k, while every other term of the polynomial has k-th derivative 0 at a. Matching f^{(k)}(a) means k!\,c_k = f^{(k)}(a), so dividing by k! undoes exactly what differentiation multiplied in.
- Write the polynomial p in powers of (x - a) by substituting x = (x - a) + a and expanding; it has degree at most n. Its own derivatives at a match themselves, and by the uniqueness in Results, the only polynomial of degree at most n with those derivatives is P_n. So P_n = p.
- \sec(-x) = \sec x, so \sec is even. Differentiating an even function gives an odd one (by the chain rule, f(-x) = f(x) gives -f'(-x) = f'(x)), and the next derivative is even again, so every odd-order derivative is an odd function. An odd function h has h(0) = -h(0), so h(0) = 0, and every odd coefficient is 0.
- The claim is false. P_1(x) = 0 and P_2(x) = x^2. At x = 2, f(2) = 4 - 8 = -4, so P_1 is off by 4 and P_2, with P_2(2) = 4, is off by 8. Higher degree is better near the center, not everywhere.
- P_1(x) = f(a) + f'(a)(x - a) is the formula for the linearization. Then \displaystyle P_2 = L + \frac{f''(a)}{2}(x - a)^2, and near a the error f - L is about \displaystyle \frac{f''(a)}{2}(x - a)^2. If f''(a) > 0 this is positive on both sides, so the graph is above its tangent line (concave up); if f''(a) < 0 the tangent line runs above the graph.
- g is a polynomial of degree 4, so its own Maclaurin polynomial of degree 4 is g, which is the P_4 found for \sec x in Example 2. But \sec 1.5 \approx 14.137 and g(1.5) \approx 3.180. The five derivatives at 0 agree, and they carry no information about the asymptote at \displaystyle \frac{\pi}{2}, where \sec grows without bound and g does not.