Application Center - Maplesoft

App Preview:

Convergence of series

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

L17-series2.mws

Calculus II

Lesson 17:  Convergence of Infinite Series

Infinite series defined.  The sum of an infinite series defined.  The integral, root and ratio tests for convergence.  Radius of convergence.  Estimate of truncation error.  Application of  series to integration.

         Let   {a[n]}[n = 0]^(n = infinity)  be a sequence of  terms.  Then, by the  infinite series,      a[0]+a[1]+a[2]+a[3] +...


 we will mean the sequence  
{S[n]}  where   S[n] = Sum(a[k],k = 0 .. n)  .  The sum of the series is, by definition, Limit(S[n],n = infinity)  . The critical questions for infinite series are convergence, rapidity of convergence and radius of convergence.

Ex. 1

Consider the arctan function which  has a known series representation as:

arctan(x) = x-x^3/3+x^5/5-x^7/7+x^9/9-x^11/11  +...

a[2*k-1] = (-1)^(k+1)*x^(2*k-1)/(2*k-1)

S[n] = Sum((-1)^(k+1)*x^(2*k-1)/(2*k-1),k = 1 .. n)

      Applying the definition of the sum of the series with x = sqrt(3)/3  , we hope to obtain   Pi/6  .    Let x= p and sum the first n terms.  Then find the limit as proc (n) options operator, arrow; infinity end proc .

>    S:=(n,p)->sum((-1)^(k+1)*p^(2*k-1)/(2*k-1),k=1..n);

S := proc (n, p) options operator, arrow; sum((-1)^(k+1)*p^(2*k-1)/(2*k-1),k = 1 .. n) end proc

>    evalf(limit(S(n,sqrt(3)/3),n=infinity));

.5235987756+.2163575000e-22*I

           This very tiny imaginary component is clearly an artifact introduced by the algorithm for evaluating series.  First of all, the field of real numbers is complete and therefore it is not possible for any series of real numbers to sum to an imaginary.  Second, the imaginary component is extremely tiny compared to the real component.  Therefore we disregard the imaginary component.

>    6*Re(%);

3.141592654

>   

          Maple will produce a series expansion for a wide range of functions.  Unfortunately these have numerical rather than symbolic coefficients.  If we know the symbolic coefficients or can deduce them from the numerical form, we can apply a variety of methods to examine questions of convergence.

Integral Test

          The integral test not only tells us whether or not a series converges, but can also be used to provide an estimate of the error incurred by truncating the series after n  terms. The integral test uses the integral Int(a[n](t),t = 1 .. infinity)   as an upper bound on the sum of the area of rectangles of unit base and a[n](t)  height.

[Maple Metafile]

          More specifically, let f  be a positive, decreasing and continuous function then { f ( n )} is positive and decreasing and  { S[n] } converges if and only if Int(f(t),t = 1 .. infinity)   exists.

Ex.  2

 Let a[k] = (1/2)^(2*k-1)/(2*k-1)  .  Evaluate the convergence of Sum(a[k],k = 1 .. infinity) .                      

>    restart:

>    a:=(.5)^(2*k-1)/(2*k-1);

a := .5^(2*k-1)/(2*k-1)

>    evalf(int(a,k=1..infinity));

.1893355215

        The use of  evalf  invokes Maple's numerical procedures for evaluating the improper integral.  Because the integral exists we know that the series converges.  In fact:

>    evalf(limit(sum(a, k=1..n), n=infinity));

.5493061445

>   

          Note that the value of the integral is not related to the value of the sum.  Indeed the integral could be taken from any point on the sum with equal effectiveness, because it is only the tail of the series which determines its convergence (assuming individual terms are finite).  A word of caution here.  The above sum is equal to ln(sqrt(3))   .  It was taken from this series.

ln(sqrt((1+x)/(1-x))) = x+x^3/3+x^5/5+x^7/7   ... = Sum(x^(2*k-1)/(2*k-1),k = 1 .. infinity)

        
          When applying the integral test to  
x^(2*k-1)/(2*k-1)  one integrates with respect to the variable k , not x .  In our example we used   x = . In a short while we will look at ways to determine the values of x for which a series converges.  Right now, we want an estimate of how great an error we would make by stopping at a given term, say the 10th.

           Let S = limit(S[n],n = infinity)  . Then Int(f(t),t = n+1 .. infinity)  <= S-S[n] <= Int(f(t),t = n .. infinity)  .  i.e. the truncation error
after the nth term  is bounded by the two integrals.

>    lower_error_limit:=evalf(int(a,k=11..infinity));

lower_error_limit := .1538338839e-7

>    upper_error_limit:=evalf(int(a,k=10..infinity));

upper_error_limit := .6760254819e-7

         The actual error incurred by truncating after 10 terms is:

>    evalf(limit(sum(a,k=1..n), n=infinity)-sum(a,k=1..10));

.296e-7

Ratio Test

         Recollect the notation adopted in the first paragraph. i.e. {a[n]}[n = 0]^(n = infinity)  is a sequence and an infinite series is understood to be a sequence {S[n]} , where S[n] = Sum(a[k],k = 0 .. n) .   If there is positive integer, K and a positive number r < 1, such that,   for n > K,      abs(a[n+1])/abs(a[n]) < r   then the series {S[n]}  , converges absolutely.  The exhibition of r and K constitute the ratio test.

Ex.  3

            Consider again the sequence in Ex. 2 , a[k] = .5^(2*k-1)/(2*k-1)  .  The ratio test gives:

>    restart:

>    a[k]:=(1/2)^(2*k-1)/(2*k-1);

a[k] := (1/2)^(2*k-1)/(2*k-1)

>    a[k+1]:=(1/2)^(2*(k+1)-1)/(2*(k+1)-1);

a[k+1] := (1/2)^(2*k+1)/(2*k+1)

>    ratio:=simplify(a[k+1]/a[k]);

ratio := 1/4/(2*k+1)*(2*k-1)

This ratio is <   for all values of k > 0, confirming once more the convergence of this series.  Using the general term:

>    a[k]:=(x)^(2*k-1)/(2*k-1);

a[k] := x^(2*k-1)/(2*k-1)

>    a[k+1]:=(x)^(2*(k+1)-1)/(2*(k+1)-1);

a[k+1] := x^(2*k+1)/(2*k+1)

>    ratio:=simplify(a[k+1]/a[k]);

ratio := x^2/(2*k+1)*(2*k-1)

>   

       It is clear that the series will converge for x^2  < 1 ( r = x^2  , K=0). The radius of convergence is (-1..1).

       The radius of convergence is the domain of the independent variable over which a sequence of functions converges.  The ratio test not only provided a test for convergence but also a measure of the radius of convergence.  

        Further if the conditions of the ratio test hold, abs(a[n+1])/abs(a[n]) < r  <1, then, since abs(a[n+k])  < r^k*abs(a[n])  , we have:

abs(S[m]-S[n])  = | x[n+1]+x[n+2]+x[n+3]  + ...+ x[m]  | <= abs(x[n+1])+abs(x[n+2])+abs(x[n+3])  + ... + abs(x[m])  <

( r+r^2+r^3  + ... r^(m-n) ) abs(x[n])  = (r-r^(m-n+1))/(1-r) abs(x[n])  

Since r<1, limit(abs(S[m]-S[n]),m = infinity)  = abs(S-S[n]) <= r/(1-r)   abs(x[n])     .  That is, the truncation error after n terms  is  less than or equal to,   

r/(1-r)   abs(x[n])  

        In the present case, with r < , x= the truncation error is less than   (1/2)^(2*n-1)/(3*(2*n-1)) .

>    err:=(1/2)^(2*n-1)/(3*(2*n-1));

err := (1/2)^(2*n-1)/(6*n-3)

         Solving for the number of terms, n , we obtain, for an error of .000001,

>    solve(err=.000001,n);

7.744827377

>   

          We conclude that eight terms are necessary to guarantee accuracy to less than .000001.

Root test

          With the same notation as before, if there is an integer, K, and a number r < 1 such that abs(a[n])^(1/n)  < r for n > K, then the series {S[n]}  is convergent, and conversely, if there is an integer, K, and a number r >1 such that abs(a[n])^(1/n)  > r for n > K  then the series {S[n]}  is divergent.

           This follows from the comparison test with the series Sum(r^k,k = 1 .. infinity)   which is convergent for r < 1 and divergent for r > 1.

Ex.  4    

         Continuing with the sequence of  Ex 3;

>    restart:with(plots):

Warning, the name changecoords has been redefined

>    a[n]:=((1/2)^(2*n-1)/(2*n-1));

a[n] := (1/2)^(2*n-1)/(2*n-1)

>    limit(a[n]^(1/n), n=infinity);

1/4

         The quantity a[n]^(1/n) , is always less than . This can be clearly seen from a plot of a[n]^(1/n) .

>    a:=[[n,evalf(a[n]^(1/n))] $n=1..100]:

>    pointplot(a);

[Maple Plot]

           With r =  the conditions of the test are fulfilled for convergence.  In the same spirit as the ratio test we derive an upper limit estimate for the truncation error. If the conditions of the root test are fulfilled, then;

abs(S[m]-S[n])  = | x[n+1]+x[n+2]+x[n+3]  + ...+ x[m]  | <= abs(x[n+1])+abs(x[n+2])+abs(x[n+3])  + ... + abs(x[m])  <

( r^(n+1)+r^(n+2)+r^(n+3)  + ... r^m ) = (r^(n+1)-r^(m+1))/(1-r)

limit(abs(S[m]-S[n]),m = infinity)  = abs(S-S[n]) < r^(n+1)/(1-r)    

 

          Now we use this estimate to find the number of terms which will guarantee an error of <.000001.

>    restart:

>    r:=1/4:

>    err:=(r)^(n+1)/(1-r);

err := 4/3*(1/4)^(n+1)

>    fsolve(err=.000001,n);

9.173303034

         According to this  10 terms will guarantee an accuracy of .000001.  Which estimate is closer?   We compute the actual errors involved in truncating the series after eight, nine and ten terms.

>    seq(evalf(ln(3)/2-sum((1/2)^(2*k-1)/(2*k-1),k=1..p)),p=5..10);

.563925e-4, .120033e-4, .26133e-5, .5788e-6, .1300e-6, .296e-7

>        Eight  terms are necessary.  In this case the ratio test gave a closer estimate.

          Series find application not only as computational devices, but in the evaluation of certain integrals and in the solution of differential equations.

Ex.  5   

          Evaluate the integral   Int(x^sin(x),x)      

>    restart:

>    F:=x^sin(x);

F := x^sin(x)

>    int(F,x);

int(x^sin(x),x)

          It is returned unevaluated.  By expanding in a series, converting to a polynomial and integrating term by term, a good approximating function can easily be found.

>    f:=evalf(series(F,x=1/2,20));

f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...
f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...
f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...
f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...
f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...
f := series(.7172631715+.2514417681*(x-.5000000000)+.7344168444*(x-.5000000000)^2-.3659185113*(x-.5000000000)^3+.5873504952*(x-.5000000000)^4-.8972295214*(x-.5000000000)^5+1.176732692*(x-.5000000000)^6...

>    g:=int(f,x):

>    g:=convert(g,polynom);

g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...
g := .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962782e-1*(x-.5000000000)^4+.1174700990*(x-.5000000000)^5-.1495382536*(x-.5000000000)^6+.1681046703*(x-.5...

         We selected the point x=0.5 around which to expand the function, because it lies in the center of the interval of integration. This generally improves the convergence characteristics of the series over the interval of interest.  An examination of the first twenty  one  terms  suggests that convergence of the series  will  occur  in  the  range      (-1.5..1.5).  Now it is a simple matter to obtain the desired result.

>    G:=unapply(g,x):

>    plot(G,-0.2..1.4);

[Maple Plot]

       Maple will implement this method by expanding the indefinite integral with the series command.

>    int(F,x);

int(x^sin(x),x)

>    series(%,x,20):

>    g:=convert(g,polynom):

>    g:=unapply(g,x);

g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...
g := proc (x) options operator, arrow; .7172631715*x-.3586315858+.1257208840*(x-.5000000000)^2+.2448056148*(x-.5000000000)^3-.9147962768e-1*(x-.5000000000)^4+.1174700991*(x-.5000000000)^5-.1495382533*(...

>    plot(g,-.2..1.4);

[Maple Plot]

        Of course, Maple could produce a numerical result for a definite integral with;

>    int(F,x=.1..0.9);

.6083446828

>   

      There are occasions, however, where an explicit functional approximation to the integral is needed. as in the production of a plot.

Practice

1. Test each of the following series for convergence and, if the series converges, find
the radius of convergence.

a)       Sum(((x-1)/x)^n/n,n = 1 .. infinity)           b)     Sum((x+3)^(n-1)/(n+1)!,n = 0 .. infinity)           c)    Sum((-1)^(n-1)*x^(2*n-1)/(2*n-1))

d)      Sum(1/((2*n-1)*(2*x-1)^(2*n-1)),n = 1 .. infinity)

2. Evaluate each of the following integrals using series.
a) Find a series for the integrand and integrate term by term.
b) Evaluate the integral using the series command.
c) Check results by forcing numerical evaluation of the integral.
d) Plot each function together with its series representation. Try expanding around different points to see the effect on closeness of fit.

i)    Int(sin(x)^x,x = 1 .. 2)          ii)   Int((x^2+1)^(x+1),x = -3 .. 0)       iii)   Int(ln(x)^(x^2),x = 1 .. 3)  

>   

>