MapleRTex4.mws

Maple Worksheet for Ratio Test Example 4

with graphs

>    with(plots):

Warning, the name changecoords has been redefined

Here is a graph of f(x) = 10000*x^2-2^x  which we can use to estimate when this function will equal zero.

>    plot(10000*x^2-2^x,x=0..23,thickness=3);

[Maple Plot]

Using the graph above we can estimate that there is a zero between 22 and 23 and use fsolve to approximate it.

>    fsolve(10000*x^2-2^x=0,x,22..23);

22.23756640

Here is the construction of a graph of the sequence of terms in the series.

>    points:=array(1..50);

points := array(1 .. 50,[])

>    for i from 1 to 50 do

>    points[i]:=(i,(-1)^(i+1)*(i^2)/2^i):

>    end do:

>    pointss:=convert(points,listlist):

>    pointplot(pointss,symbol=circle,symbolsize=12,color=red,labels=[n,a]);

[Maple Plot]

Below we have the graph of the sequence of partial sums up to 50.

>    sums20:=array(1..50);

sums20 := array(1 .. 50,[])

>    for i from 1 to 50 do

>    sums20[i]:=(i,sum((-1)^(n+1)*(n^2)/2^n,n=1..i)):

>    end do:

>    sums20s:=convert(sums20,listlist):sums20:=array(1..50);

sums20 := array(1 .. 50,[])

>    pointplot(sums20s,symbol=circle,symbolsize=12,color=red,labels=[n,S]);

[Maple Plot]

Since it was determined that the absolute value of the 23rd term in the sequence was less than 0.0001, we can sum the first 22 terms in the sequence to compute an approximation of the infinite sum that has a guaranteed error of less than 0.0001.  Since the absolute value of the 22nd term in the sequence is greater than 0.0001, 22 terms is the minimum number of terms to be summed to guarantee an error of less than 0.0001.

>    evalf(22^2/2^22);

.1153945923e-3

>    evalf(23^2/2^23);

.6306171417e-4

>    Sum((-1)^(n+1)*(n^2)/2^n,n=1..22);

Sum((-1)^(n+1)*n^2/(2^n),n = 1 .. 22)

>    evalf(value(%));

.7403326035e-1

>