Calculus II
Lesson 15: Convergence of Sequences
Sequence Convergence
We have used sequences lots of times before. The sequence of estimates to the solution of an equation generated by Newton's Method is one. The sequence of estimates to the integral of a function over an interval obtained by subdividing the interval into more and more subintervals is another. These are examples of potentially infinite sequences. These are sequences we hope converge to the answer we seek, whether it be the solution of an equation or the value of an integral.
Formally, a sequence of numbers is defined as a function f whose domain is the positive integers. The terms of the sequence are the values of the function. So for example the 10th term of the sequence f is f(10).
The Maple word limit can be used to calculate many limits of sequences in a painfree manner. For example,
> limit((1+1/n)^n,n=infinity);
The next theorems summarize many of the properties of convergent sequences.
Theorem: If
is an increasing sequence (ie,
for all
), then
converges if there is an upper bound on the terms of
.
Theorem: If
converges to
and
converges to
, then
converges to
,
converges to
, and
converges to
. Also, if
, then
converges to
.
Theorem: If
is a sequence of positive numbers and
is a sequence which converges to 0, then if
for all
, then
converges to 0.
Theorem: If
is continuous at
, and
is a sequence converging to
, then the sequence
converges to
.
>
Periodic Points of functions.
> plot({cos(x),x},x=-Pi..Pi);
To find the fixed point more precisely, use fsolve .
> fix := fsolve(cos(x)=x,x,0..Pi);
An attracting fixed point is a fixed point a with the property that for points b close to a,
> limit(b[n],n=infinity) = a;
where
, and
for
...
> limit(b[n],n=infinity) <> a;
where
, and
for
, ... .
~
Here is a simple procedure to investigate periodic points and fixed points of a function.
>
iterate := proc(f,n,x)
local a,i,s;
a := evalf(x);
s := a;
for i to n do a := f(a);
s := s,a od
end:
For example, to investigate whether the fixed point of the cosine function is attracting or not, we can iterate the function at a point near the fixed point. Using the fixed point of the cos function,
> fix := fsolve(cos(x)=x,x);
> iterate(cos,10,fix-1),fix;
The fixed point seems to be an attracting one. On the other hand if we look at the fixed points of 2x(1-x),
> f := x-> 2*x*(1-x);
> fix := fsolve(f(x)=x,x);
> iterate(f,10,fix[1]-.2);
> iterate(f,10,fix[1]+.1);
> iterate(f,10,fix[2]+.4);
It seems that 0 is an repelling fixed point and that .5 is an attracting fixed point. Let's define a visual word to go with iterate. We have added a domain and range to allow you to determine the viewing window.
>
viterate := proc(f,n,start,domain,range)
local a, i, s, gra, gpl, fpl, ipl;
a := evalf(start);
gra := [a,f(a)];
for i to n do a := f(a);
gra := gra,[a,a],[a,f(a)];
od:
gpl := plot([gra],color=red);
fpl := plot(f,domain,color=black);
ipl := plot(x->x,domain,color=blue);
print(plots[display]([gpl,fpl,ipl],view=[domain,range]));
end:
> viterate(x->2*x*(1-x),10,.8,-1..1 ,-1..1);
This gives a nice visual tool to investigate fixed points and periodic points of functions.
Problems
Exercise: Use iterate or viterate to check more starting points close the the fixed point of cos. Do you remain convinced that it is a repelling fixed point?
> fx := fsolve(cos(x)=x,x);
> viterate(cos,10,.1,-1..2,-1..1);
2. Find the periodic points of period 2 of
. . (Hint: the period points of order two of f would be the fixed points of
which are not fixed points of f. Classify them as repelling, attracting, or neither.
Exercise: Let
be a sequence of positive numbers converging to 0. Imagine yourself starting at the origin and travelling east
miles, then turning north and going
miles, then west
miles, and so forth, cycling through the directions as you go through the sequence
. (1) Where do you end up? (2) How far do you travel along your path. Work the answers out for the sequences
and
.
Solution:
Call the point where we end up [x,y]. Then x =
..., the sum of the alternating series of odd terms of the sequence
and y is the sum of the alternating series of even terms of the sequene. So for the sequence
> a := n-> 1/n;
> x = sum((-1)^n*a(2*n+1),n=0..infinity);
> y = sum((-1)^n*a(2*(n+1)),n=0..infinity);
and for the sequence
> a := n-> 1/2^n;
> x = sum((-1)^n*a(2*n+1),n=0..infinity);
> y = sum((-1)^n*a(2*(n+1)),n=0..infinity);
(2) The total distance we travel along the path is the sum of all the distances travelled. So for the sequence
> a := n->1/n;
> 'distance' = sum(a(n),n=1..infinity);
the distance is infinity! This is perhaps surprizing at first, since each time we turn we go a smaller distance than the last time. On the other hand, for the sequence
> a := n->1/2^n;
> 'distance' = sum(a(n),n=1..infinity);
The distance travelled is only 1 unit.
Exercise: Suppose we wanted to draw the paths described in the above problem. Here is a procedure which will do that. Use it to draw the paths for the sequences
, and
.
>
cycle := proc(a,m)
local path,i, dir,x,y,pt,ed;
x := evalf(sum((-1)^n*a(2*n+1),n=0..infinity));
y := evalf(sum((-1)^n*a(2*(n+1)),n=0..infinity));
path := [0,0];
dir := 1,0;
for i from 1 to m do
path := path,[path[i][1]+dir[1]*a(i),
path[i][2]+dir[2]*a(i)];
dir := -dir[2],dir[1];
od;
pt := plot([path],scaling=constrained,color=red,thickness=2);
ed := plot({[x,y]},style=point,symbol=box):
plots[display]([pt,ed],title=cat("end at ",convert([x,y],string)));
end:
Solution:
For the sequenc 1/n
> cycle(n->1/n,15);
> cycle(n->1/2^n,15);