>   

lab12.mws --- Sequences of Functions: Convergence

>    restart;
with( plots ):

Warning, the name changecoords has been redefined

>   

Auxiliary Procedures (execute, but do not change)

>    DisplayPtSeq := proc( F, Terms )
  local Domain, L, P1, P2, n, terms, pts;
  n := lhs(Terms);
  terms := rhs(Terms);
  Domain := min(op(terms))..max(op(terms));
  pts := [seq( [k,eval(F,[n=k])], k=terms )];
  P1 := plot( pts, style=point, symbol=circle, color=blue );
  if nargs>2 then
    L := args[3];
    P2 := plot( L, Domain, color=cyan, thickness=2 );
  else
    L := NULL;
    P2 := NULL;
  end if:
  return plots[display]( [P1, P2], view=[Domain,DEFAULT] )
end proc:

>    AnimateFnSeq := proc( F, Terms, Domain )
  local n, terms, f, G, P;
  n := lhs(Terms);
  terms := rhs(Terms);
  f := unapply( F, n );
  if nargs>3 then G := args[4] else G := NULL end if:
  P := [seq( plot( [f(n),G], Domain, title=sprintf("n=%a",n) ), n=terms )];
  plots[display]( P, insequence=true )
end proc:

>    DisplayFnSeq := proc( F, Terms, Domain )
  local n, terms, f, G, P;
  n := lhs(Terms);
  terms := rhs(Terms);
  f := unapply( F, n );
  if nargs>3 then G := args[4] else G := NULL end if:
  P := plot( [seq(f(n),n=terms),G], Domain );
  plots[display]( [P] )
end proc:

>   

Lab Overview

Limits have been the foundation for almost everything you have studied thus far in calculus. To date, all of these limits have been of one of two types: the limit of a function as the independent variable approaches a specific value -- limit(f(x),x = a) = L  -- or the limit of a sequence of numbers -- limit(a[n],n = infinity) = A .

 

This lab introduces a new type of limit -- the limit of a sequence of functions:

  limit(f[n](x),n = infinity) = g(x) .

Note, in particular, that the value of this limit will be a function . That is, the limit might depend on x  (but cannot depend on n ).

Another distinguishing feature of sequences of functions is that there are different types of convergence.

>   

Definition: Convergence in Norm

Let {f[n], n = 1 .. infinity}  be a sequence of functions defined on an interval [a, b] . We say the sequence {f[n]}  converges in norm on [a, b]  to a function g if

  Limit(Int(abs(f[n](x)-g(x))^2,x = a .. b),n = infinity) = 0 .

Notes:

1. For every integer n , define V[n] = Int(abs(f[n](x)-g(x))^2,x = a .. b) . Observe that V[n]  is a number (provided the integral exists).

2. The limit that appears in this definition is the limit of a sequence of numbers: limit(V[n],n = infinity) .

If this limit is not zero or does not exist, then the sequence of functions does not converge in norm on [a, b]  to g.

>   

>   

Definition: Pointwise Convergence

Let {f[n], n = 1 .. infinity}  be a sequence of function defined on an interval [a, b] . The sequence {f[n]}  is said to converge pointwise on   [a, b]   to  g if, for every   x  in [a, b] ,

  limit(f[n](x)-g(x),n = infinity) = 0 .

Notes:

1. Pointwise converge requires consideration of the sequence of numbers {f[n](x), n = 1 .. infinity}  where x  is a number in [a, b] .

2. Because there are an infinite number of points in [a, b]  this calls for the consideration of an infinite number of sequences.

3. In light of Note 2 above, it is impossible to check for pointwise convergence by direct calculation.

>   

>   

Uniform Convergence

Let {f[n], n = 1 .. infinity}  be a sequence of functions defined on an interval [a, b] . The sequence {f[n]}  is said to converge uniformly on   [a, b]   to  g if

limit(max[` x = [a, b] `]*abs(f[n](x)-g(x)),n = infinity) = 0

Notes:

1. For each integer n , define B[n]  to be the maximum value of abs(f[n](x)-g(x))  on the interval [a, b] . That is, B[n] = max[` x=[a,b] `]*abs(f[n](x)-g(x)) .

2. The sequence {f[n]}  converges uniformly to g if and only if limit(B[n],n = infinity) .

>   

>   

The examples provide graphical and other intuitive interpretations of the different types of convergence. It is particularly important to understand the connections between the different types of convergence. The Lab Questions will ask you to answer some questions about these examples.

>   

Continuing the practice started last week, this lab assignment includes a separate and explicit integration problem. You are encouraged to use the Integration  maplet [ Maplet Viewer][ MapleNet] to help with this problem.

  Deadline for submitting a lab solution is midnight, Thursday, April 10, 2003.  

>   

Example 1:

Consider the sequence of functions

>    F1 := (1-x^2)^(1/2+1/(2*n)):
f[n](x) = F1;

f[n](x) = (1-x^2)^(1/2+1/(2*n))

on the interval [ -1, 1 ].

Initial Investigation

The following command creates a nice picture of the first few terms of the sequence of functions

>    DisplayFnSeq( F1, n=[1,2,4,8,16], x=-1..1 );

[Maple Plot]

This  picture suggests that the functions do approach some limit. To determine this limit, note that the only place n  appears in the functions is the exponent and the exponents converge to 1/2  as n  approaches infinity . This suggests that the limit function should be

>    G1 := sqrt(1-x^2):
g(x) = G1;

g(x) = (1-x^2)^(1/2)

Confirmation that this is the correct limit can be obtained from the following animation

>    AnimateFnSeq( F1, n=[1,2,4,8,16], x=-1..1, G1 );

[Maple Plot]

The visual "convergence" shown in these plots needs to be translated into the language introduced at the beginning of this lab. Is the convergence uniform, pointwise, or in the norm?

>   

Pointwise Convergence

Recall that pointwise convergence occurs when, for every possible x  in [-1,1], the sequence of function values at x  converges. As pointed out previously, it is not possible to do this check for every  possible value of x  in [-1,1]. But, to check the convergence at selected values of x , say x = 1/2 , use a plot of the sequence of numbers {f[n](1/2), n = 1 .. infinity} :

>    DisplayPtSeq( eval(F1, x=1/2), n=[1,2,4,8,16,32,64,128], eval(G1,x=1/2) );

[Maple Plot]

Change the x = 1/2  in the above command to other points in [-1,1]. Can you find any values of x  that do not converge to g(x) ? These results provide a strong indication that {f[n](x), n = 1 .. infinity}  converges pointwise to g(x) = sqrt(1-x^2) .

An alternate approach to pointwise convergence is to examine the sequence {abs(f[n](x)-g(x)), n = 1 .. infinity} .

>    DisplayFnSeq( abs(F1-G1),n=[1,2,4,8,16,32,64, 128, 256, 512,1024],x=-1..1 );

[Maple Plot]

Pointwise convergence on [-1,1] is seen in the fact that the difference approaches zero for every point in the interval.

>   

Uniform Convergence

The last plot in the discussion of pointwise convergence suggests that for each n , abs(f[n](x)-g(x))   has a maximum value at two (symmetric) points. The location of the maximum values depends on n . But, the value of the maximum error on [-1,1] approaches zero as n  -> infinity . This is uniform convergence!

The same conclusion can be reached using the animation of abs(f[n](x)-g(x)) :

>    AnimateFnSeq( abs(F1-G1),n=[1,2,4,8,16,32,64, 128, 256, 512,1024],x=-1..1 );

[Maple Plot]

Convergence in the Norm

To investigate convergence in norm it is necessary to look at the sequence of numbers, V[n] , defined by

>    V1 := Int( (F1-G1)^2, x=-1..1 ):
V[n] = V1;

V[n] = Int(((1-x^2)^(1/2+1/(2*n))-(1-x^2)^(1/2))^2,x = -1 .. 1)

These integrals are not easy to evaluate, but Maple can help us to visualize the terms in this sequence:

>    DisplayPtSeq( V1, n=[1,2,4,8,16,32,64,128,256,512,1024] );

[Maple Plot]

These terms clearly decay to zero as n increases. That is, limit((f[n](x)-g(x))^2,n = infinity) = 0 . This means this sequence converges in the norm to g(x) = sqrt(1-x^2)  on [-1,1].

>   

>   

Example 2:

Consider the sequence of functions

>    F2 := piecewise(x<n,1/(1+(x-n)^2),x>=n,1):
f[n](x) = F2;

f[n](x) = PIECEWISE([1/(1+(x-n)^2), x < n],[1, n <= x])

on the entire real line.

Initial Investigation

The first few terms of the sequence of functions

>    DisplayFnSeq( F2, n=[$1..16], x=-1..20 );

[Maple Plot]

>   

It is difficult to determine the limit directly from the definition of the functions in this sequence. However, after a little thought it should become apparent that the limit at every point the plots of the first few functions suggest that the (pointwise) limit at every point is zero. That is,

>    G2 := 0:
g(x) = G2;

g(x) = 0

>   

Pointwise Convergence

The argument leading to the limiting function is really an argument that the sequence converges pointwise to the zero function. Additional evidence in support of this conclusion can be obtained by looking at the sequence of function values for a specific value of x , say x = 20 :

>    DisplayPtSeq( eval(F2,x=20), n=[1,2,4,8,16, 32,64,128], 0 );

[Maple Plot]

Look at similar plots for other values of x . Assuming 0 < x , the first few terms are 1 but eventually ( x  > n ) the sequences exhibit very rapid decay to zero. This is pointwise convergence. The following animation provides another view of this sequence of functions.

>    AnimateFnSeq( F2, n=[1,2,4,8,16,32,64,128,256], x=-1..300 );

[Maple Plot]

Based on these two views of the sequence, it is clear that the pointwise limit of the sequence of functions is g(x) = 0 .

>   

Uniform Convergence

Turning our attention to uniform convergence, abs(f[n](x)-g(x)) = 1  for all x  >= n . Thus, the maximum difference between a function in the sequence and the zero function (the proposed limit) is always 1. In particular,

  limit(max*abs(f[n](x)-g(x)),n = infinity) = limit(1,n = infinity)  = 1 <> 0 .

This means f[n]  does not converge uniformly to g = 0 .

>   

Convergence in the Norm

To investigate convergence in norm it is necessary to look at the sequence of numbers, V[n] , defined by

>    V2 := Int( (F2-0)^2, x=-infinity..infinity ):
V[n] = V2;

V[n] = Int(PIECEWISE([1/(1+(x-n)^2), x < n],[1, n <= x])^2,x = -infinity .. infinity)

Observe that these integrals can be broken into two pieces

>    V2a := Int( 1/(1+(x-n)^2)^2, x=-infinity..n ):
V2b := Int( 1^2, x=n..infinity ):
V[n] = V2a + V2b;

V[n] = Int(1/((1+(x-n)^2)^2),x = -infinity .. n)+Int(1,x = n .. infinity)

With a little work, the first integral (see Lab Question 2) can be evaluated. The result is

>    value( V2a );

1/4*Pi

The second integral is easier to evaluate:

>    value( V2b );

infinity

Thus, V[n] = infinity  for all integers n, and so the sequence does not converge in the norm to 0.

>   

>   

Example 3:

Consider the sequence of functions

>    F3 := 1/(1+n^3*(x-1/n)^2):
f[n](x) = F3;

f[n](x) = 1/(1+n^3*(x-1/n)^2)

on [-2,2] (or any closed and bounded interval).

>   

Initial Inspection

An animation of the first few tems in this sequence is

>    AnimateFnSeq( F3, n=[$1..16], x=-2..2 );

[Maple Plot]

The following command creates a nice composite picture of the first few terms of the sequence of functions

>    DisplayFnSeq( F3, n=[$1..16], x=-2..2 );

[Maple Plot]

The conclusion supported by each of these plots is that the limiting function should be

>    G3 := 0:
g(x) = G3;

g(x) = 0

>   

Pointwise Convergence

Examine the sequences {f[n](x), n = 1 .. infinity}  for several specific values of x .

>    DisplayPtSeq( eval(F3,x=1), n=[1,2,4,8,16, 32,64,128], 0 );

[Maple Plot]

Determine if this sequence converges pointwise to g(x) = 0 .

>   

Uniform Convergence

Notice that, for every positive integer n ,

>    f[n](1/n) = eval( F3, x=1/n );

f[n](1/n) = 1

Thus, the maximum difference between a function in the sequence and the zero function (the proposed limit) is always (at least) 1. In particular,

  limit(max*abs(f[n](x)-g(x)),n = infinity) = limit(1,n = infinity)  = 1 <> 0 .

What does this say about uniform convergnce for this sequence of functions?

>   

Convergence in the Norm

To investigate convergence in norm it is necessary to look at the sequence of numbers, V[n] , defined by

>    V3 := Int( (F3-0)^2, x=0..2 ):
V[n] = V3;

V[n] = Int(1/((1+n^3*(x-1/n)^2)^2),x = 0 .. 2)

To visualize selected terms in this sequence:

>    DisplayPtSeq( V3, n=[1,2,4,8,16,32,64,128] );

[Maple Plot]

What does the fact that these terms converge to zero say about convergence in the norm for this example?

>   

Example 4:

Consider the sequence of functions {f[n], n = 1 .. infinity}  on [-1,1] defined by

>    F4 := piecewise(abs(x)<1/n,1-1/(2*n)-n*x^2/2,1-abs(x)):
f[n](x) = F4;

f[n](x) = PIECEWISE([1-1/(2*n)-1/2*n*x^2, abs(x) < 1/n],[1-abs(x), otherwise])

>   

Initial Inspection

These functions are difficult to visualize at first. Here is an animated view of the first few terms of the sequence.

>    AnimateFnSeq( F4, n=[$1..16], x=-1..1 );

[Maple Plot]

>   

Looking more closely at the definition of the functions in this sequence, it is seen that the complicated part of the definition is only for abs(x)  < 1/n . Thus, as n  increases without bound, the limit should be

>    G4 := 1-abs(x):
g(x) = G4;

g(x) = 1-abs(x)

>   

Pointwise Convergence

To investigate pointwise convergence look at the difference between the values of the terms in the sequence and the limiting function

>    DisplayPtSeq( eval(F4-G4 ,x=1/50), n=[1,2,4,8,16,32,64,128,256], 0 );

[Maple Plot]

Change the value of x in the above command to look at several different points in the domain.

Notice that if n  > 1/x , then x  > 1/n  and so f[n](x) = 1-abs(x)  = g(x) . This means that that lim(f[n](x)-g(x),n = infinity) = 0  for all real numbers x .

>   

Uniform Convergence

Uniform convergence can be determined from the following plot:

>    DisplayFnSeq( G4-F4, n=[1,2,4,8,16,32,64], x=-1..1 );

[Maple Plot]

Observe that the maximum difference occurs at x = 0 :

>    eval( G4-F4,x=0 ) assuming n::posint;

1/(2*n)

What happens to this quantity as n increase without bound? What does this say about uniform convergence?

>   

Convergence in the Norm

To investigate convergence in norm it is necessary to look at the sequence of numbers, V[n] , defined by

>    V4 := Int( (F4-G4)^2, x=-1..1 ):
V[n] = V4;

V[n] = Int((PIECEWISE([1-1/(2*n)-1/2*n*x^2, abs(x) < 1/n],[1-abs(x), otherwise])-1+abs(x))^2,x = -1 .. 1)

This integral must be divided into three separate pieces:

>    V4a := Int( ((1-abs(x))-(1-abs(x)))^2, x=-1..-1/n ):
V4b := Int( ((1-1/(2*n)-n*x^2/2)-(1-abs(x)))^2, x=-1/n..1/n ):
V4c := Int( ((1-abs(x))-(1-abs(x)))^2, x=1/n..1 ):
V[n] = V4a + V4b + V4c;
`` = value(V4b) assuming n::posint;

V[n] = Int(0,x = -1 .. -1/n)+Int((-1/(2*n)-1/2*n*x^2+abs(x))^2,x = -1/n .. 1/n)+Int(0,x = 1/n .. 1)

`` = 1/(10*n^3)

Because these integrals can be explicitly evaluated, it is straightforward to see that limit(V[n],n = infinity)  exists. (What is its value?)

This can be confirmed by plotting elected terms in this sequence

>    DisplayPtSeq( V4, n=[1,2,4,8,16,32,64,128] );

[Maple Plot]

What do these conclusions say about convergence in the norm for this example?

>   

Example 5:

Consider the sequence of functions on [0,1] defined by

>    F5 := x^n:
f[n](x) = F5;

f[n](x) = x^n

Initial Inspection

>    DisplayFnSeq( F5, n=[$1..16], x=0..1 );

[Maple Plot]

It is tempting to claim that the limit of this sequence is the zero function.

>    G5 := 0;

G5 := 0

>   

Pointwise Convergence

Note that for all integers, n:

>    f[n](1) = eval( F5, x=1 );

f[n](1) = 1

Thus, limit(f[n](1),n = infinity) = limit(1,n = infinity)  = 1.

>    DisplayPtSeq( eval( abs(F5-G5), x=1/2 ), n=[1,2,4,8,16] );

[Maple Plot]

>    DisplayPtSeq( eval( abs(F5-G5), x=1 ), n=[1,2,4,8,16] );

[Maple Plot]

What does  this say about pointwise convergence?

>   

The animation of the first few differences between terms of the sequence and the limit function show conclusively that this sequence does not converge pointwise on [0,1] to the zero function.

>    AnimateFnSeq( abs(F5-G5), n=[1,2,4,8,16,32,64,128,256], x=0..1 );

[Maple Plot]

>   

Uniform Convergence

Because there is not pointwise convergence, it must be the case that the sequence does not converge uniformly. The formal justification for this conclusion is that max(abs(f[n](x)-g(x)))  >= abs(f[n](1)-g(1))  = 1-0 = 1 .

>   

Convergence in the Norm

The integrals involved in testing for convergence in the norm

>    V5 := Int( abs(F5-G5)^2, x=0..1 ):
V[n] = V5;
`` = value( V5 ) assuming n::posint;

V[n] = Int(abs(x^n)^2,x = 0 .. 1)

`` = 1/(1+2*n)

What is value of Limit(V[n],n = infinity) ? What does this say about convergence in the norm?

>   

>   

Example 6:

Consider the sequence of functions defined to be the derivatives (wrt x ) of the sequence in Example 4:

>    dF4 := diff( F4, x ):
f[n](x) = dF4;

f[n](x) = PIECEWISE([-n*x, abs(x) < 1/n],[-abs(1,x), otherwise])

The second entry, -abs(1,x) , is a special notation for the derivative of the absolute value function. This can be converted to a more standard form with

>    convert( -abs(1,x), piecewise, x );

PIECEWISE([1, x < 0],[undefined, x = 0],[-1, 0 < x])

Thus, the sequence of functions to be considered is

>    F6 := piecewise( x<-1/n, 1,abs(x)<1/n,-n*x,x>1/n,-1 ):
f[n](x) = F6;

f[n](x) = PIECEWISE([1, x < -1/n],[-n*x, abs(x) < 1/n],[-1, 1/n < x])

>   

Initial Inspection

An animation of selected terms in this sequence shows that the terms of the differentiated sequence of functions converge to a piecewise-defined function.

>    AnimateFnSeq( F6, n=[1,2,4,8,16,32,64], x=-1..1 );

[Maple Plot]

A proposed limit function is the derivative of the limit function in Example 4:

>    dG4 := diff( G4, x ):
G6 := convert( dG4, piecewise, x ):
g(x) = dG4;
`` = G6;

g(x) = -abs(1,x)

`` = PIECEWISE([1, x < 0],[undefined, x = 0],[-1, 0 < x])

>   

Pointwise and Uniform Convergence

>    DisplayFnSeq( F6-G6, n=[1,2,4,8,16,32,64,128], x=-1..1 );

[Maple Plot]

This plot suggets that, at least for x <> 0 , the terms in the sequence do converge to the proposed limit. However, for x = 0 , the limit function is not definied. This automatically means the sequence does not converge pointwise (or uniformly)

>   

Convergence in the Norm

The integral of the square of the difference between the terms of the sequence and the proposed limit is

>    V6 := Int( (simplify(F6-G6) assuming n::posint)^2, x=-1..1 ):
V[n] = V6;

V[n] = Int((PIECEWISE([-n*x, abs(x) < 1/n],[-abs(1,x), otherwise])+abs(1,x))^2,x = -1 .. 1)

A plot of the first few terms goes a long way to showing that this sequence does converge in the norm:

>    DisplayPtSeq( V6, n=[1,2,4,8,16,32,64,128] );

[Maple Plot]

Concluding Remark

Note that different types of convergence that apply for the related sequences in Examples 4 and 6.

>   

Example 7:

For our penultimate example, consider the sequence of functions on [0,2] defined by

>    F7 := n*x*exp(-n*x):
f[n](x) = F7;

f[n](x) = n*x*exp(-n*x)

Initial Inspection

As usual, begin with a picture (or animation) of the first few terms in the sequence:

>    AnimateFnSeq( F7, n=[$1..16], x=0..2 );

[Maple Plot]

The terms appear to be approach zero on the entire interval:

>    G7 := 0:
g(x) = G7;

g(x) = 0

>   

Pointwise Convergence

For a specific value of x, the function values might increase for a few terms but then quickly decreases towards 0 as n increases.

>    DisplayPtSeq( eval(F7,x=0.25), n=[1,2,4,8,16,32,64,128] );

[Maple Plot]

What does this say about pointwise convergence?

>   

Uniform Convergence

This is easiest to determine from a well-chosen plot:

>    DisplayFnSeq( abs(F7-G7), n=[1,2,4,8,16,32,64,128], x=0..2 );

[Maple Plot]

Observe that the maximum value is always the same even though the maximum occurs at points approaching x = 0  as n increases without bound. What does this say about uniform convergenc?

>   

Convergence in the Norm

The integrals involved in this test are rather complicated

>    V7 := Int( simplify((F7-G7)^2), x=0..2 ):
V[n] = V7;
`` = value( V7 );

V[n] = Int(n^2*x^2*exp(-2*n*x),x = 0 .. 2)

`` = -1/4*(exp(-4*n)+8*exp(-4*n)*n^2+4*exp(-4*n)*n-1)/n

>    limit( value(V7), n=infinity );

0

Maple evaluates this integral:

>    V[n] = value( V7 );

V[n] = -1/4*(exp(-4*n)+8*exp(-4*n)*n^2+4*exp(-4*n)*n-1)/n

In the limit as n  increases towards infinity, the values of these integrals rapidly decay to zero.

>    DisplayPtSeq( V7, n=[1,2,4,8,16] );

[Maple Plot]

>   

Example 8

For the final example, consider the sequence of functions on [0,2] defined to be

>    F8 := sqrt(n)*exp(-n*x):
f[n](x) = F8;

f[n](x) = n^(1/2)*exp(-n*x)

>   

Initial Inspection

This sequence should be fairly simple to evaluate from a few appropriately selected plots.

>    AnimateFnSeq( F8, n=[1,2,4,8,16,32], x=0..2 );

[Maple Plot]

>    G8 := 0;

G8 := 0

>   

Pointwise Convergence

>    DisplayPtSeq( eval( F8-G8,x=1/2), n=[1,2,4,8,16,32] );

[Maple Plot]

>   

Uniform Convergence

>    DisplayFnSeq( abs(F8-G8), n=[1,2,4,8,16,32], x=0..2 );

[Maple Plot]

>   

Convergence in the Norm

>    V8 := Int( simplify(abs(F8-G8)^2), x=0..2 ):
V[n] = V8;
`` = value( V8 ) assuming posint;

V[n] = Int(exp(-2*Re(n*x))*abs(n),x = 0 .. 2)

`` = -1/2*exp(-4*n)+1/2

>    DisplayPtSeq( V8, n=[1,2,4,8,16] );

[Maple Plot]

>   

>   

Lab Questions

1. [ 2 pts] Create a table [ Excel spreadsheet] that summarizes the results of each example considered above.

2. [5 pts] Based on your table in 1. decide if the following statements are true or false:

  a. uniform convergence implies pointwise convergence

  b. uniform convergence implies convergence in norm

  c. pointwise convergence implies uniform convergence

  d. pointwise convergence implies convergence in norm

  e. convergence in norm implies uniform convergence

  f. convergence in norm implies pointwise convergence

For each false statement, indicate one Example from earlier in the lab that supports your conclusion.

3. [2 pts] Integration problem. Show all steps in the evaluation of the integrals V2a  = Int(1/((1+(n-x)^2)^2),x = -infinity .. n)  = Pi/4  in Example 2. You may use any technology to help solve this problem. Your answer, however, must explain all steps in the evaluation.

>   

>