Representations of Functions as Power series

Download Maple Worksheet

Why do we want to express a known function as the sum of a power series ?

 

We will see later that this is a good strategy for integrating functions that don't have elementary antiderivatives ( exp(x^2) or sin(x^2) for examples), for solving differential equations, and for approximating functions by polynomials. Scientists do this to simplify the expressions they deal with; computer scientists do this to represent functions on calculators and computers.

 

We now know that for abs(x) < 1

1/(1-x) = sum(x^n,n = 0 .. infinity)

Moreover, we can compute the error of approximating 1/(1-x) by the polynomial sum(x^k,k = 0 .. n) = 1 + x + ... + x^n , using the following formula

1/(1-x)-sum(x^k,k = 0 .. n) = x^(n+1)/(1-x)

Clearly we can see from this formula and the animation below that

(1). For fixed n , the closer x is to 0 , the better sum(x^k,k = 0 .. n) approximates 1/(1-x) .

(2). For fixed x , the larger n is, the better sum(x^k,k = 0 .. n) approximates 1/(1-x) .

 

[Maple Plot]

We can use

1/(1-x) = sum(x^n,n = 0 .. infinity) ------- (1)

to obtain power series representations for some other functions.

 

Algebraic manipulations ---- put the functions in the form of 1/(1-r)

 

Example 1 Express 1/(1+x^2) as the sum of a power series and find the intervals of convergence.

 

Replacing x by -x^2 in Equation (1), we have

1/(1+x^2) = 1/(1-(-x^2)) = sum((-x^2)^n,n = 0 .. infinity) = sum((-1)^n*x^(2*n),n = 0 .. infinity)

for abs(-x^2) < 1 , that is, abs(x) < 1 . Therefore, the interval of convergence is ( -1, 1 ). Of course, we can also determined the radius of convergence by ratio test, but that is unnecessary here. Because,

1/(1-x) = sum(x^n,n = 0 .. infinity) if and only if abs(x) < 1

 

Play with the animation below and observe carefully.

 

[Maple Plot]

Note that the function 1/(1+x^2) is defined for all x , but the power series does not converge for 1 < abs(x) .

 

Example 2 Find a power series representation for 1/(2+x) .

 

Put this function in the form of 1/(1-r) as follows

1/(2+x) = 1/(2*(1+x/2)) = 1/(2*(1-(-x/2)))

= 1/2 sum((-x/2)^n,n = 0 .. infinity) = sum((-1)^n/(2^(n+1)),n = 0 .. infinity) x^n

This series converges if and only if abs(-x/2) < 1 , that is, abs(x) < 2 . So the interval of convergence is ( -2, 2 ).

 

The animation below shows the convergence :

 

[Maple Plot]

 

Example 3 Find a power series representation for x^3/(2+x) .

Since x^3/(2+x) = x^3 1/(x+2) , all we have to do is to multiply the series by x^3 .

 

x^3/(x+2) = x^3 sum((-1)^n/(2^(n+1)),n = 0 .. infinity) x^n

= sum((-1)^n/(2^(n+1)),n = 0 .. infinity) x^(n+3)

= sum((-1)^(n-1)/(2^(n-2)),n = 3 .. infinity) x^n

= x^3/2-x^4/4+x^5/8-x^6/16 + .....

 

The interval of convergence is also ( -2, 2 ).

 

The animation below shows how the series converges :

 

 

[Maple Plot]

>

 

Differentiation and Integration

 

For x in the interval of convergence, we can differentiate or integrate a power series just as we would do for the polynomials ---- differentiate or integrate term-by-term .

 

Theorem If the power series sum(c[n]*(x-a)^n,n = 0 .. infinity) has radius of convergence 0 < R , then the function f defined by

f(x) = sum(c[n]*(x-a)^n,n = 0 .. infinity)

is differentiable (and therefore continuous) on the interval ( a-R, a+R ) and

(i) f ' ( x ) = sum(n*c[n]*(x-a)^(n-1),n = 1 .. infinity) = c[1]+2*c[2]*(x-a)+3*c[3]*(x-a)^2 + ...

(ii) int(f(x),x) = C+sum(c[n]*(x-a)^(n+1)/(n+1),n = 0 ..... = C+c[0]*(x-a)+c[1]*(x-a)^2/2+c[2]*(x-a)^3/3 + ...

 

The radii of convergence of the power series in Equations (i) and (ii) are both R .

 

We called this differentiate or integrate term-by-term because that Equations (i) and (ii) can be rewritten in the form :

(iii) d/(d*x) f(x) = sum(d/(d*x),n = 0 .. infinity) c[n]*(x-a)^n

(iv) int(f(x),x) = sum(int(c[n]*(x-a)^n,x),n = 0 .. infi...

 

 

 

Example 4 Express 1/((1-x)^2) as the sum of a power series and find the interval of convergence.

 

Note that d/(d*x) 1/(1-x) = 1/((1-x)^2) . Differentiating both sides of the equation 1/(1-x) = sum(x^n,n = 0 .. infinity) , we get

1/((1-x)^2) = sum(n*x^(n-1),n = 1 .. infinity) = sum((n+1)*x^n,n = 0 .. infinity)

 

According to the theorem, the radius of convergence of the differentiated series is the same as the original series, namely, 1 . Since sum((n+1)*x^n,n = 0 .. infinity) diverges at x = -1 and x = 1 (take a good look at the animations below), we get that the interval of convergence of the series is ( -1, 1 ).

 

The convergence for x in ( -1, 1 ) :

 

[Maple Plot]

 

Example 5 Find a power series representation for ln(1-x) and find the interval of convergence.

 

Note that int(1/(1-t),t = 0 .. x) = -ln(1-x) , integrating both sides of 1/(1-x) = sum(x^n,n = 0 .. infinity) , we get

ln(1-x) = -sum(int(t^n,t = 0 .. x),n = 0 .. infinit... = -sum(x^(n+1)/(n+1),n = 0 .. infinity) = -sum(x^n/n,n = 1 .. infinity)

 

According to the theorem, the radius of convergence of the series is also equal to 1 . However, the series -sum(x^n/n,n = 1 .. infinity) converges at x = -1 and diverges at x = 1 . Therefore, the interval of convergence of the series is [ -1, 1 ).

 

The convergence for x in ( -1, 1 ) :

[Maple Plot]

 

The convergence for x = -1 :

 

[Maple Plot]

We have shown that ln(1-x) = -sum(x^n/n,n = 1 .. infinity) for all x in ( -1, 1 ). From the animation above, we would conjecture that ln(1-x) = -sum(x^n/n,n = 1 .. infinity) for x = -1 , that is,

ln(2) = sum((-1)^(n+1)/n,n = 1 .. infinity) = 1-1/2+1/3-1/4 +.... .

 

In fact, it is true indeed. Since

1/(1-x)-sum(x^k,k = 0 .. n) = x^(n+1)/(1-x)

 

by integrating both sides of the equation above, we have

-ln(1-x)-sum(x^(k+1)/(k+1),k = 0 .. n) = int(t^(n+1...

put x = -1 , we get

-ln(2)-sum((-1)^(k+1)/(k+1),k = 0 .. n) = int(t^(n+... = -int(t^(n+1)/(1-t),t = -1 .. 0)

 

Since abs(int(f(x),x = a .. b)) <= int(abs(f(x)),x = a ..... and abs(t^(n+1)/(1-t)) <= abs(t)^(n+1) for all t in [-1, 0] ,

 

abs(int(t^(n+1)/(1-t),t = -1 .. 0)) <= int(abs(t^(n...

 

int(abs(t^(n+1)/(1-t)),t = -1 .. 0) <= int(abs(t)^(... = int((-t)^(n+1),t = -1 .. 0) = 1/(n+2)

 

Therefore, abs(int(t^(n+1)/(1-t),t = -1 .. 0)) approaches 0 as n approaches infinity . This implies

-ln(2) = limit(sum((-1)^(k+1)/(k+1),k = 0 .. n),n =... = sum((-1)^(n+1)/(n+1),k = 0 .. infinity)

 

That is, ln(2) = sum((-1)^(n+1)/n,n = 1 .. infinity) = 1-1/2+1/3-1/4 + ......

 

Example 6 Find a power series representation for arctan(x) and find the interval of convergence.

 

In Example 1, We have shown 1/(1+x^2) = sum((-1)^n*x^(2*n),n = 0 .. infinity) for all abs(x) < 1 . We get

arctan(x) = int(1/(1+t^2),t = 0 .. x) = sum(int((-1)^n*t^(2*n),t = 0 .. x),n = 0 .. infinit...

= sum((-1)^n*x^(2*n+1)/(2*n+1),n = 0 .. infinity)

= x-x^3/3+x^5/5 + .......

for all abs(x) < 1 .

 

 

The convergence for x in ( -1, 1 ) :

[Maple Plot]

Notice that the interval of convergence of the series sum((-1)^n*x^(2*n+1)/(2*n+1),n = 0 .. infinity) is [ -1, 1 ].

We can show, as in Example 5, that arctan(x) = sum((-1)^n*x^(2*n+1)/(2*n+1),n = 0 .. i... for all values of x in [ -1, 1 ].

In particular, for x = 1 we get a formula to express pi as an infinite series, namely

pi/4 = sum((-1)^n/(2*n+1),n = 0 .. infinity)

that is,

pi = 4 sum((-1)^n/(2*n+1),n = 0 .. infinity) = 4-4/3+4/5-4/7 + ......

 

Moreover, by the Alternating Series Estimation Theorem, we get

 

abs(pi-4*sum((-1)^k/(2*k+1),k = 0 .. n)) <= 4/(2*n+...

 

This gives us a good way to approximate pi . If we want to find an approximation of pi to 4 decimal places, we need to take n to be greater than (40000-3)/2 ; we may take n = 19999 , and the corresponding partial sum is about 3.141542654

Not bad, right ?

 

Example 7 Approximate int(1/(1+x^7),x = 0 .. 1/2) correct to within 10^(-7) .

We first express the integrand, 1/(1+x^7) , as the sum of a power series.

1/(1+x^7) = 1/(1-(-x^7)) = sum((-x^7)^n,n = 0 .. infinity) = sum((-1)^n*x^(7*n),n = 0 .. infinity)

 

This series converges for abs(x^7) < 1 , that is, for abs(x) < 1 .

 

Since abs(1/2) < 1 , now we can integrate term by term :

int(1/(1+x^7),x = 0 .. 1/2) = sum(int((-1)^n*x^(7*n),x = 0 .. 1/2),n = 0 .. infin... = sum((-1)^n*(1/2)^(7*n+1)/(7*n+1),n = 0 .. infinity)...

 

By the Alternating Series Estimation Theorem, we get

 

abs(int(1/(1+x^7),x = 0 .. 1/2)-sum((-1)^k*(1/2)^(7...

 

In order that the approximation is correct to within 10^(-7) , we need to take n so large that

 

10^(-7) < (1/2)^(7*n+10)/(7*n+10)

n = 1 :

.4487879136e-6

n = 2 :

.2483526866e-8

It suffices to take n = 2 , that is, int(1/(1+x^7),x = 0 .. 1/2) is approximately equal to sum((-1)^k*(1/2)^(7*k+1)/(7*k+1),k = 0 .. 2) which is about

.4995137533

 

Power series center at a <> 0

 

 

Example 8 Find a power series representation center at 1 for ln(x) and find the radius of convergence.

 

Since ln(x) = int(1/t,t = 1 .. x) , we can find the require series by integrating the power series center at 1 for 1/x .

Notice that for abs(x-1) < 1

1/x = 1/(1-(1-x)) = sum((1-x)^n,n = 0 .. infinity) = sum((-1)^n*(x-1)^n,n = 0 .. infinity)

Therefore,

ln(x) = sum(int((-1)^n*(t-1)^n,t = 1 .. x),n = 0 .. infinit... = sum((-1)^n*(x-1)^(n+1)/(n+1),n = 0 .. infinity) for abs(x-1) < 1

 

The radius of convergence of the required series is 1 .

 

The convergence for abs(x-1) < 1 :

[Maple Plot]

Note that the interval of convergence of the series sum((-1)^n*(x-1)^(n+1)/(n+1),n = 0 .. infinity) is ( 0, 2 ].

The convergence for x = 2 :

[Maple Plot]

 

We can show, as in Example 5, that ln(x) = sum((-1)^n*(x-1)^(n+1)/(n+1),n = 0 .. infin... for all x in ( 0, 2 ].

 

 

Another way of doing this is to view ln(x) as a translation of ln(1-x) by 1-x . In Example 5, we have shown that for all x in ( -1, 1 ]

ln(1-x) = -sum(x^n/n,n = 1 .. infinity)

 

Thus, for all x such that -1 < 1-x < 1 , that is for all x in ( 0, 2 ],

 

ln(x) = ln(1-(1-x)) = -sum((1-x)^n/n,n = 1 .. infinity)

= -sum((-1)^n*(x-1)^n/n,n = 1 .. infinity)

= sum((-1)^(n+1)*(x-1)^n/n,n = 1 .. infinity)

= sum((-1)^n*(x-1)^(n+1)/(n+1),n = 0 .. infinity)

 

 

Example 9 Find a power series representation center at 2 for ln(x) and find the radius of convergence.

Since ln(x)-ln(2) = int(1/t,t = 2 .. x) , we can find the require series by integrating the power series center at 2 for 1/x .

As in Example 8, we have

 

1/x = 1/(2-(2-x)) = 1/2 1/(1-(2-x)/2)

= 1/2 sum(((2-x)/2)^n,n = 0 .. infinity)

= 1/2 sum((-1/2)^n*(x-2)^n,n = 0 .. infinity)

= sum((-1)^n*(1/2)^(n+1)*(x-2)^n,n = 0 .. infinity)

 

Notice that the above equations hold for abs((x-2)/2) < 1 , that is, abs(x-2) < 2 .

 

Therefore, for abs(x-2) < 2

ln(x)-ln(2) = sum(int((-1)^n*(1/2)^(n+1)*(t-2)^n,t = 2 .. x),n = ... = sum((-1)^n*(x-2)^(n+1)/(2^(n+1)*(n+1)),n = 0 .. inf...

that is,

ln(x) = ln(2)+sum((-1)^(n+1)*(x-2)^n/(2^n*n),n = 1 ...

 

The radius of convergence of the required series is 2 .

[Maple Plot]

If sum(c[n]*(x-3)^n,n = 0 .. infinity) is a power series representation center at 3 for ln(x) , what do you think the radius of convergence of sum(c[n]*(x-3)^n,n = 0 .. infinity) should be ?

 

From the examples above, we have the following observations :

If function has a power series representation sum(c[n]*(x-a)^n,n = 0 .. infinity) , then

(1). For fixed n , the closer x is to a , the better sum(c[k]*(x-a)^k,k = 0 .. n) approximates f(x) .

(2). For fixed x , the larger n is, the better sum(c[k]*(x-a)^k,k = 0 .. n) approximates f(x) .


Download Maple Worksheet