Names:
LAB 2: POWER SERIES
Objective
To investigate the convergence and divergence of power series.
Instructions
Carefully read all instructions and examples. Ask questions if you need any help. It is expected that everyone will actively participate in solving every problem.
SAVE YOUR WORK OFTEN . Use a different file name (of the form "initials"lab2.mws) than the one on the original LAB. Save the file in your own directory. Enter above, the names of all individuals participating in this report. The lab should be handed in to X:\courses\ma201\handin\ "your_lab_name". You should be able to use Maple's File, Save As commands to place it there, once it is complete.
Introduction
The following lines of code look intimidating, but all you have to do is click anywhere in the red text and hit [Enter]. Then go on with the rest of the lab.
>
with(plots):
with(plottools):
with(student):
par_sum := proc( TERM, INDEX::name=range )
local k, lo, hi, n;
k := lhs(INDEX);
lo := op(1,rhs(INDEX));
hi := op(2,rhs(INDEX));
seq( sum(TERM, k=lo..n), n=lo..hi )
end:
par_sum_plot := proc( TERM, INDEX::name=range, DOMAIN::name=range )
local opts;
opts := op( subsop(1=NULL,2=NULL,3=NULL, [args] ));
display( map( plot, [ par_sum( TERM, INDEX ) ], DOMAIN), opts )
end:
The commands above load 3 Maple packages (plots, plottools and student) which add certain useful command shortcuts to the Maple environment, as well as define 2 new procedures (Maple code for new functions or programs) which will help compute and visualize topics related to power series. Usage of both of these new procedures ( par_sum and par_sum_plot ) will be demonstrated below.
>
A series whose nth term is a number (called the
nth coefficient
and usually denoted
) times
is called a
power series
. They are essentially infinite degree polynomials.
A power series:
+ . . .
It's important to realize that the coefficients,
,
,
, etc. are constants, and
is the only variable. Here are a few examples (in sigma or summation form):
>
Sum(x^n,n=0..infinity);
Sum(x^n/n!,n=0..infinity);
Sum((-1)^n*3*x^(2*n)/8^n,n=0..infinity);
>
Along with the first 5 terms of each power series.
>
sum('x^n','n'=0..4);
sum(x^n/n!,n=0..4);
sum((-1)^n*3*x^(2*n)/8^n,n=0..4);
We can interpret the odd term coefficients, in the last example as being zero. When one substitutes a value for the variable
, one obtains a regular series. Different
values yield different series. Thus, a power series is a function of
, with a twist. Instead of the usual simple computation of
, once one knows
, we must find the sum of a series, once we substitute a value for
. We are use to simple rules like
, once
is known, it's straightforward to compute
(just square
). Luckily, the series that result by
sticking in
a value for
, tend to be some of the easier ones to sum. Furthermore, we don't have to stick in one value for
, and find the sum, then a different value for
and find it's sum, etc. We can often times
find the sum
of the power series for all
values with a single investigation. The first power series above always yields a geometric series with ratio equal to
. Based on what we know about geometric series, we can immediately conclude that for values of
between
and 1, the power series will sum to
. For values of
with absolute value bigger than or equal to 1, the power series will diverge. Thus, if we set
, then it turns out that
Here's the Maple command to
subs
titute a different value into an expression, and an illustration that we always get geometric series using the example above. I'll define
to be the expression for this power series. Note, to Maple
Sum
(with a capital S) means "print out the symbols representing the sum", while
sum
(with a lowercase s) means "evaluate the sum".
> f:=Sum(x^n,n=0..infinity);
>
Then, subs titute in a few different values for x:
>
subs(x=1/2,f);
subs(x=3,f);
subs(x=-1/4,f);
Different
values give different series. Some
values yield convergent series, some yield series which diverge. Determining which values lead to convergent series, and which lead to divergent series is the main topic of this lab. The key will be to examine this question for all values of
simultaneously. All series converge if and only if the sequence of partial sums converge, that is the official definition. For power series, partial sums are just regular polynomials. We'll look at these partial sums graphically, to illustrate certain properties, then apply the ratio test. Finally we'll investigate a small number (zero, one or two in almost all cases) of specific
values by hand. These exceptional
values define the
radius of convergence
for the power series, and they are the values of
where the ratio test yields a limit of 1 (the no information case).
Go back up the page a ways and execute (by placing the cursor in the command and pressing [ENTER] ) the definition of
. Then below, substitute in the values x = 1, and x =
, and decide by looking whether or not the 2 resulting series converge or diverge. Describe the partial sums one obtains for x = 1, and x =
, they should be different, and this difference will be reflected in the graphical investigation below.
>
>
>
>
Using Maple to Investigate the Partial Sums of Power Series
The Maple procedures par_sum and par_sum_plot are designed to help compute and graph the partial sums of a power series. The defining commands must be executed before they will work. Once you execute a Maple command, it will remain in effect (in all Maple windows that are open) until you quit Maple (well almost, you can execute the restart command, which clears all Maple definitions). If you quit Maple, come back later and re-open your lab file, you must re-execute the commands that define these procedures.
Let's start with the par_sum command. It requires 2 inputs, a formula for the nth term of the series, followed by the values of n for which one desires the partial sums, in the standard Maple start . . end description of a range. For example, the first (or zero-th?) through fourth (maybe 5th?) partial sums of the geometric example above come from:
> par_sum(x^n,n=0..4);
Notice that this says that the n = 0 partial sum is the polynomial
, the n = 1 partial sum is the polynomial
, the n = 2 partial sum is the polynomial
and so on. It is still the case that the n + 1-st partial sum is the n-th partial sum plus
one more term
.
Compute the n = 0 to n = 4 partial sums for the other two examples of power series given above.
>
>
>
>
>
>
Before we look at the geometric example
graphically, let's summarize what we know, so that we can see how these properties show up in the graphs.
The power series will converge to
for
<
< 1
The power series will diverge for
<
and
> 1
The divergence for x =
and x = 1 is different (and described in your answer above). Actually, the type of divergence at x = 1, happens for all values of
bigger than or equal to one, and the type of divergence at x =
happens for all
.
Thus, we can expect the following behavior in our graphs of the partial sums:
As we take larger and larger values of
in our partial sums, the graphs of these partial sum polynomials should look more and more like the function
, for values of
strictly between
and 1.
As
increases, the
th partial sum polynomial at x = 1 should reflect the type of divergence of the power series at x = 1.
As
increases, the
th partial sum polynomial at x =
should reflect the type of divergence of the power series at x =
.
What happens for x > 1 (in the partial sum plots) should differ from the behavior of the partial sum plots for x <
.
Thus, in the plots below, values of
strictly between
and 1, should exhibit typical "power series convergence" behavior. Values of
, should exhibit typical "power series divergence (of one type)", while values of x bigger than or equal to 1, should exhibit typical "power series divergence" of another type. The command
par_sum_plot
, plots several partial sum polynomials together. The graphs get pretty crowded pretty fast, and we'll fix this later. Here's an example of the syntax for the command, followed by it's output, than an explanation of the syntax.
> par_sum_plot(x^n,n=0..5,x=-1.5..1.5,view=[-1.5..1.5,-3..3]);
Like I said, the plots get crowded. The input to the
par_sum_plot
command is the formula for the nth term of the power series, followed by the range of n values for which you desire the partial sums plotted, the
values over which you'd like to see the plots of the partial sums, and then any regular plot options you desire. I told Maple to plot the partial sums for values of
from 0 to 5, running
from
to 1.5, and then display the plots using a
view
ing window that runs from
to 1.5 in the
direction and
to 3 in the
direction.
>
Adding the option insequence = true , will tell Maple to plot the partial sums as an animation (or movie), or one at a time, depending on which animation buttons we press. Here's the same command as above, with this new option and a few more partial sums.
> par_sum_plot(x^n,n=0..10,x=-1.5..1.5,view=[-1.5..1.5,-3..3],insequence=true);
You should see just a single partial sum plotted above (the one for n = 0, namely
).
Click on the graph above. A frame should appear around the plot, and the text buttons near the top of the window should change into animation buttons.
The buttons are (from left to right) STOP, a square; PLAY, a right triangle; FRAME PLAY, a right arrow hitting a wall; REVERSE, a left arrow; FORWARD, a right arrow; SLOW DOWN, 2 left triangles; SPEED UP, two right triangles; SINGLE CYCLE, a left-right arrow; and LOOP, a circular arrow.
The stop, forward and single cycle buttons should be selected (they look as if they are pressed in). To step through the plots one frame at a time, press the frame play button repeatedly.
Press the slow down button several times and then the play button. The movie may run too fast.
To rewind the movie, press the reverse button, then the play button.
I've cut the y values off, so you can see the behavior of convergence better. Reset the view to run from
to 10 in the
direction (just edit the
..3 part of the view option above), and replay the movie so you see what's happening for x values larger than 1.
The 3 types of behavior you should see might be described as
jumps around like an excited dog's tail
seems to stop moving as n gets bigger, and
just keeps on growing.
For values of
between
and 1, which type of behavior do the graphs suggest?
For x =
, which type of behavior do the graphs show?
For x = 1, which type of behavior do the graphs show?
>
>
Here are numeric values for the first 11 partial sums for x =
(note the use of
evalf
, to tell Maple that decimal outputs are desired).
> par_sum(evalf((1/2)^n),n=0..10);
They appear to be settling down, or converging, or not moving very much as n gets bigger.
Look at the first 11 partial sums for x = 1 and x =
. Are these numeric values consistent with the graphical behaviors above?
>
>
>
>
>
>
Now some high powered Maple graphics to better illustrate what's happening. I'll display with each partial sum, the function that the sums are converging to, and a label stating what value
has. By changing certain pieces of this Maple code (I'll explain which later) you can do similar investigations. For now, don't concern yourself with the Maple code, you can answer all the questions simply by
watching the output
.
>
xmin:=-1.5:
xmax:=1.5:
ymin:=-2:
ymax:=5:
nmin:=0:
nmax:=20:
TERMS:=x^n:
limfcn:=1/(1-x):
background:=plot(limfcn,x=xmin..xmax,view=[xmin..xmax,ymin..ymax],color=black,
discont=true):
parsums:=[par_sum(TERMS,n=nmin..nmax)]:
graphs:=[seq(plot(parsums[k],x=xmin..xmax,view=[xmin..xmax,ymin..ymax],
color=red,axes=normal),k=1..nops(parsums))]:
frames:=seq(display([background,graphs[k],TEXT([.2*xmax,.8*ymax],`n = `,
ALIGNLEFT), TEXT([.2*xmax,.8*ymax],convert(nmin+k-1,name),ALIGNRIGHT)]), k=1..nops(graphs)):
display(frames,insequence=true,view=[xmin..xmax,ymin..ymax]);
>
Click on the plot above, slow down the speed and play the movie, or step by frames through the animation. Notice that even though the limiting function
is well behaved for x less than or equal to
, the partial sums of the power series are not. If you look closely, you'll see the
value where the dog's tail attaches to the graph of the limiting function move towards x =
. Partial sums for larger and larger
values would eventually move this point as close as you'd like to
, but it will never reach
. The power series diverges at
via oscillation, while it diverges at x = 1 simply by growing larger and larger. This is illustrated by the graphs.
>
If we apply the ratio test to the power series, we get algebraic proof of these graphical predictions. Here's the ratio test via Maple. Start by defining the n-th term as a function of n.
>
a:=n->x^n;
Compute the ratio:
> ratio1:=abs(a(n+1)/a(n));
Tell Maple that n is a positive integer and ask Maple to simplify the ratio:
>
assume(n,posint):
simplify(ratio1);
Now let n go to infinity. Since n disappeared, we get L =
. When L is less than 1 we have absolute convergence; when L is larger than 1, we have divergence; when L = 1, the ratio test gives no information, and we investigate by hand the convergence for these
values.
Substituting x = 1, and
into the power series yields:
>
case1:=subs(x=1,Sum(a(n),n=0..infinity));
caseminus1:=subs(x=-1,Sum(a(n),n=0..infinity));
And the first several partial sums for each case show the divergence patterns.
>
par_sum(1^n,n=0..10);
par_sum((-1)^n,n=0..10);
Now, remove the assumption that
is a positive integer (use the single quote, not the back quote):
> n:='n';
When a power series is expressed with pure powers of
(as opposed to something like powers of (
) ), the power series will converge absolutely for an interval of
values, say -R < x < R, with the center of the interval being
. R is called the
radius of convergence
, and what happens at x = R and x =
, must be investigated "by hand". Normally, the radius of convergence comes from applying the ratio test and setting L < 1. When L is less than one regardless of the value of
, the radius of convergence is infinite, so the power series converges for all
.
Apply the ratio test to the second series,
. You should get an infinite radius of convergence.
>
>
>
>
The plot below is an animation of the first 15 partial sums of a power series. The function to which the partial sums are converging, is not shown however.
Make a rough guess of the radius of convergence (the value of R so that one sees "converging behavior" for
< x <
).
> par_sum_plot(3*(-1)^n*x^(2*n)/(8^n),n=0..15,x=-3..3,insequence=true);
>
>
Next time, we'll work on calculating this power series' radius of convergence, and finding the magic formula for which function it converges to!
>