Week 10 Discussion Notes

Table of Contents

Power Series

Here is probably the most important thing you learn in this class:

Definition

Let F(x)=n=0an(xc)n\displaystyle F\p{x} = \sum_{n=0}^\infty a_n\p{x - c}^n. FF is called a power series and we call cc the center of FF.

Power series are great because they have a bunch of nice properties:

Proposition (properties of power series)

Let F(x)=n=0an(xc)n\displaystyle F\p{x} = \sum_{n=0}^\infty a_n\p{x - c}^n be a power series.

  1. There exists a number R[0,]R \in \br{0, \infty} called the radius of convergence of FF such that if xc<R\abs{x - c} < R, then FF converges absolutely and if xc>R\abs{x - c} > R, then FF diverges. If R=0R = 0, then the series only converges at its center and if R=R = \infty, then FF converges absolutely everywhere.

  2. The coefficients can be expressed in terms of the derivatives of FF:

    an=F(n)(c)n!a_n = \frac{F^{\p{n}}\p{c}}{n!}
  3. You can differentiate term-by-term, i.e., you can pretend the sum isn't there and take the derivative like normal:

    F(x)=n=1nan(xc)n1F'\p{x} = \sum_{n=1}^\infty na_n\p{x - c}^{n-1}

    FF' is also a power series and it has the same radius as FF.

  4. You can also integrate term-by-term:

    F(x)dx=C+n=0ann+1(xc)n+1\int F\p{x} \,\diff{x} = C + \sum_{n=0}^\infty \frac{a_n}{n+1} \p{x - c}^{n+1}

    Like FF', the antiderivative of FF is a power series with the same radius of convergence as FF.

The reason why power series are so important are because they're used for Taylor series:

Taylor Series

Taylor Polynomials

If you look in the previous section, given a power series FF, we know its derivatives right away from the coefficients. So, it's natural to wonder what happens if you go the other way, which is what Taylor series are all about.

Definition

Let ff be a function with nn derivatives. Then the nn-th Taylor polynomial centered at x=cx = c for ff is

Tn(x)=f(c)+f(c)(xc)+f(c)2(xc)2++f(n)(c)n!(xc)n=k=0nf(k)(c)k!(xc)k.\begin{aligned} T_n\p{x} &= f\p{c} + f'\p{c}\p{x - c} + \frac{f''\p{c}}{2}\p{x - c}^2 + \cdots + \frac{f^{\p{n}}\p{c}}{n!}\p{x - c}^n \\ &= \sum_{k=0}^n \frac{f^{\p{k}}\p{c}}{k!}\p{x - c}^k. \end{aligned}

If c=0c = 0, then the Taylor polynomial is also called the Maclaurin polynomial.

If n=1n = 1, then you get T1(x)=f(c)+f(c)(xc)T_1\p{x} = f\p{c} + f'\p{c}\p{x - c}, which is the tangent line to ff at x=cx = c, which is the linear function that best approximates ff near x=cx = c. Building off of that, we can interpret Tn(x)T_n\p{x} as the nn-th degree polynomial that best approximates ff near x=cx = c.

With this interpretation, a natural question is how good is this approximation? This is answered with the following error bound:

Theorem

Suppose f(n+1)f^{\p{n+1}} exists and is continuous. Then if f(n+1)(u)K\abs{f^{\p{n+1}}\p{u}} \leq K for all uu between cc and xx, then

Tn(x)f(x)K(n+1)!xcn+1.\abs{T_n\p{x} - f\p{x}} \leq \frac{K}{\p{n + 1}!}\abs{x - c}^{n+1}.

Notice that KK depends on xx, i.e., if you change xx, you have to recalculate KK. Also notice that if xx is really far away from cc, then xcn+1\abs{x - c}^{n+1} becomes very large, and if xx is really close to cc, then xcn+1\abs{x - c}^{n+1} becomes very small, which aligns with the interpretation that Tn(x)T_n\p{x} best approximates ff near x=cx = c.

Here's a helpful mnemonic to help you remember the error bound formula: if you have Tn(x)T_n\p{x}, then the "next term" in the polynomial would look like

f(n+1)(c)(n+1)!(xc)n+1.\frac{f^{\p{n+1}}\p{c}}{\p{n + 1}!}\p{x - c}^{n+1}.

Put everything in absolute values and replace f(n+1)(c)\abs{f^{\p{n+1}}\p{c}} with the upper bound KK, and that gives you

f(n+1)(c)(n+1)!xcn+1K(n+1)!xcn+1.\frac{\abs{f^{\p{n+1}}\p{c}}}{\p{n + 1}!}\abs{x - c}^{n+1} \rightsquigarrow \frac{K}{\p{n + 1}!}\abs{x - c}^{n+1}.

Taylor Series

Taylor polynomials already look like power series, except Taylor polynomials are finite sums. Once you turn it into an infinite sum, you get a Taylor series:

Definition

Let ff be an infinitely differentiable function. Then the Taylor series of ff at x=cx = c is

T(x)=n=0f(n)(c)n!(xc)n.T\p{x} = \sum_{n=0}^\infty \frac{f^{\p{n}}\p{c}}{n!}\p{x - c}^n.

If c=0c = 0, then T(x)T\p{x} is also called the Maclaurin series of ff.

You would hope that because Taylor polynomials are good approximations of ff that Taylor series should be an "infinitely good" approximation of ff, i.e., the Taylor series of ff converges to ff. Unfortunately, that isn't always the case.

Example 1.

Let

f(x)={e1/x2if x0,0if x=0.f\p{x} = \begin{cases} e^{-1/x^2} & \text{if } x \neq 0, \\ 0 & \text{if } x = 0. \end{cases}

Then ff has the (unfortunate) property that f(n)(0)=0f^{\p{n}}\p{0} = 0 for all n1n \geq 1. This means that the Taylor series of ff is given by T(x)=0T\p{x} = 0, which means that T(x)T\p{x} only converges to ff at the center x=0x = 0.

On the other hand, there are still a lot of functions whose Taylor series do converge to their associated function.

Proposition (common Taylor series expansions)

The following functions have Taylor series which converge to them on the specified interval:

f(x)=T(x)ex=n=0xnn!=1+x+x22!+x33!+for xRsinx=n=0(1)nx2n+1(2n+1)!=xx33!+x55!x77!+for xRcosx=n=0(1)nx2n(2n)!=1x22!+x44!x66!+for xR11x=n=0xn=1+x+x2+x3+for x(1,1)\begin{array}{rcllll} f\p{x} & = & T\p{x} \\[1ex] \hline \\[-1ex] e^x & = & \displaystyle\sum_{n=0}^\infty \frac{x^n}{n!} & = & \displaystyle 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots & \text{for } x \in \R \\[3ex] \sin{x} & = & \displaystyle\sum_{n=0}^\infty \p{-1}^n\frac{x^{2n+1}}{\p{2n+1}!} & = & \displaystyle x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots & \text{for } x \in \R \\[3ex] \cos{x} & = & \displaystyle\sum_{n=0}^\infty \p{-1}^n\frac{x^{2n}}{\p{2n}!} & = & \displaystyle 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots & \text{for } x \in \R \\[3ex] \displaystyle\frac{1}{1 - x} & = & \displaystyle\sum_{n=0}^\infty x^n & = & \displaystyle 1 + x + x^2 + x^3 + \cdots & \text{for } x \in \p{-1, 1} \end{array}

Here, n!=123(n1)nn! = 1 \cdot 2 \cdot 3 \cdots \p{n-1} \cdot n with 0!=10! = 1.

From these, you can derive a lot of other Taylor series as well.

Example 2.

Find the Maclaurin series for arctanx\arctan{x}.

Solution.

We can start with the geometric series:

11x=n=0xn.\frac{1}{1 - x} = \sum_{n=0}^\infty x^n.

If we replace xx with x2-x^2, then we get

11+x2=n=0(1)nx2n.\frac{1}{1 + x^2} = \sum_{n=0}^\infty \p{-1}^n x^{2n}.

Integrating on both sides,

arctanx=C+n=0(1)nx2n+12n+1.\arctan{x} = C + \sum_{n=0}^\infty \p{-1}^n\frac{x^{2n+1}}{2n + 1}.

To solve for the constant, we can plug in 00 on both sides which gives C=0C = 0, so

arctanx=n=0(1)nx2n+12n+1for x<1.\arctan{x} = \sum_{n=0}^\infty \p{-1}^n \frac{x^{2n+1}}{2n + 1} \quad\text{for } \abs{x} < 1.

Examples

Example 3.

Calculate n=1nxn\displaystyle \sum_{n=1}^\infty nx^n.

Solution.

We can start with the geometric series and differentiate term-by-term:

11x=n=0xn    1(1x)2=n=1nxn1.\frac{1}{1 - x} = \sum_{n=0}^\infty x^n \implies \frac{1}{\p{1 - x}^2} = \sum_{n=1}^\infty nx^{n-1}.

We're really close--we're just off by a factor xx, which we can just multiply in:

n=1nxn=x(1x)2.\sum_{n=1}^\infty nx^n = \boxed{\frac{x}{\p{1 - x}^2}}.
Example 4.

Find the interval of convergence of n=13nxnn3\displaystyle \sum_{n=1}^\infty \frac{3^nx^n}{n^3}.

Solution.

When calculating intervals of convergence, you should always start with the root test or ratio test. In this problem, I'm going to use the ratio test:

limn3n+1xn+1(n+1)3n33nxn=limn3x(nn+1)3=3x.\lim_{n\to\infty} \abs{\frac{3^{n+1}x^{n+1}}{\p{n+1}^3} \cdot \frac{n^3}{3^nx^n}} = \lim_{n\to\infty} \abs{3x} \cdot \p{\frac{n}{n + 1}}^3 = \abs{3x}.

Thus, the series converges if 3x<1    x<13\abs{3x} < 1 \iff \abs{x} < \frac{1}{3} and diverges if 3x>1    x>13\abs{3x} > 1 \iff \abs{x} > \frac{1}{3}.

After calculating the radius of convergence, you always want to check the endpoints next:

x=13x = \frac{1}{3}: Substituting in, the series becomes

n=13n13nn3=n=11n3,\sum_{n=1}^\infty \frac{3^n\frac{1}{3^n}}{n^3} = \sum_{n=1}^\infty \frac{1}{n^3},

which converges by pp-series.

x=13x = -\frac{1}{3}: Similarly,

n=13n(1)n3nn3=n=1(1)nn3,\sum_{n=1}^\infty \frac{3^n\frac{\p{-1}^n}{3^n}}{n^3} = \sum_{n=1}^\infty \frac{\p{-1}^n}{n^3},

which converges absolutely by pp-series (or if you like, it converges by the alternating series test).

So, overall, the interval of convergence is

[13,13].\boxed{\br{-\frac{1}{3}, \frac{1}{3}}}.
Example 5.

Find nn such that eTn(1)<108\abs{e - T_n\p{1}} < 10^{-8}, where TnT_n is the nn-th Maclaurin polynomial for f(x)=exf\p{x} = e^x.

Solution.

We want to use the error bound. The first step would be to figure out what KK is in this case: f(n+1)(u)=exf^{\p{n+1}}\p{u} = e^x. Since exe^x is an increasing function, it is bounded at the largest value of xx possible, which is, in this case, is at x=1x = 1, so we can use K=e1=eK = e^1 = e. The theorem then tells us that

eTn(1)e1n+1(n+1)!=e(n+1)!<108.\abs{e - T_n\p{1}} \leq \frac{e\abs{1}^{n+1}}{\p{n + 1}!} = \frac{e}{\p{n + 1}!} < 10^{-8}.

To finish off the problem, we need to solve for nn that makes the last inequality true. You can do this by plugging in numbers into your calculator (e.g., try n=1,2,3,n = 1, 2, 3, \ldots since nn is an integer). You should end up finding that the first nn that works is

n=11.\boxed{n = 11}.
Example 6.

Calculate 1π2422!+π4444!π6466!+\displaystyle 1 - \frac{\pi^2}{4^2 \cdot 2!} + \frac{\pi^4}{4^4 \cdot 4!} - \frac{\pi^6}{4^6 \cdot 6!} + \cdots.

Solution.

Whenever you see a problem like, you always want to figure out the pattern. After some trial and error, you should end up with

n=0(1)nπ2n42n(2n)!.\sum_{n=0}^\infty \p{-1}^n \frac{\pi^{2n}}{4^{2n}\p{2n}!}.

The 2n2n's should hopefully be familiar to you--compare the sum to

cosx=n=0(1)nx2n(2n)!.\cos{x} = \sum_{n=0}^\infty \p{-1}^n \frac{x^{2n}}{\p{2n}!}.

If you close enough, you'll see that the sum is just the power series of cosx\cos{x} evaluated at x=π4x = \frac{\pi}{4}, i.e.,

n=0(1)nπ2n42n(2n)!=cosπ4=22.\sum_{n=0}^\infty \p{-1}^n \frac{\pi^{2n}}{4^{2n}\p{2n}!} = \cos\frac{\pi}{4} = \boxed{\frac{\sqrt{2}}{2}}.
Example 7.

Calculate n=22n+3n!\displaystyle \sum_{n=2}^\infty \frac{2^{n+3}}{n!}.

Solution.

Like the previous problem, we're going to want to use a Taylor series to calculate this. The n!n! should alert you to exe^x, which has the expansion

ex=n=0xnn!.e^x = \sum_{n=0}^\infty \frac{x^n}{n!}.

It looks close, but we need to fiddle with our series first to get it into the right form. For example, the index is off.

n=22n+3n!=23n=22nn!=8(n=02nn!200!211!)=8(e212)=8(e23).\begin{aligned} \sum_{n=2}^\infty \frac{2^{n+3}}{n!} = 2^3 \sum_{n=2}^\infty \frac{2^n}{n!} &= 8\p{\sum_{n=0}^\infty \frac{2^n}{n!} - \frac{2^0}{0!} - \frac{2^1}{1!}} \\ &= 8\p{e^2 - 1 - 2} \\ &= \boxed{8\p{e^2 - 3}}. \end{aligned}