Part I · Chapter 4

Taylor series

A Taylor series rebuilds a function from its derivatives at a single point. This chapter recalls how the polynomials are formed, what each term contributes, and what it means for the series to converge.

Approximating a function by polynomials

Near a point cc, called the center, a function that has derivatives of every order can be approximated by polynomials built from its derivatives at cc:

TN(x)  =  f(c)  +  f′(c) (x−c)  +  f′′(c)2! (x−c)2  +  ⋯  +  f(N)(c)N! (x−c)NT_N(x) \;=\; f(c) \;+\; f'(c)\,(x-c) \;+\; \frac{f''(c)}{2!}\,(x-c)^{2} \;+\; \cdots \;+\; \frac{f^{(N)}(c)}{N!}\,(x-c)^{N}

Each term fixes one more thing about the graph at the point cc:

Adding a term never spoils what the earlier terms achieved, because (x−c)k(x-c)^{k} and its first k−1k-1 derivatives are all 0 at cc. The factor 1/k!1/k! is there because the kk-th derivative of (x−c)k(x-c)^{k} is k!k!. So TNT_N is the one polynomial of degree NN whose value and first NN derivatives at cc agree with those of ff.

Lab 4.1 the Taylor polynomials of sin x about a center c
sin xthe Taylor polynomial of degree N● the point (c, sin c)
Degree 0 is a horizontal line through the green point. Degree 1 is the tangent line there. Degree 2 bends the same way as the curve. Each further degree hugs the curve over a wider range around cc. The readout shows the polynomial with its coefficients worked out.

The Taylor series of ff about cc is what you get by never stopping:

∑k≥0f(k)(c)k! (x−c)k\sum_{k\ge 0} \frac{f^{(k)}(c)}{k!}\,(x-c)^{k}

Three series to know

All three are about the center c=0c = 0:

A Taylor series always converges on an interval that is symmetric about the center, ∣x−c∣<R|x - c| \lt R, and diverges for ∣x−c∣>R|x - c| \gt R. The number RR is the radius of convergence. It can be infinite, as for exe^{x}, or finite, as for 1/(1−x)1/(1-x), where R=1R = 1.

Lab 4.2 a function and its Taylor polynomials about the center 0
the functionits Taylor polynomial of degree Ndashed lines: the ends of the interval of convergence, when it is finite
For exe^{x} and sin⁡x\sin x, raising the degree makes the polynomial match the function on a wider and wider range. For the next three it matches only between the dashed lines, however high the degree. For the last function the polynomial is 0 at every degree.

Three things a Taylor series can do

So "has a Taylor series" and "equals its Taylor series" are different properties. Chapter 5 is about the functions that have the second one.

Things to try

  • In Lab 4.1, step the degree through 0, 1, 2, 3 and watch what each new term fixes. Then slide the center: the polynomial follows the green point along the curve.
  • In Lab 4.2, choose 1/(1+x2)1/(1+x^{2}) and raise the degree. Between −1 and 1 the fit improves; outside it gets worse, although the function itself is perfectly smooth there.
  • Choose the last function. No Taylor polynomial about 0 ever leaves the axis, while the function rises for x>0x \gt 0.

Exercises

  1. Compute the Taylor polynomial T3T_3 of ln⁡(1+x)\ln(1+x) about 0 and use it to estimate ln⁡1.1\ln 1.1.
    Solution

    The derivatives of ln⁡(1+x)\ln(1+x) at 0 are 1, −1, 2, so T3(x)  =  x−x22+x33T_3(x) \;=\; x - \frac{x^{2}}{2} + \frac{x^{3}}{3} At x=0.1x = 0.1 this is 0.1−0.005+0.000333=0.0953330.1 - 0.005 + 0.000333 = 0.095333. The true value is ln⁡1.1=0.095310\ln 1.1 = 0.095310.

  2. Find the Taylor polynomial T2T_2 of x\sqrt{x} about c=4c = 4 and use it to estimate 4.1\sqrt{4.1}.
    Solution

    f(4)=2f(4) = 2. f′(x)=12xf^{\prime}(x) = \dfrac{1}{2\sqrt{x}} gives f′(4)=14f^{\prime}(4) = \tfrac14, and f′′(x)=−14x3/2f^{\prime\prime}(x) = -\dfrac{1}{4x^{3/2}} gives f′′(4)=−132f^{\prime\prime}(4) = -\tfrac{1}{32}. So T2(x)  =  2+x−44−(x−4)264T_2(x) \;=\; 2 + \frac{x-4}{4} - \frac{(x-4)^{2}}{64} At x=4.1x = 4.1 this is 2+0.025−0.000156=2.0248442 + 0.025 - 0.000156 = 2.024844. The true value is 2.0248462.024846.

  3. Why is the coefficient of x3x^{3} in the series for sin⁡x\sin x equal to −16-\tfrac16?
    Solution

    The third derivative of sin⁡x\sin x is −cos⁡x-\cos x, which is −1-1 at 0. The coefficient is f′′′(0)3!=−16\dfrac{f^{\prime\prime\prime}(0)}{3!} = \dfrac{-1}{6}.

Check your understanding

  1. T1T_1 is the tangent line at cc. What does T2T_2 add to it?

    • A better value at cc
    • A term that makes the second derivative at cc right, so the polynomial bends the way the graph does
    • A correction far from cc only

    The term f′′(c)2(x−c)2\tfrac{f^{\prime\prime}(c)}{2}(x-c)^{2} is 0 at cc and has slope 0 there, so it leaves the value and the slope alone and fixes only the bending.

  2. In Lab 4.2 the polynomial of degree 8 for 1/(1+x2)1/(1+x^{2}) fits well between −1 and 1 and badly outside. Will a higher degree fix the fit at x=2x = 2?

    • Yes, eventually
    • Yes, but only for even degrees
    • No. x=2x = 2 is outside the radius of convergence, where adding terms makes the polynomial worse

    Inside ∣x∣<R|x| \lt R the polynomials converge to the function. Outside, the terms grow, and no degree helps.

  3. Every derivative of gg at 0 is 0. What is its Taylor series about 0, and does it equal gg?

    • The zero series. It converges everywhere but equals gg only for x≤0x \le 0
    • It has no Taylor series
    • The zero series, and so gg is 0 everywhere

    A Taylor series is built only from the derivatives at the center. It cannot know what the function does away from that point unless the function is analytic.