4.5: Taylor's Theorem
- Page ID
- 49117
\( \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}\)In this section, we prove a result that lets us approximate differentiable functions by polynomials.
Let \(n\) be a positive integer. Suppose \(f:[a, b] \rightarrow \mathbb{R}\) is a function such that \(f^{(n)}\) is continuous on \([a, b]\), and \(f^{(n+1)}(x)\) exists for all \(x \in (a, b)\). Let \(\bar{x} \in [a, b]\). Then for any \(x \in [a, b]\) with \(x \neq \bar{x}\), there exists a number \(c\) in between \(\bar{x}\) and \(x\) such that \[f(x)=P_{n}(x)+\frac{f^{(n+1)}(c)}{(n+1) !}(x-\bar{x})^{n+1} ,\] where \[P_{n}(x)=\sum_{k=0}^{n} \frac{f^{(k)}(\bar{x})}{k !}(x-\bar{x})^{k} .\]
- Proof
-
Let \(\bar{x}\) be as in the statement and let us fix \(x \neq \bar{x}\). SInce \(x-\bar{x} \neq 0\), there exists a number \(\lambda \in \mathbb{R}\) such that \[f(x)=P_{n}(x)+\frac{\lambda}{(n+1) !}(x-\bar{x})^{n+1} .\] We will now show that \[\lambda=f^{(n+1)}(c) ,\] for some \(c\) in between \(\bar{x}\) and \(x\).
Consider the function \[g(t)=f(x)-\sum_{k=0}^{n} \frac{f^{(k)}(t)}{k !}(x-t)^{k}-\frac{\lambda}{(n+1) !}(x-t)^{n+1} .\] Then \[g(\bar{x})=f(x)-\sum_{k=0}^{n} \frac{f^{(k)}(\bar{x})}{k !}(x-\bar{x})^{k}-\frac{\lambda}{(n+1) !}(x-\bar{x})^{n+1}=f(x)-P_{n}(x)-\frac{\lambda}{(n+1) !}(x-\bar{x})^{n+1}=0 .\] and \[g(x)=f(x)-\sum_{k=0}^{n} \frac{f^{(k)}(x)}{k !}(x-x)^{k}-\frac{\lambda}{(n+1) !}(x-x)^{n+1}=f(x)-f(x)=0 .\] By Rolle's theorem, there exists \(c\) in between \(\bar{x}\) and \(x\) such that \(g^{\prime}(c)=0\). Taking the derivative of \(g\) (keeping in mind that \(x\) is fixed and the independent variable is \(t\)) and using the product rule for derivatives, we have \[\begin{aligned}
g^{\prime}(c) &=-f^{\prime}(c)+\sum_{k=1}^{n}\left(-\frac{f^{(k+1)}(c)}{k !}(x-c)^{k}+\frac{f^{(k)}(c)}{(k-1) !}(x-c)^{k-1}\right)+\frac{\lambda}{n !}(x-c)^{n} \\
&=\frac{\lambda}{n !}(x-c)^{n}-\frac{1}{n !} f^{(n+1)}(c)(x-c)^{n} \\
&=0 \text {.}
\end{aligned}\] This implies \(\lambda=f^{(n+1)}(c)\). The proof is now complete. \(\square\)
The polynomial \(P_{n}(x)\) given in the theorem is called the \(n\)-th Taylor polynomial of \(f\) at \(\bar{x}\).
The conclusion of Taylor's theorem still holds true if \(x = \bar{x}\). In this case, \(c = x = \bar{x}\).
We will use Taylor's theorem to estimate the error in approximating the function \(f(x)=\sin x\) with it 3rd Taylor polynomial at \(\bar{x} = 0\) on the interval \([-\pi / 2, \pi / 2]\).
Solution
Since \(f^{\prime}(x)=\cos x\), \(f^{\prime \prime}(x)=-\sin x\) and \(f^{\prime \prime \prime}(x)=-\cos x\), a direct calculation shows that \[P_{3}(x)=x-\frac{x^{3}}{3 !} .\]
Moreover, for any \(c \in \mathbb{R}\) we have \(\left|f^{(4)}(c)\right|=|\sin c| \leq 1\). Therefore, for \(x \in[-\pi / 2, \pi / 2]\) we get (for some \(c\) between \(x\) and \(0\)), \[\left|\sin x-P_{3}(x)\right|=\frac{\left|f^{(4)}(c)\right|}{4 !}|x| \leq \frac{\pi / 2}{4 !} \leq 0.066 .\]
Let \(n\) be an even positive integer. Suppose \(f^{(n)}\) exists and continuous on \((a, b)\). Let \(\bar{x} \in (a, b)\). satisfy \[f^{\prime}(\bar{x})=\ldots=f^{(n-1)}(\bar{x})=0 \text { and } f^{(n)}(\bar{x}) \neq 0 .\] The following hold:
- \(f^{(n)}(\bar{x})>0\) if and only if \(f\) has a local minimum at \(\bar{x}\).
- \(f^{(n)}(\bar{x})<0\) if and only if \(f\) has a local maximum at \(\bar{x}\).
- Proof
-
We will prove (a). Suppose \(f^{(n)}(\bar{x})>0\). Since \(f^{(n)}(\bar{x})>0\) and \(f^{(n)}\) is conitnuous at \(\bar{x}\), there exists \(\delta > 0\) such that \[f^{(n)}(t)>0 \text { for all } t \in B(\bar{x} ; \delta) \subset(a, b) .\] Fix any \(x \in B(\bar{x} ; \delta)\). By Taylor's theorem and the given assumption, there exists \(c\) in between \(\bar{x}\) and \(x\) such that \[f(x)=f(\bar{x})+\frac{f^{(n)}(c)}{n !}(x-\bar{x})^{n} .\] Since \(n\) is even and \(c \in B(\bar{x} ; \delta)\) we have \(f(x) \geq f(\bar{x})\). Thus, \(f\) has a local minimum at \(\bar{x}\).
Now, for the converse, suppose that \(f\) has a local minimum at \(\bar{x}\). Then there exists \(\delta > 0\) such that \[f(x) \geq f(\bar{x}) \text { for all } x \in B(\bar{x} ; \delta) \subset(a, b) .\] Fix a sequence \(\left\{x_{k}\right\}\) in \((a, b)\) that converges to \(\bar{x}\) with \(x_{k} \neq \bar{x}\) for every \(k\). By Taylor's theorem, there exists a sequence \(\left\{c_{k}\right\}\), with \(x_{k} \neq \bar{x}\) for every \(k\). By Taylor's theorem, there exists a sequence \(\left\{c_{k}\right\}\), with \(c_{k}\) between \(x_{k}\) and \(\bar{x}\) for each \(k\), such that \[f\left(x_{k}\right)=f(\bar{x})+\frac{f^{(n)}\left(c_{k}\right)}{n !}\left(x_{k}-\bar{x}\right)^{n} .\] Since \(x_{k} \in B(\bar{x} ; \delta)\) for sufficiently large \(k\), we have \[f\left(x_{k}\right) \geq f(\bar{x})\] for such \(k\). It follows that \[f\left(x_{k}\right)-f(\bar{x})=\frac{f^{(n)}\left(c_{k}\right)}{n !}\left(x_{k}-\bar{x}\right)^{n} \geq 0 .\] This implies \(f^{(n)}\left(c_{k}\right) \geq 0\) for such \(k\). Since \(\left\{c_{k}\right\}\) converges to \(\bar{x}\), \(f^{(n)}(\bar{x})=\lim _{k \rightarrow \infty} f^{(n)}\left(c_{k}\right) \geq 0\).
The proof of (b) is similar. \(\square\)
Consider the function \(f(x)=x^{2} \cos x\) defined on \(\mathbb{R}\).
Solution
Then \(f^{\prime}(x)=2 x \cos x-x^{2} \sin x\) and \(f^{\prime \prime}(x)=2 \cos x-4 x \sin x-x^{2} \cos x\). Then \(f(0)=f^{\prime}(0)=0\) and \(f^{\prime \prime}(0)=2>0\). It follows from the previous theorem that \(f\) has a local minimum at \(0\). Notice, by the way, that since \(f(0)=0\) and \(f(\pi)<0\), \(0\) is not a global minimum.
Consider the function \(f(x)=-x^{6}+2 x^{5}+x^{4}-4 x^{3}+x^{2}+2 x-3\) defined on \(\mathbb{R}\).
Solution
A direct calculations shows \(f^{\prime}(1)=f^{\prime \prime}(1)=f^{\prime \prime \prime}(1)=f^{(4)}(1)=0\) and \(f^{(5)}(1)<0\). It follows from the previous theorem that \(f\) has a local maximum at \(1\).
Exercise \(\PageIndex{1}\)
Use Taylor's theorem to prove that \[e^{x}>\sum_{k=0}^{m} \frac{x^{k}}{k !}\] for all \(x >0\) and \(m \in \mathbb{N}\).
- Answer
-
Add texts here. Do not delete this text
Exercise \(\PageIndex{1}\)
Add exercises text here.
- Answer
-
Add texts here. Do not delete this text first.
first.
Exercise \(\PageIndex{2}\)
Find the 5th Taylor polynomial, \(P_{5}(x)\), at \(\bar{x} = 0\) for \(\cos x\). Determine an upper bound for the error \(\left|P_{5}(x)-\cos x\right|\) for \(x \in[-\pi / 2, \pi / 2]\).
- Answer
-
Add texts here. Do not delete this text first.
Exercise \(\PageIndex{3}\)
Use Theorem 4.5.3 to determine if the following functions have a local minimum or a local maximum at the indicated points.
- \(f(x)=x^{3} \sin x \text { at } \bar{x}=0\).
- \(f(x)=(1-x) \ln x \text { at } \bar{x}=1\).
- Answer
-
Add texts here. Do not delete this text first.
Exercise \(\PageIndex{4}\)
Suppose \(f\) is twice differentiable on \((a, b)\). Show that for every \(x \in (a, b)\), \[\lim _{h \rightarrow 0} \frac{f(x+h)+f(x-h)-2 f(x)}{h^{2}}=f^{\prime \prime}(x) .\]
- Answer
-
Add texts here. Do not delete this text first.
Exercise \(\PageIndex{5}\)
- Suppose \(f\) is three times differentiable on \((a, b)\) and \(\bar{x} \in (a, b)\). Prove that \[\lim _{h \rightarrow 0} \frac{f(\bar{x}+h)-f(\bar{x})-f^{\prime}(\bar{x}) \frac{h}{1 !}-f^{\prime \prime}(\bar{x}) \frac{h^{2}}{2 !}}{h^{3}}=\frac{f^{\prime \prime \prime}(\bar{x})}{3 !} . \]
- State and prove a more general result for the case where \(f\) is \(n\) times differentiable on \((a, b)\).
- Answer
-
Add texts here. Do not delete this text first.
Exercise \(\PageIndex{6}\)
Suppose \(f\) is \(n\) times differentiable on \((a, b)\) and \(\bar{x} \in (a, b)\). Define \[P_{n}(h)=\sum_{k=0}^{n} f^{(n)}(\bar{x}) \frac{h^{n}}{n !} \text { for } h \in \mathbb{R}\] Prove that \[\lim _{h \rightarrow 0} \frac{f(\bar{x}+h)-P_{n}(h)}{h^{n}}=0 .\] (Thus, we have \[f(\bar{x}+h)=P_{n}(h)+g(h) ,\] where \(g\) is a function that satisfies \(\lim _{h \rightarrow 0} \frac{g(h)}{h^{n}}=0\). This is called the Taylor expansion with Peano's remainder.)
- Answer
-
Add texts here. Do not delete this text first.