23. Taylor Series

d.1. Taylor Polynomial Approximation

We frequently approximate a convergent series, \(\displaystyle S=\sum_{n=0}^\infty a_n\), by one of its partial sums \(\displaystyle S_k=\sum_{n=0}^k a_n\). For a Taylor series the partial sums are called Taylor polynomials:

The Taylor polynomial of degree \(k\) centered at \(x=a\) for the function \(f(x)\) is \[\begin{aligned} T_k f(x) &=\sum_{n=0}^k \dfrac{\,f^{(n)}(a)}{n!}(x-a)^n \\ &=f(a)+f'(a)(x-a)+\dfrac{f''(a)}{2}(x-a)^2+\cdots+\dfrac{f^{(k)}(a)}{k!}(x-a)^k \end{aligned}\]

You should recognize the \(1^\text{st}\) degree Taylor polynomial, \[ T_1f(x)=f_{\tan}=f(a)+f'(a)(x-a) \] as the tangent line to the function which serves as the linear approximation to the function when \(x\) is sufficiently close to \(a\), as studied in Calculus 1. Similarly, the \(2^\text{nd}\) degree Taylor polynomial, \[ T_2f(x)=f_\text{quad}=f(a)+f'(a)(x-a)+\dfrac{f''(a)}{2}(x-a)^2 \] is the quadratic approximation to the function and the higher degree Taylor polynomials, \(T_k f(x)\), serve as higher degree approximations to the function. In other words, they are the polynomials which best fit the function in the neighborhood of \(x=a\). The \(k^\text{th}\) degree Taylor polynomial has the same value as the function at \(x=a\): \[ T_k f(a)=f(a) \] and also has the same derivatives at \(x=a\) up to order \(k\): \[ T_k f'(a)=f'(a),\quad T_k f''(a)=f''(a), \quad \cdots,\quad T_k f^{(k)}(a)=f^{(k)}(a) \] These approximations are the main use for Taylor series.

The following links show the graph of the indicated function along with several of its Taylor polynomials so that you can see how the Taylor polynomials approximate the function.

Use the cubic Taylor polynomial approximation to \(f(x)=x^{1/3}\) near \(x=8\) to approximate \(\sqrt[\scriptstyle 3]{8.1}\). Find an upper bound on the error in this approximation.

The function and three derivatives and their values at \(x=8\) are: \[\begin{array}{rlrl} f(x)&=x^{1/3}& f(8)&=2 \\[2pt] f'(x)&=\dfrac{1}{3}x^{-2/3}& f'(8)&=\dfrac{1}{3\cdot2^2} \\[5pt] f''(x)&=-\,\dfrac{2}{3^2}x^{-5/3}& f''(8)&=-\,\dfrac{2}{3^2\cdot2^5} \\[8pt] f'''(x)&=\dfrac{2\cdot5}{3^3}x^{-8/3}\quad& f'''(8)&=\dfrac{2\cdot5}{3^3\cdot2^8} \end{array}\] So the cubic Taylor polynomial is \[\begin{aligned} f(x) &\approx f(8)+f'(8)(x-8)+\dfrac{f''(8)}{2}(x-8)^2+\dfrac{f'''(8)}{3!}(x-8)^3 \\ x^{1/3} &\approx 2+\dfrac{1}{3\cdot2^2}(x-8)-\dfrac{2}{2!\cdot3^2\cdot2^5}(x-8)^2+ \dfrac{2\cdot5}{3!\cdot3^3\cdot2^8}(x-8)^3 \end{aligned}\] At \(x=8.1\), we have \[\begin{aligned} \sqrt[\scriptstyle 3]{8.1} &\approx 2+\dfrac{1}{3\cdot2^2}(8.1-8)-\dfrac{2}{2!\cdot3^2\cdot2^5}(8.1-8)^2+ \dfrac{2\cdot5}{3!\cdot3^3\cdot2^8}(8.1-8)^3 \\ &\approx 2+\dfrac{1}{3\cdot2^2}(.1)-\dfrac{2}{2!\cdot3^2\cdot2^5}(.01)+ \dfrac{2\cdot5}{3!\cdot3^3\cdot2^8}(.001) \\ &\approx2.008\,298\,852\,237 \end{aligned}\] Since the Taylor series is alternating (beyond the second term), the error in the approximation is bounded by the absolute value of the next term. The fourth derivative is \[\begin{array}{rlrl} f^{(4)}(x)&=-\,\dfrac{2\cdot5\cdot8}{3^4}x^{-11/3}\quad& f^{(4)}(8)&=-\,\dfrac{2\cdot5\cdot8}{3^4\cdot2^{11}} \end{array}\] So the fourth degree term in the Taylor series is \[ \dfrac{f^{(4)}(8)}{4!}(x-8)^4=-\,\dfrac{2\cdot5\cdot8}{4!\cdot3^4\cdot2^{11}}(x-8)^4 \] At \(x=8.1\), this is \[ \dfrac{f^{(4)}(8)}{4!}(8.1-8)^4 =-\,\dfrac{2\cdot5\cdot8}{4!\cdot3^4\cdot2^{11}}(.0001)\approx-2\times 10^{-9} \] This says our approximation for \(\sqrt[\scriptstyle 3]{8.1}\) is accurate to within \(\pm2\times 10^{-9}\) or at least \(8\) decimal places.

The actual value of \(\sqrt[\scriptstyle 3]{8.1}\) is \(\sqrt[\scriptstyle 3]{8.1}\approx2.008\,298\,850\,246\). Notice that \(8\) decimal places of the approximation agree with the exact answer.

This is not a very interesting problem since it is so much easier to type \(8.1\) into a calculator or computer and find its cube root. The reason we need to know how to do it, is because this is what is going on inside a calculator when you ask it to find \(\displaystyle \sqrt[\scriptstyle 3]{8.1}\). A more interesting problem is in the exercise below which has only partial information about the function.

At \(12\):\(00\) noon, the Weather Service at your local airport reports that the temperature is \(T(12)=80^\circ \text{F}\), is increasing at the rate of \(\dfrac{dT}{dt}=2\,\dfrac{^\circ\text{F}}{\text{hr}}\) and this increase is accelerating at \(\dfrac{d^2T}{dt^2}=0.4\,\dfrac{^\circ\text{F}}{\text{hr}^2}\). Use the quadratic Taylor polynomial approximation to estimate the temperature at \(12\):\(30\).

\(T(12.5)\approx81.05^\circ\text{F}\)

The quadratic Taylor polynomial approximation for \(T(t)\) at \(t=12\) is \[\begin{aligned} T(t)&\approx T(12)+T'(12)(t-12)+\dfrac{1}{2}T''(12)(t-12)^2 \\ &=80+2(t-12)+\dfrac{1}{2}0.4(t-12)^2 \end{aligned}\] At \(12\):\(30\), \(t=12.5\) and \[ T(12.5)\approx 80+2(0.5)+\dfrac{1}{2}0.4(0.5)^2=81.05^\circ\text{F} \]

Of course, there is no way to determine the error in this approximation because we do not know anything about the exact form of the temperature function.

© MYMathApps

Supported in part by NSF Grant #1123255