>   

lab7.mws --- Limits, l'Hopital's Rule, and Rates of Growth, "e" gads!

>    restart;
with( plots ):

Warning, the name changecoords has been redefined

>   

Lab Overview

Why are we taking time to develop l'Hopital's rule? Part of the answer is that the method does not make sense until you know about derivatives. Another part of the reason is that the indeterminate forms that can be evaluated with l'Hopital's rule are going to appear in several contexts within the next month or so of this course. The limits encoutnered in this lab have been selected specifically for their importance later in this course.

Maple's limit  command can evaluate almost any limit we are likely to ever encounter. l'Hopital's rule is applied automatically whenever it is needed. Simply using this command does not help us develop our understanding of limits. The Limit  maplet [ Maplet Viewer][ MapleNet] is a Java-based graphical interface written in Maple that allows us to focus on selecting appropriate techniques to evaluate integrals. While this maplet is similar to the Integration maplet [ Maplet Viewer][ MapleNet], it is not nearly as useful and will not be utilized explicitly in this lab. It is mentioned here for your information. Check it out if you are interested.

Except for the essay question, the questions for this lab are either taken from the assigned homework problems or other problems in the textbook.

  Deadline for submitting a lab solution is midnight, Thursday, February 27, 2003.  

>   

Example 1: Limit(arctan(3*x)/arcsin(x),x = 0)  (p. 407, # 4)

Let's start with a problem that is not at all obvious.

>    F := arctan(3*x)/arcsin(x):
L := Limit( F, x=0 ):
L;

Limit(arctan(3*x)/arcsin(x),x = 0)

When you first look at this problem, and note that arcsin(0) = 0 , it is difficult to know where to start. Most people just do not have the familiarity with the inverse trigonometric functions to be able to "see" the value of this limit. To begin to understand the problem, plot the function F(x) = arctan(3*x)/arcsin(x)  on an interval containing the origin. Because the arcsin function is defined only on `union`(`[-1,0)`,`(0,1]`) , that is the largest domain on which this function is defined.

>    p1 := plot( F, x=-1..-0.01, y=0..5 ):
p2 := plot( F, x=0.01..1, y=0..5 ):
display( [p1,p2] );

[Maple Plot]

>   

The plot suggests that the value of the limit will be 3. Let's see if we can confirm this using properties of limits. Because the denominator converges to 0 as x->0 there is a hope that l'Hopital's rule will apply. To check this, obtain the numerator and denominator and check their limits as x ->0:

>    f := numer(F):
Lf := Limit( f, x=0 ):
Lf = value( Lf );

Limit(arctan(3*x),x = 0) = 0

>    g := denom(F):
Lg := Limit( g, x=0 ):
Lg = value( Lg );

Limit(arcsin(x),x = 0) = 0

Because this limit has form 0/0 , l'Hopital's rule can be applied. The derivatives of the numerator and denominator are

>    f1 := Diff( f, x ):
g1 := Diff( g, x ):
f1 = value( f1 );
g1 = value( g1 );

Diff(arctan(3*x),x) = 3/(1+9*x^2)

Diff(arcsin(x),x) = 1/((1-x^2)^(1/2))

so

>    F1 := value( f1/g1 ):
f1/g1 = F1;

Diff(arctan(3*x),x)/Diff(arcsin(x),x) = 3/(1+9*x^2)*(1-x^2)^(1/2)

The original limit can be replaced by

>    L1 := Limit( F1, x=0 ):
L1;

Limit(3/(1+9*x^2)*(1-x^2)^(1/2),x = 0)

This limit is easy to evaluate:

>    L1 = eval( F1, x=0 );

Limit(3/(1+9*x^2)*(1-x^2)^(1/2),x = 0) = 3

Thus, as predicted from the plot,

>    L = L1;
`` = eval( F1, x=0 );

Limit(arctan(3*x)/arcsin(x),x = 0) = Limit(3/(1+9*x^2)*(1-x^2)^(1/2),x = 0)

`` = 3

To conclude, let's look at the plot of the two functions considered in this problem.

>    p3 := plot( F1, x=-1..1, y=0..5, color=green ):
display( [p1,p2,p3] );

[Maple Plot]

>   

Note that the functions are different, but do have the same limit at x = 0 .

>   

Example 2: Limit(x*ln(x),x = 0,right)  

The function

>    F := x*ln(x):
`F(x)`=F;

`F(x)` = x*ln(x)

is defined only for x  > 0. A plot of this function on an interval to the right of the origin

>    p1 := plot( F, x=0.01..3 ):
p1;

[Maple Plot]

suggests that

>    L := Limit( F, x=0, right ):
L = 0;

Limit(x*ln(x),x = 0,right) = 0

Now, let's see if we can confirm this. The original limit is has indeterminate form 0*infinity . To apply l'Hopital's rule it is necessary to convert this to a 0/0  or infinity/infinity  form. This can be done by writing the original problem as either

  F(x) = x*ln(x)  = ln(x)/(1/x)        ( infinity/infinity  )

or

  F(x) = x*ln(x)  = x/(1/ln(x))          ( 0/0  )

The first form looks more appealing because it is easier to differentiate ln(x)  than 1/ln(x) . To verify that l'Hopital's rule applies

>    f := ln(x):
Lf := Limit( f, x=0, right ):
Lf = value( Lf );

Limit(ln(x),x = 0,right) = -infinity

>    g := 1/x:
Lg := Limit( g, x=0, right ):
Lg = value( Lg );

Limit(1/x,x = 0,right) = infinity

Applying l'Hopital's rule means computing derivatives

>    f1 := Diff( f, x ):
g1 := Diff( g, x ):
f1 = value( f1 );
g1 = value( g1 );

Diff(ln(x),x) = 1/x

Diff(1/x,x) = -1/(x^2)

so

>    F1 := value( f1/g1 ):
f1/g1 = F1;

Diff(ln(x),x)/Diff(1/x,x) = -x

The original limit can be replaced by

>    L1 := Limit( F1, x=0, right ):
L1;

Limit(-x,x = 0,right)

This limit is easy to evaluate:

>    L1 = eval( F1, x=0 );

Limit(-x,x = 0,right) = 0

Thus, as predicted from the plot,

>    L = L1;
`` = eval( F1, x=0 );

Limit(x*ln(x),x = 0,right) = Limit(-x,x = 0,right)

`` = 0

To conclude, let's look at the plot of both functions considered in this problem.

>    p2 := plot( F1, x=0..1, color=green ):
display( [p1,p2] );

[Maple Plot]

>   

Note that the functions are different, but do have the same limit at x = 0 .

>   

Example 3: Limit(a^(1/n),n = infinity)  ( a  > 0)

The limit variable, n , is assumed to be an integer. In this form, l'Hopital's rule is not applicable. The usual approach to this problem is to convert the problem to an equivalent problem involving a real variable. In most situations this is done by simply replacing all occurrences of n  with x :

>    Ln := Limit( a^(1/n), n=infinity ):
Lx := Limit( a^(1/x), x=infinity ):
Ln = Lx;

Limit(a^(1/n),n = infinity) = Limit(a^(1/x),x = infinity)

To emphasize that these problems are equivalent -- and to gain insight into the value of this limit -- consider the following plot. This plot contains the

>    G := (a,n) -> a^(1/n):
p1 := plot( [seq([n,G(5,n)],n=1..10 )], style=point, color=blue,
            view=[0..10,0..5], legend=["a=5, discrete points"] ):
p2 := plot( G(5,x), x=1..10, color=cyan,
            legend=["a=5, continuous variable"] ):
p3 := plot( [seq([n,G(1/5,n)],n=1..10 )], style=point, color=red,
            view=[0..10,0..5], legend=["a=1/5, discrete points"] ):
p4 := plot( G(1/5,x), x=1..10, color=pink,
            legend=["a=1/5, continuous variable"] ):
display([p1,p2,p3,p4]);

[Maple Plot]

>   

Evaluation of this integral, for any a  > 0, begins by rewriting

  a^(1/x)  = exp(ln(a^(1/x)))  = exp(ln(a)/x)  

Then,

  Limit(a^(1/x),x = infinity)  = Limit(exp(ln(a)/x),x = infinity)  = exp(Limit(ln(a)/x,x = infinity)) .

The limit that interests us now is

>    L := Limit( ln(a)/x, x=infinity ):
L;

Limit(ln(a)/x,x = infinity)

In this limit, the denominator has a limit of infinity  while the numerator has a finite limit that can be either positive ( a  > 1), negative (0 < a  < 1 ) or zero ( a  = 1 ). This is not an indeterminate form; l'Hopital's rule cannot be applied!  However, it is easily seen that

  Limit(ln(a)/x,x = infinity)  = ln(a)*Limit(1/x,x = infinity)  = ln(a)*0  = 0

To conclude,

  Limit(a^(1/x),x = infinity)  = exp(Limit(ln(a)/x,x = infinity))  = exp(0)  = 1.

This is consistent with the plot.

>   

Example 4: limit((1+x)^(1/x),x = 0,right)  

This problem has an indeterminate form of 1^0 . L'Hopital's rule can be used only after it has been rewritten with an indeterminate form of 0/0  or infinity/infinity . Prior to rewriting the problem, however, let's see if a plot can suggest if this limit exists and what its value might be.

>    plot( (1+x)^(1/x), x=0.01..10, y=0..3 );

[Maple Plot]

This picure suggests the limit exists and has a value around 2.7.

To rewrite this problem in a form suitable for l'Hopital's rule, note

  (1+x)^(1/x)  = exp(ln((1+x)^(1/x)))  = exp(ln(1+x)/x) .

This means

  Limit((1+x)^(1/x),x = 0,right) = exp(Limit(ln(1+x)/x,x = 0,right))  

In the new limit

>    F := ln(1+x)/x:
L := Limit( F, x=0, right ):
L;

Limit(ln(1+x)/x,x = 0,right)

the fact that the numerator and denominator satisfy

>    f := numer( F ):
Lf := Limit( f, x=0, right ):
Lf = value( Lf );

Limit(ln(1+x),x = 0,right) = 0

>    g := denom( F ):
Lg := Limit( g, x=0, right ):
Lg = value( Lg );

Limit(x,x = 0,right) = 0

means this limit has indeterminate form 0/0. An application of l'Hopital's rule leads to

>    f1 := Diff( f, x ):
g1 := Diff( g, x ):
f1 = value( f1 );
g1 = value( g1 );

Diff(ln(1+x),x) = 1/(1+x)

Diff(x,x) = 1

so

>    F1 := value( f1/g1 ):
f1/g1 = F1;

Diff(ln(1+x),x)/Diff(x,x) = 1/(1+x)

The original limit can be replaced by

>    L1 := Limit( F1, x=0, right ):
L1;

Limit(1/(1+x),x = 0,right)

This limit is easy to evaluate:

>    L1 = eval( F1, x=0 );

Limit(1/(1+x),x = 0,right) = 1

Thus,

>    L = L1;
`` = eval( F1, x=0 );

Limit(ln(1+x)/x,x = 0,right) = Limit(1/(1+x),x = 0,right)

`` = 1

and so, the original limit is

  Limit((1+x)^(1/x),x = 0,right)  = exp(Limit(ln(1+x)/x,x = 0,right))  = exp(`1`)  = exp(1)  

To conclude, note that

>    exp(1) = evalf(exp(1));

exp(1) = 2.718281828

which is consistent with the conjecture made at the beginning of this problem.

>   

Example 5: Limit(x^(5/2)*exp(-x/30),x = infinity)  

Note: Essay Question

This example should help you to answer the Essay Question.

As x  increases without bound, the power function increases rapidly and the exponential decays to zero. What happens to their product? This problem begs for a plot, but how do we look at the behavior at infinity?

>    F := x^(5/2) * exp(-x/30):
P1 := plot( F, x=0..10 ):
P1;

[Maple Plot]

Based on this picture, it looks like the function might increase forever. But, 10 is not a very big number.

>    P2 := plot( F, x=0..100 ):
P2;

[Maple Plot]

Now it is clear that something more happens but we are not yet in a position to say anything about the limit at infinity .

>    P3 := plot( F, x=0..1000 ):
P3;

[Maple Plot]

This is a little more convincing - but how do we know nothing different happens for x  > 1000?

Initial Analysis

The limit has indeterminate form infinity*0 . This can be converted to the form infinity/infinity  by writing

  x^(5/2)*exp(-x/30) = x^(5/2)/exp(x/30) .

>    f := x^(5/2):
Lf := Limit( f, x=infinity ):
Lf = value( Lf );

Limit(x^(5/2),x = infinity) = infinity

>    g := exp(x/30):
Lg := Limit( g, x=infinity ):
Lg = value( Lg );

Limit(exp(1/30*x),x = infinity) = infinity

>   

First Application of l'Hopital's Rule

Applying l'Hopital's rule means computing the derivatives

>    f1 := Diff( f, x ):
g1 := Diff( g, x ):
f1 = value( f1 );
g1 = value( g1 );

Diff(x^(5/2),x) = 5/2*x^(3/2)

Diff(exp(1/30*x),x) = 1/30*exp(1/30*x)

so

>    F1 := value( f1/g1 ):
f1/g1 = F1;

Diff(x^(5/2),x)/Diff(exp(1/30*x),x) = 75*x^(3/2)/exp(1/30*x)

The original limit can be replaced by

>    L1 := Limit( F1, x=infinity ):
L1;
p1 := plot( F1, x=0..1000, color=green ):
display( [P3, p1] );

Limit(75*x^(3/2)/exp(1/30*x),x = infinity)

[Maple Plot]

This limit is not easily evaluated. In fact, it has indeterminate form infinity/infinity :

>    Lf1 := Limit( f1, x=infinity ):
Lf1 = value( Lf1 );

Limit(Diff(x^(5/2),x),x = infinity) = infinity

>    Lg1 := Limit( g1, x=infinity ):
Lg1 = value( Lg1 );

Limit(Diff(exp(1/30*x),x),x = infinity) = infinity

>   

Second Application of l'Hopital's Rule

A second application of l'Hopital's rule means computing the second derivatives

>    f2 := Diff( f1, x ):
g2 := Diff( g1, x ):
f2 = value( f2 );
g2 = value( g2 );

Diff(x^(5/2),`$`(x,2)) = 15/4*x^(1/2)

Diff(exp(1/30*x),`$`(x,2)) = 1/900*exp(1/30*x)

so

>    F2 := value( f2/g2 ):
f2/g2 = F2;

Diff(x^(5/2),`$`(x,2))/Diff(exp(1/30*x),`$`(x,2)) = 3375*x^(1/2)/exp(1/30*x)

The new limit to be considered is

>    L2 := Limit( F2, x=infinity ):
L2;
p2 := plot( F2, x=0..1000, color=blue ):
display( [P3,p1,p2] );

Limit(3375*x^(1/2)/exp(1/30*x),x = infinity)

[Maple Plot]

This limit is somewhat simpler, but still is indeterminate with form infinity/infinity .

>    Lf2 := Limit( f2, x=infinity ):
Lf2 = value( Lf2 );

Limit(Diff(x^(5/2),`$`(x,2)),x = infinity) = infinity

>    Lg2 := Limit( g2, x=infinity ):
Lg2 = value( Lg2 );

Limit(Diff(exp(1/30*x),`$`(x,2)),x = infinity) = infinity

>   

Third Application of l'Hopital's Rule

A third application of l'Hopital's rule means computing the third derivatives

>    f3 := Diff( f2, x ):
g3 := Diff( g2, x ):
f3 = value( f3 );
g3 = value( g3 );

Diff(x^(5/2),`$`(x,3)) = 15/8/x^(1/2)

Diff(exp(1/30*x),`$`(x,3)) = 1/27000*exp(1/30*x)

so

>    F3 := value( f3/g3 ):
f3/g3 = F3;

Diff(x^(5/2),`$`(x,3))/Diff(exp(1/30*x),`$`(x,3)) = 50625/x^(1/2)/exp(1/30*x)

Aha! Now we are getting somewhere! This limit is not an indeterminate form. In fact, the numerator is finite and the denominator increases without bound (as x increases towards infinity).

>   

The original limit can be replaced by

>    L3 := Limit( F3, x=infinity ):
L3;
p3 := plot( F3, x=0..1000, color=cyan ):
display( [P3,p1,p2,p3] );

Limit(50625/x^(1/2)/exp(1/30*x),x = infinity)

[Maple Plot]

Each limit encountered in the application of l'Hopital's rule appears to have a limit of 0 as x  increases.The current limit is easy to evaluate:

>    L3 = 0;

Limit(50625/x^(1/2)/exp(1/30*x),x = infinity) = 0

>   

Final Analysis

Thus, as predicted from the plot,

>    L = L1;
`` = L2;
`` = L3;
`` = value( L3 );

Limit(ln(1+x)/x,x = 0,right) = Limit(75*x^(3/2)/exp(1/30*x),x = infinity)

`` = Limit(3375*x^(1/2)/exp(1/30*x),x = infinity)

`` = Limit(50625/x^(1/2)/exp(1/30*x),x = infinity)

`` = 0

>   

Example 6: p. 413, # 48

Note: Count Your Blessings!

This example was originally the essay question. But, I decided that I felt the question is not quite adequately worded, I wanted to be sure you saw specific parts of this problem, and the problem is too long and slightly difficult. Also, I believe the current essay question will be more generally useful for you later in this course.

The first thing you should notice about this problem is that we are looking at the limit as n  -> infinity  of a sequence of functions . We will talk about sequences in much more detail in Chapter 10, but most of that discussion is about sequences of numbers . The functions used in this example are really functions of the index, n , and the variable, x :

>    unassign('n');

>    F := (n,x) -> n^2*x*exp(-n*x):
f[n](x) = F(n,x);

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

>   

(a)

The requested plot is

>    plot( [seq(F(n,x),n=1..6)], x=0..1,
      legend=[seq(sprintf("n=%a",n),n=1..6)] );

[Maple Plot]

>   

(b)

To answer this question we should look at later terms in the sequence. Here are f[11] , .., f[16] .

>    plot( [seq(F(n,x),n=11..16)], x=0..1,
      legend=[seq(sprintf("n=%a",n),n=11..16)] );

[Maple Plot]

Note that these functions have the same general shape but the maximum of each curve occurs earlier and is higher than for earlier curves in the sequence. For these functions, the function values are all very close to zero for all x  > 1/2.

Looking at the graph of f[51] , .., f[56] :

>    plot( [seq(F(n,x),n=51..56)], x=0..1,
      legend=[seq(sprintf("n=%a",n),n=51..56)] );

[Maple Plot]

we see that this trend continues and that the functions appear to be essentially zero for all x  > 0.2.

For our final plot, let's look at f[1] , f[51] , f[101] , and f[501] .

>    plot( [seq(F(n,x),n=[1,51,101,501])], x=0..1,
      legend=[seq(sprintf("n=%a",n),n=[1,51,101,501])] );

[Maple Plot]

It is now pretty clear that, for each x  in [0,1]

  Limit(f[n](x),n = infinity) = 0 .

>   

(c)

The six requested integrals are

>    for n from 1 to 6 do
  q := Int( F(n,x), x=0..1 );
  print( q=value( q ));
end do:

Int(x*exp(-x),x = 0 .. 1) = -2*exp(-1)+1

Int(4*x*exp(-2*x),x = 0 .. 1) = -3*exp(-2)+1

Int(9*x*exp(-3*x),x = 0 .. 1) = -4*exp(-3)+1

Int(16*x*exp(-4*x),x = 0 .. 1) = -5*exp(-4)+1

Int(25*x*exp(-5*x),x = 0 .. 1) = -6*exp(-5)+1

Int(36*x*exp(-6*x),x = 0 .. 1) = -7*exp(-6)+1

>   

(d)

The results in (c) follow an obvious pattern:

  Int(f[n](x),x = 0 .. 1) = -(n+1)*exp(-n)+1  

>    plot( [seq([n,Int(F(n,x),x=0..1)],n=1..20)], style=point, view=[0..20,0..1.5] );

[Maple Plot]

>   

Thus, using Lab Question 6 (with p = 1  and a = 1  and with p = 1  and a = 0 ) we find

  Limit(Int(f[n](x),x = 0 .. 1),n = infinity)  = Limit(-(n+1)*exp(-n)+1,n = infinity)  = -Limit(n*exp(-n),n = infinity)-Limit(exp(-n),n = infinity)+Limit(1,n = infinity)  = -0-0+1  = 1

>   

Concluding Remarks

Observation 1: Limit(f[n](x),x = infinity)  and Limit(f[n](x),n = infinity)  are very different questions

For a fixed index , n , Lab Question 6 (with p = 1  and a = n ) can be used to show

  Limit(f[n](x),x = infinity)  = Limit(n^2*x*exp(-n*x),x = infinity)  = n^2*Limit(x*exp(-n*x),x = infinity)  = n^2*0  = 0

But, this is a completely different question than looking at Limit(f[n](x),n = infinity)  for a fixed value of the variable , x .

>   

Observation 2: Interchanging limits is not always permitted

The real point of this example is to show that interchanging two limit operations may not be permissible. Here the two limits are the limit as n  -> infinity  and the limit involved in the Riemann Sum definition of the definite integral.

In (d) we found that

  Limit(Int(f[n](x),x = 0 .. 1),n = infinity) = 1 .

Conversely, in (b), we found that for each specific value of x > 0:

  Limit(f[n](x),n = infinity) = 0 .

Therefore,

  Int(Limit(f[n](x),n = infinity),x = 0 .. 1) = Int(0,x = 0 .. 1)  = 0.

This means that

  Limit(Int(f[n](x),x = 0 .. 1),n = infinity) <> Int(Limit(f[n](x),n = infinity),x = 0 .. 1)  

>   

>   

>   

Lab Questions

1. p. 407, #   8

2. p. 408, # 32

3. p. 413, #   2

4 Limit(n^(1/n),n = infinity)  

5 Limit((1+a/n)^n,n = infinity)  

6. [Essay Question] Explain the steps needed to show that

  Limit(x^p*exp(-a*x),x = infinity) = 0   for all real values of p  >= 0 and all real values of a  > 0

Include how you rewrite the limit in an indeterminate form suitable to apply l'Hopital's rule and how many times l'Hopital's rule is applied. (Remember that p  and a  are real real numbers, not integers.) Also, explain how this limit justifies the following statement:

 every exponentially growing function grows faster than every nonnegative power for large values of the variable.

>   

>