Taylor Polynomials
Practise this section (12)You type $e^{0.3}$ into your calculator and $1.3498588$ appears instantly. But a calculator can only add, subtract, multiply, and divide. How can it possibly evaluate $e^{0.3}$? The answer is polynomials, and by the end of this page you will compute $e^{0.3}$ to three decimal places using nothing but arithmetic.
From the Tangent Line to a Taylor Polynomial
You already know one polynomial approximation: the tangent line (linear approximation). Near $x=a$,
$$f(x)\approx f(a)+f'(a)(x-a).$$It matches the function's value and its slope at $x=a$. For $f(x)=e^x$ at $a=0$ this gives $e^x\approx 1+x$, so $e^{0.3}\approx 1.3$. The true value is about $1.3499$, so we are off by $0.05$. The tangent line ignores the curvature.
To do better, we ask a polynomial to match more: the value, the slope, the concavity ($f''$), the way the concavity changes ($f'''$), and so on. Each extra derivative we match buys a better fit.
P₁ matches f(a) and f′(a); P₂ adds f″(a) and P₃ adds f‴(a). Each new degree matches one more derivative of f at the center x = a, and the fit improves.Why the factorials? Write a polynomial in powers of $(x-a)$: $P(x)=c_0+c_1(x-a)+c_2(x-a)^2+c_3(x-a)^3$. Differentiate three times and plug in $x=a$. Every term with a leftover factor of $(x-a)$ vanishes, so $P(a)=c_0$, $P'(a)=c_1$, $P''(a)=2\cdot c_2$, and $P'''(a)=3\cdot2\cdot1\cdot c_3=3!\,c_3$. To make $P^{(k)}(a)=f^{(k)}(a)$, we need $c_k=\dfrac{f^{(k)}(a)}{k!}$. The factorial cancels the constant that differentiation produces.
Notice that $P_1$ is exactly the tangent line, and the Taylor polynomial of degree $n$ has only the terms up to $(x-a)^n$.
A function $f$ has $f(0)=2$, $f'(0)=-1$, $f''(0)=4$, and $f'''(0)=6$. Write the third-degree Taylor polynomial $P_3(x)$ for $f$ about $x=0$.
A function $f$ has $f(0)=2$, $f'(0)=-1$, $f''(0)=4$, and $f'''(0)=6$. Write the third-degree Taylor polynomial $P_3(x)$ for $f$ about $x=0$.
A function $f$ has $f(2)=5$, $f'(2)=3$, $f''(2)=-4$, and $f'''(2)=12$. Write the third-degree Taylor polynomial $P_3(x)$ about $x=2$ and use it to approximate $f(2.1)$.
A function $f$ has $f(2)=5$, $f'(2)=3$, $f''(2)=-4$, and $f'''(2)=12$. Write the third-degree Taylor polynomial $P_3(x)$ about $x=2$ and use it to approximate $f(2.1)$.
Finding Taylor Polynomials of a Function
When you are given a formula for $f$, the recipe is always the same:
-
Differentiate $f$ until you have $f^{(n)}$.
-
Evaluate $f(a), f'(a),\dots,f^{(n)}(a)$.
-
Divide each by $k!$ and attach $(x-a)^k$.
Keeping a small table helps you stay organized and earn the points on a free-response question: list $k$, $f^{(k)}(x)$, $f^{(k)}(a)$, and $\dfrac{f^{(k)}(a)}{k!}$.
The graph shows $f(x)=1/x$ and its first two Taylor polynomials about $x=2$. Notice how the parabola hugs the curve much longer than the line does, and how both drift away as you move from $x=2$.
Find the second-degree Taylor polynomial $P_2(x)$ for $f(x)=\ln x$ about $x=1$. Show $f(1)$, $f'(1)$, and $f''(1)$.
Find the second-degree Taylor polynomial $P_2(x)$ for $f(x)=\ln x$ about $x=1$. Show $f(1)$, $f'(1)$, and $f''(1)$.
Find the second-degree Taylor polynomial for $f(x)=\sqrt x$ about $x=4$. Give each coefficient as a fraction.
Find the second-degree Taylor polynomial for $f(x)=\sqrt x$ about $x=4$. Give each coefficient as a fraction.
Maclaurin Polynomials
When the center is $a=0$, the Taylor polynomial gets a special name and a simpler look.
The most important one is $e^x$, because every derivative of $e^x$ is $e^x$, and $e^0=1$. So $f^{(k)}(0)=1$ for every $k$, and
$$e^x\approx 1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots+\frac{x^n}{n!}.$$Now we can close the opening question. With $n=3$ and $x=0.3$:
$$e^{0.3}\approx1+0.3+\frac{0.09}{2}+\frac{0.027}{6}=1+0.3+0.045+0.0045=1.3495.$$The calculator says $1.3498588\ldots$. We are within $0.0004$ using only arithmetic. Compare that with the tangent line, which gave $1.3$.
Each added term makes the polynomial follow $\sin x$ for a longer stretch before it peels away.
Write the Maclaurin polynomial of degree 4 for $f(x)=e^x$. Show the values $f^{(k)}(0)$ for $k=0,1,2,3,4$ that you use.
Write the Maclaurin polynomial of degree 4 for $f(x)=e^x$. Show the values $f^{(k)}(0)$ for $k=0,1,2,3,4$ that you use.
Find the Maclaurin polynomial of degree 3 for $f(x)=e^{2x}$. Then use it with $x=0.1$ to approximate $e^{0.2}$.
Find the Maclaurin polynomial of degree 3 for $f(x)=e^{2x}$. Then use it with $x=0.1$ to approximate $e^{0.2}$.
Taylor Polynomials from a Derivative or a Differential Equation
Sometimes you are not given $f$ itself. You may be given $f'$, or an equation like $\dfrac{dy}{dx}=2x-y$ together with a starting value. You can still find the derivatives at the center. You just differentiate the given information again and again, and substitute as you go.
A function $y=f(x)$ satisfies $\frac{dy}{dx}=x+y$ with $f(0)=1$. Find $f'(0)$, $f''(0)$, and $f'''(0)$ by differentiating the equation implicitly. Then write the…
A function $y=f(x)$ satisfies $\frac{dy}{dx}=x+y$ with $f(0)=1$. Find $f'(0)$, $f''(0)$, and $f'''(0)$ by differentiating the equation implicitly. Then write the third-degree Maclaurin polynomial for $f$.
A function $f$ satisfies $f(0)=3$ and $f'(x)=\sin(x^2)$. (a) Find $f''(x)$ and $f'''(x)$. (b) Find $f'(0)$, $f''(0)$, and $f'''(0)$, and write the third-degree Taylor…
A function $f$ satisfies $f(0)=3$ and $f'(x)=\sin(x^2)$. (a) Find $f''(x)$ and $f'''(x)$. (b) Find $f'(0)$, $f''(0)$, and $f'''(0)$, and write the third-degree Taylor polynomial of $f$ about $x=0$. (c) Does $f$ have a relative extremum at $x=0$? Use the sign of $f'$ near 0 to justify your answer.
Reading Information from a Taylor Polynomial
Everything works in reverse as well. If someone hands you $P_n(x)$, you can read off the derivative values at the center. Since the coefficient of $(x-a)^k$ is $\dfrac{f^{(k)}(a)}{k!}$,
$$f^{(k)}(a)=k!\cdot(\text{coefficient of }(x-a)^k).$$The third-degree Taylor polynomial for $g$ about $x=1$ is $P_3(x)=7+2(x-1)-\tfrac32(x-1)^2+\tfrac56(x-1)^3$. Find $g(1)$, $g'(1)$, $g''(1)$, and $g'''(1)$. Then say…
The third-degree Taylor polynomial for $g$ about $x=1$ is $P_3(x)=7+2(x-1)-\tfrac32(x-1)^2+\tfrac56(x-1)^3$. Find $g(1)$, $g'(1)$, $g''(1)$, and $g'''(1)$. Then say whether the graph of $g$ is concave up or concave down at $x=1$ and why.
Differentiating, Integrating, and Multiplying Taylor Polynomials
Once you have a Taylor polynomial for $f$, you can get polynomials for related functions without starting over.
Why does this work? Matching derivatives is preserved: differentiating $f$ and $P_n$ shifts every derivative down one level, and integrating shifts it up one level (with $g(a)=0$ as the new starting value).
The second-degree Taylor polynomial for $f$ about $x=3$ is $P_2(x)=4+5(x-3)-2(x-3)^2$. (a) Find $f(3)$, $f'(3)$, and $f''(3)$. (b) Use $P_2'(x)$ to approximate…
The second-degree Taylor polynomial for $f$ about $x=3$ is $P_2(x)=4+5(x-3)-2(x-3)^2$. (a) Find $f(3)$, $f'(3)$, and $f''(3)$. (b) Use $P_2'(x)$ to approximate $f'(3.2)$. (c) Use $\int_3^{3.5}P_2(x)\,dx$ to approximate $\int_3^{3.5}f(x)\,dx$ and give the answer as a fraction.
A function $f$ has $f(0)=1$, $f'(0)=2$, $f''(0)=-6$, and $f'''(0)=12$. (a) Write the third-degree Maclaurin polynomial for $f$. (b) Let $g(x)=\int_0^x f(t)\,dt$. Find…
A function $f$ has $f(0)=1$, $f'(0)=2$, $f''(0)=-6$, and $f'''(0)=12$. (a) Write the third-degree Maclaurin polynomial for $f$. (b) Let $g(x)=\int_0^x f(t)\,dt$. Find $g(0)$, $g'(0)$, $g''(0)$, $g'''(0)$, and $g^{(4)}(0)$ and write the fourth-degree Maclaurin polynomial for $g$. (c) Let $h(x)=x\,f(x)$. Write the fourth-degree Maclaurin polynomial for $h$ by multiplying.
How Good Is the Approximation?
A Taylor polynomial is built from information at one point, the center. So it is most trustworthy near the center and gets worse as $|x-a|$ grows. It also improves when you add terms.
Number line centered at x = a: in the central zone the approximation error is tiny, and on both sides, farther from the center, the error grows.Here is $P_3(x)=1+x+\dfrac{x^2}{2}+\dfrac{x^3}{6}$ for $e^x$, compared with the true value (calculator active):
| $x$ | $P_3(x)$ | $e^x$ | error $e^x-P_3(x)$ |
|---|---|---|---|
| 0.1 | 1.105167 | 1.105171 | 0.000004 |
| 0.5 | 1.645833 | 1.648721 | 0.002888 |
| 1 | 2.666667 | 2.718282 | 0.051615 |
| 2 | 6.333333 | 7.389056 | 1.055723 |
When $x$ moves from $0.1$ to $1$, ten times farther from the center, the error grows from about $0.000004$ to about $0.05$, which is more than ten thousand times larger. The reason is that the first term we left out, $\dfrac{x^4}{4!}$, has a fourth power of the distance. In general, the error of $P_n$ behaves like a constant times $|x-a|^{n+1}$. Halving the distance cuts the error by roughly $2^{n+1}$.
(Calculator active) Let $f(x)=\ln(1+x)$. (a) Write the Maclaurin polynomial $P_3(x)$. (b) Compute $P_3(0.5)$ and compare it with $f(0.5)$ to four decimal places. (c)…
(Calculator active) Let $f(x)=\ln(1+x)$. (a) Write the Maclaurin polynomial $P_3(x)$. (b) Compute $P_3(0.5)$ and compare it with $f(0.5)$ to four decimal places. (c) Compute $P_3(0.1)$ and its error. Explain, in terms of the distance from the center, why the error is so different in (b) and (c).
Summary
-
The Taylor polynomial of degree $n$ for $f$ about $x=a$ is $P_n(x)=\displaystyle\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k$. It matches $f$ and its first $n$ derivatives at $a$. A Maclaurin polynomial is the case $a=0$.
-
To build one: differentiate, evaluate the derivatives at $a$, divide by $k!$, and attach powers of $(x-a)$. Do not forget the factorials.
-
Useful Maclaurin polynomials: $e^x\approx1+x+\frac{x^2}{2}+\frac{x^3}{6}+\cdots$ and $\sin x\approx x-\frac{x^3}{6}+\frac{x^5}{120}$. For $e^{kx}$, $f^{(n)}(0)=k^n$.
-
If you are given $f'$ or a differential equation, differentiate repeatedly (implicitly if needed) and substitute the starting value. Reading backward, $f^{(k)}(a)=k!\cdot(\text{coefficient})$, and the signs of $f'(a)$ and $f''(a)$ tell you about increasing/decreasing and concavity.
-
Differentiate or integrate a Taylor polynomial term by term to get polynomials for $f'$ or $\int_a^x f$. Multiply and truncate for products.
-
The approximation is best near the center, and the error grows quickly with $|x-a|$. Closing the hook: $e^{0.3}\approx1.3495$ from $P_3$, versus the true value $1.3499$.
Can't find your problem here?
The AI checks one of your exercises: paste the problem with your answer or take a photo of it.