Hosted by CoCalc
Download

#Power Series

Definition: A power series centered at x=ax=a is a series of the form n=0[cn(xa)n]=c0+c1(xa)+c2(xa)2+\sum_{n=0}^{\infty}\left[c_n\cdot(x-a)^n\right]=c_0+c_1\cdot(x-a)+c_2\cdot(x-a)^2+\cdots

where aa and all the cic_i are constants.

Notice that a power series is a function of xx in the sence that given a choice of xx, an infinite series is given and, if it converges, outputs a value. Therefore the domain of a power series defined function is all values of xx for which the series converges. Notice that there is always at least one number in the domain, namely aa. Where

f(a)=n=0cn(aa)=c0f(a)=\sum_{n=0}^{\infty}c_{n}(a-a)=c_{0}

You can think of a power series as a "infinite polynomial". (But as we have seen this semester, to define such an "infinite polynomial" we need a limit.)

For us, unless otherwise noted, we'll take the center point to be zero. This gives us power series of the form,

f(x)=n=0cnxn=c0+c1x+c2x2+c3x3+c4x4+f(x)=\sum_{n=0}^{\infty}c_{n}x^{n}=c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+\cdots

###Example 1

A geometric series with xx as the common ratio is a simple example of a power series (a=0a=0 and ci=cc_i=c for all ii):

n=0cxn\sum_{n=0}^{\infty}c\cdot x^n

We know when this series converges and what it coverges to:

n=0cxn=c1x\sum_{n=0}^{\infty}c\cdot x^n=\frac{c}{1-x}

provided that 1<x<1-1 < x < 1.

So n=0cxn\displaystyle\sum_{n=0}^{\infty}c\cdot x^n is a function with domain (1,1)(-1,1). On this domain, this power series function happens to be equal to the function f(x)=c1x\displaystyle f(x)=\frac{c}{1-x}.

Sage will also compute the "closed" form of our geometric series as well.

n=var('n') c=var('c') assume(abs(x)-1<0) #Sum only converges when abs(x)<1 or abs(x)-1<0 sum(c*x^n,n,0,+Infinity) forget()
-c/(x - 1)

###Partial Sums of Power Series

Recall that from our work with Infinite Series that for a convergent series, the sequence of partial sums SNS_{N} could be used to approximate the sum value provided that we picked NN large enough. We can do the same for our Power Series and form a partial sum SNS_{N},

SN(x)=n=0Ncnxn=c0+c1x+c2x2++cNxNS_{N}(x)=\sum_{n=0}^{N}c_{n}x^{n}=c_{0}+c_{1}x+c_{2}x^{2}+\cdots+c_{N}x^{N}

Hence, the sequence of partial sums gives a sequence of polynomials that converge to the power series.

Let's look at a geometric series example to see how the sequence of partial sums converges to the series sum.

In particular let's look at f(x)=n=03(xn2n)=31x2=62xf(x)=\sum_{n=0}^{\infty}3\left(\frac{x^n}{2^n}\right)=\frac{3}{1-\frac{x}{2}}=\frac{6}{2-x}

which converges for values of xx such that x2<1\left|\frac{x}{2}\right|<1 or 2<x<2-2<x<2.

plot(6/(2-x),x,-2,2,ymax=50)

The sequence of partial sums of this power series begins as:

S0=3S_{0}=3S1=3+3(x2)S_{1}=3+3\left(\frac{x}{2}\right)S2=3+3(x2)+3(x2)2S_{2}=3+3\left(\frac{x}{2}\right)+3\left(\frac{x}{2}\right)^2S3=3+3(x2)+3(x2)2+3(x2)3S_{3}=3+3\left(\frac{x}{2}\right)+3\left(\frac{x}{2}\right)^2+3\left(\frac{x}{2}\right)^3S4=3+3(x2)+3(x2)2+3(x2)3+3(x2)4S_{4}=3+3\left(\frac{x}{2}\right)+3\left(\frac{x}{2}\right)^2+3\left(\frac{x}{2}\right)^3+3\left(\frac{x}{2}\right)^4
N=10 #Partial Sum Term show(sum(3*(x/2)^n,n,0,N)) plot(6/(2-x),x,-2,2,ymax=50)+plot(sum(3*(x/2)^n,n,0,N),x,-2,2,color='red')
31024x10+3512x9+3256x8+3128x7+364x6+332x5+316x4+38x3+34x2+32x+3\displaystyle \frac{3}{1024} \, x^{10} + \frac{3}{512} \, x^{9} + \frac{3}{256} \, x^{8} + \frac{3}{128} \, x^{7} + \frac{3}{64} \, x^{6} + \frac{3}{32} \, x^{5} + \frac{3}{16} \, x^{4} + \frac{3}{8} \, x^{3} + \frac{3}{4} \, x^{2} + \frac{3}{2} \, x + 3
Notice that the more terms we take in the partial sum, the closer the polynomial (Red Graph) is to the actual power series value. (Blue graph) We can use this to help us to estimate the limiting function, even if it is something that we may not be able to easily compute directly. Notice below that Sage knows some routines to detmine the closed form of the power series.
assume(abs(x)-2<0) ##make sure that the series converges for x sum(3*(x/2)^n,n,0,+Infinity) forget()
-6/(x - 2)

###Example 2

Consider the power series centered a=0a=0,

n=0n(2x)n\sum_{n=0}^{\infty} n(2x)^n

For which values of xx does this power series converge? We utilize the ratio test. Recall that the ratio test says that a series converges (absolutely) if the limit of the ratio of the (n+1)st and nth terms is less than one.

For our series, we have limn(n+1)(2x)n+1n(2x)n=limnn+1n2x=2x.\lim_{n\rightarrow\infty}\left|\frac{(n+1)(2x)^{n+1}}{n(2x)^{n}}\right|=\lim_{n\rightarrow\infty}\frac{n+1}{n}\left|2x\right|=|2x|.

Thus, if 2x<1|2x|<1 or 1/2<x<1/2-1/2<x<1/2 the series converges by the ratio test. Unlike the previous example where we could use the geometric series formula to find what the series converges to, we will look at the sequence of partial sums to gain some insight into the limit function.

n=var('n') c(n)=n*(2*x)^n limit(abs(c(n+1)/c(n)),n=+Infinity)
2*abs(x)
N=20 #Partial Sum Term show(sum(n*(2*x)^n,n,0,N)) plot(sum(n*(2*x)^n,n,0,N),x,-1/2,1/2,color='red',ymax=10)
20971520x20+9961472x19+4718592x18+2228224x17+1048576x16+491520x15+229376x14+106496x13+49152x12+22528x11+10240x10+4608x9+2048x8+896x7+384x6+160x5+64x4+24x3+8x2+2x\displaystyle 20971520 \, x^{20} + 9961472 \, x^{19} + 4718592 \, x^{18} + 2228224 \, x^{17} + 1048576 \, x^{16} + 491520 \, x^{15} + 229376 \, x^{14} + 106496 \, x^{13} + 49152 \, x^{12} + 22528 \, x^{11} + 10240 \, x^{10} + 4608 \, x^{9} + 2048 \, x^{8} + 896 \, x^{7} + 384 \, x^{6} + 160 \, x^{5} + 64 \, x^{4} + 24 \, x^{3} + 8 \, x^{2} + 2 \, x

We can see if Sage knows what the actual value is like for Example 1

assume(abs(2*x)<1) show(sum(n*(2*x)^n,n,0,+Infinity)) forget()
2x4x24x+1\displaystyle \frac{2 \, x}{4 \, x^{2} - 4 \, x + 1}

Let's see if the partial sums do converget to this function:

plot(sum(n*(2*x)^n,n,0,N),x,-1/2,1/2,color='red',ymax=10)+plot((2*x)/(4*x^2-4*x+1),x,-1/2,1/2)

###Example 3

For this example consider the power series J0(x)=n=0(1)nx2n4n(n!)2J_{0}(x)=\sum_{n=0}^{\infty}\frac{(-1)^n x^{2n}}{4^{n}(n!)^2}

This series converges for all values of xx as using the ratio test shows,

limn(1)n+1x2n+24n+1((n+1)!)24n(n!)2(1)nx2n=limnx24(n+1)2=0\lim_{n\rightarrow\infty}\left|\frac{(-1)^{n+1} x^{2n+2}}{4^{n+1}((n+1)!)^2}\frac{4^{n}(n!)^2}{(-1)^n x^{2n}}\right|=\lim_{n\rightarrow\infty}\left|\frac{x^{2}}{4(n+1)^2}\right|=0

for all xx. We can confim this using Sage:

n=var('n') c(n)=(-1)^n*x^(2*n)/(4^n*factorial(n)^2) limit(abs(c(n+1)/c(n)),n=+Infinity)
0

Let's plot some of the partial sums:

N=10 #Partial Sum Term show(sum((-1)^n*x^(2*n)/(4^n*factorial(n)^2),n,0,N)) plot(sum((-1)^n*x^(2*n)/(4^n*factorial(n)^2),n,0,N),x,-20,20,color='red',ymax=1.5,ymin=-1.5)
113807847410237440000x20134519618525593600x18+1106542032486400x161416179814400x14+12123366400x12114745600x10+1147456x812304x6+164x414x2+1\displaystyle \frac{1}{13807847410237440000} \, x^{20} - \frac{1}{34519618525593600} \, x^{18} + \frac{1}{106542032486400} \, x^{16} - \frac{1}{416179814400} \, x^{14} + \frac{1}{2123366400} \, x^{12} - \frac{1}{14745600} \, x^{10} + \frac{1}{147456} \, x^{8} - \frac{1}{2304} \, x^{6} + \frac{1}{64} \, x^{4} - \frac{1}{4} \, x^{2} + 1

This function J0(x)J_{0}(x) is called the Bessel Function of order 0 and is very important in engineering and physics applications.

###Example 4 (Ex 1 Revisited) From Example 1, we saw that f(x)=n=03(xn2n)=31x2=612xf(x)=\sum_{n=0}^{\infty}3\left(\frac{x^n}{2^n}\right)=\frac{3}{1-\frac{x}{2}}=\frac{6}{1-2x} What do we find if we differentiate or integrate this?

Differentiating the left and right sides shows:

6(2x)2=(32x)=n=032n(x2)n1\frac{6}{(2-x)^2}=\left(\frac{3}{2-x}\right)'=\sum_{n=0}^{\infty}\frac{3}{2}n\left(\frac{x}{2}\right)^{n-1}

We can see that the series seems to converge looking at its partial sums:

N=10 #Partial Sum Term show(sum(3/2*n*(x/2)^(n-1),n,0,N)) plot(6/(2-x)^2,x,-2,2,ymax=50)+plot(sum(3/2*n*(x/2)^(n-1),n,0,N),x,-2,2,color='red')
15512x9+27512x8+332x7+21128x6+932x5+1532x4+34x3+98x2+32x+32\displaystyle \frac{15}{512} \, x^{9} + \frac{27}{512} \, x^{8} + \frac{3}{32} \, x^{7} + \frac{21}{128} \, x^{6} + \frac{9}{32} \, x^{5} + \frac{15}{32} \, x^{4} + \frac{3}{4} \, x^{3} + \frac{9}{8} \, x^{2} + \frac{3}{2} \, x + \frac{3}{2}

For integration, we find that 3ln(2x)+C=3(2x)dx=n=03n+1(x2)n+1+C-3\ln(2-x)+C=\int\frac{3}{(2-x)}dx=\sum_{n=0}^{\infty}\frac{3}{n+1}\left(\frac{x}{2}\right)^{n+1}+C

N=10 #Partial Sum Term show(sum(3/(n+1)*(x/2)^(n+1),n,0,N)) plot(-3*log(2-x),x,-2,2,ymax=10)+plot(sum(3/(n+1)*(x/2)^(n+1),n,0,N),x,-2,2,color='red')
322528x11+310240x10+11536x9+32048x8+3896x7+1128x6+3160x5+364x4+18x3+38x2+32x\displaystyle \frac{3}{22528} \, x^{11} + \frac{3}{10240} \, x^{10} + \frac{1}{1536} \, x^{9} + \frac{3}{2048} \, x^{8} + \frac{3}{896} \, x^{7} + \frac{1}{128} \, x^{6} + \frac{3}{160} \, x^{5} + \frac{3}{64} \, x^{4} + \frac{1}{8} \, x^{3} + \frac{3}{8} \, x^{2} + \frac{3}{2} \, x

The two are different by a constant. (Okay for antiderivatives!)

##Power Series Assignment

For the following 3 power series:

  • Find the Radius of convergece using the ratio test (You may want to use Sage's limit command to help you with this)

  • Plot the Partial sums with N=10N=10, 2525 and 5050 terms.

  • Use Sage's sum\verb+sum+ command to find the exact function the series converges to.

  • Plot the Partial sum with N=20N=20 terms of the series for the Derivative and Anti-derivative of the function

1.) n=0(1)n(n2n+1)3nxn\displaystyle \sum_{n=0}^{\infty}(-1)^n \frac{(n^{2}-n+1)}{3^n}x^n

2.) n=1(1)n1nx2n\displaystyle \sum_{n=1}^{\infty}(-1)^n \frac{1}{n}x^{2n}