>   

A Maple Demonstration of

Convergence of Power Series

prepared by

Douglas B. Meade (meade@math.sc.edu)

12 November 2003

>   

>    restart;

>    with( plots ):

Warning, the name changecoords has been redefined

>   

Auxiliary Procedure Definitions (execute, but do not modify)

>    AnimateSeries := proc( series,

>                           domain::name=range(constant),

>                           psums::list(nonnegint) )

>      local NULL

>            , F          # limit of infinite sum

>            , P          # final plot data structure [returned]

>            , plot_opts  # optional arguments to plot command

>            ;

>      if nargs>3

>        then plot_opts := args[4..nargs]

>        else plot_opts := NULL

>      end if;

>      if nops(series)=2 and op(0,series)<>`Sum`

>      then

>        error "invalid first argument, must an unevaluated series, received",

>              series

>      end if;

>      F := value( series );

>      P := display( [seq(

>                      plot( [subsop([2,2,2]=N,series), F ],

>                            domain, plot_opts, title="Partial Sum: N="||N ),

>                      N=psums )],

>                    insequence=true );

>      return P

>      end proc:

>     

>    list_N1 := [   k $ k=0..16 ];    # consecutive integers

list_N1 := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]

>    list_N2 := [ 2*k $ k=0..10 ];    # even

list_N2 := [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]

>    list_N3 := [ 2^k $ k=0.. 8 ];    # powers of 2

list_N3 := [1, 2, 4, 8, 16, 32, 64, 128, 256]

>   

Example 1

>    Series1 := Sum( x^k, k=0..infinity );

Series1 := Sum(x^k,k = 0 .. infinity)

>    AnimateSeries( Series1, x=-2..2, list_N3, y=-10..100, discont=true );

[Maple Plot]

>   

Example 2

>    Series2 := Sum( (-1)^n*x^n/n, n=1..infinity );

Series2 := Sum((-1)^n*x^n/n,n = 1 .. infinity)

>    AnimateSeries( Series2, x=-2..2, list_N3, y=-10..100, discont=true );

[Maple Plot]

>   

Example 3

>    Series3 := Sum( n*x^(n-1), n=1..infinity );

Series3 := Sum(n*x^(n-1),n = 1 .. infinity)

>    AnimateSeries( Series3, x=-2..2, list_N3, y=-20..100, discont=true );

[Maple Plot]

>   

Example 4

>    Series4 := Sum( (-1)^n*x^(2*n)/(2*n)!, n=0..infinity );

Series4 := Sum((-1)^n*x^(2*n)/(2*n)!,n = 0 .. infinity)

>    AnimateSeries( Series4, x=-5*Pi..5*Pi, list_N1, y=-2..2, discont=true );

[Maple Plot]

>   

Example 5

>    Series5 := Sum( (-(x+x^2))^n, n=0..infinity );

Series5 := Sum((-x-x^2)^n,n = 0 .. infinity)

>    AnimateSeries( Series5, x=-5..5, list_N1, y=0..2, discont=true );

[Maple Plot]

>   

>    solve( abs(x+x^2) < 1, {x} );

{-1/2-1/2*5^(1/2) < x, x < 1/2*5^(1/2)-1/2}

>    plot( [abs(x+x^2),1], x=-3..3 );

[Maple Plot]

>   

Example 6

>    Series6 := Sum( (-1)^n*x^n/n, n=1..infinity );

Series6 := Sum((-1)^n*x^n/n,n = 1 .. infinity)

>    AnimateSeries( Series6, x=-5..5, list_N1, y=-2..2, discont=true );

[Maple Plot]

>   

Example 7

>    Series7 := Sum( n*(n-1)*x^(n-1), n=2..infinity );

Series7 := Sum(n*(n-1)*x^(n-1),n = 2 .. infinity)

>    AnimateSeries( Series7, x=-3..3, list_N2, y=-10..10, discont=true );

[Maple Plot]

>   

>    value( Series7 );

-2*x/(x-1)^3

>   

Example 8

>    Series8 := Sum( (x-5)^n/(2^n*n*(n+1)), n=1..infinity );

Series8 := Sum((x-5)^n/(2^n)/n/(n+1),n = 1 .. infinity)

>    AnimateSeries( Series8, x=0..8, list_N3, y=-4..20, discont=true );

[Maple Plot]

>   

>    value( Series8 );

-((x-7)*ln(7/2-1/2*x)-x+5)/(x-5)

>   

>