Power Series: Approximating Functions

MAT 229, Spring 2025

Generalizing the Geometric Series

Geometric series have the form (Underoverscript[Σ, (k=0), ∞])a (r^k). A geometric series converges if and only if |r|<1. If it does converge it converges to (a/(1-r)).
Thus,  (Underoverscript[Σ, (k=0), ∞])a (r^k)= (a/(1-r)), and, in particular, (Underoverscript[Σ, (k=0), ∞]) (r^k)= (1/(1-r)). 

If we replace the variable “r” with the variable “x”, then we obtain a power series for the function (1/(1-x)). A power series is an infinite series made up of polynomial (monomial) terms, as we see here:
							  (1/(1-x))=(Underoverscript[Σ, (k=0), ∞]) (x^k).
In our lab last Friday we saw that partial sums of this series worked well enough as approximations to (1/(1-x)), so long as |x|<1. We  call 1 the radius of convergence of this power series. Outside of this radius, the series diverges dramatically from the function values. 

There is nothing particularly special about the function (1/(1-x)) (although it has a very sweet power series!). In this section, we’ll use it to represent other functions related to it (typically rational functions), and study the power series of a few other functions. In particular, we’ll want to know under what circumstances their power series will converge (their radii of convergence). For that we often utilize the ratio test.

Example 6.2:

It’s going to be hard to force polynomials, no matter the degree, to have a vertical asymptote at x=1....

gs[x_]:=1/(1-x)
partialgs[x_,n_]:=Sum[x^k,{k,0,n}]
Plot[{gs[x],partialgs[x,2],partialgs[x,4],partialgs[x,6]},{x,-1.5, 1.5},PlotRange->{-1,18},PlotLabels->Automatic]

Notice that we can differentiate these series and get reasonable results, too:

partialgsPrime[x_,n_]:=Sum[k x^(k-1),{k,1,n}]
Plot[{gs'[x],partialgsPrime[x,2],partialgsPrime[x,4],partialgsPrime[x,6]},{x,-1.5, 1},PlotRange->{-1,18},PlotLabels->Automatic]

Plot[{gs'[x],partialgsPrime[x,2],partialgsPrime[x,4],partialgsPrime[x,6]},{x,-0.5, 0.5},PlotLabels->Automatic]

We can integrate them!

partialgsAntiDeriv[x_,n_]:=Sum[x^(k+1)/(k+1),{k,0,n}]
gsAntiDeriv[x_]:=-Log[1-x]
Plot[{gsAntiDeriv[x],partialgsAntiDeriv[x,2],partialgsAntiDeriv[x,4],partialgsAntiDeriv[x,6]},{x,-1.5, 1},PlotRange->{-1,18},PlotLabels->Automatic]
partialgsAntiDeriv[x,3]

Checkpoint 6.2:

f[x_]:=1/(1-x^2)
partialf[x_,n_]:=Sum[(x^2)^k,{k,0,n}]
Plot[{f[x],partialf[x,2],partialf[x,4],partialf[x,6]},{x,-1, 1},PlotRange->{0,18},PlotLabels->Automatic]

Example 6.3:

f[x_]:=1/(1+x^3)
partialf[x_,n_]:=Sum[(-x^3)^k,{k,0,n}]
Plot[{f[x],partialf[x,2],partialf[x,4],partialf[x,6]},{x,-1, 2},PlotRange->{0,18},PlotLabels->Automatic]

Let’s increase our partial sums a bit:

f[x_]:=x^2/(4-x^2)
partialf[x_,n_]:=x^2 /4 * Sum[((x/2)^2)^k,{k,0,n}]
Plot[{f[x],partialf[x,5],partialf[x,10],partialf[x,20]},{x,-2, 2},PlotRange->{0,18},PlotLabels->Automatic]

Checkpoint 6.3:

f[x_]:=x^3/(2-x)
partialf[x_,n_]:=x^3 /2 * Sum[(x/2)^k,{k,0,n}]
Plot[{f[x],partialf[x,5],partialf[x,10],partialf[x,20]},{x,-2, 2},PlotRange->{-5,20},PlotLabels->Automatic]

Example 6.1:

Series a: infinite radius of convergence (converges for all x), and converges to e^x:

f[x_]:=E^x
partialf[x_,n_]:=Sum[x^k/k!,{k,0,n}]
Plot[{f[x],partialf[x,5],partialf[x,10],partialf[x,20]},{x,-2, 2},PlotRange->{-5,20},PlotLabels->Automatic]

Series c: radius of convergence (converges for all x), and converges to e^x:

f[x_]=Sum[((x-2)/3)^k/(k+1),{k,0,Infinity}]
partialf[x_,n_]:=Sum[(x-2)^k/((k+1)3^k),{k,0,n}]
partialf[x_,n_]:=Sum[((x-2)/3)^k/(k+1),{k,0,n}]
Plot[{f[x],partialf[x,5],partialf[x,10],partialf[x,20]},{x,-2, 6},PlotRange->{-5,20},PlotLabels->Automatic]

Series b: radius of convergence = 0 (diverges except at x=0):

Sum[k!x^k,{k,0,Infinity}]