L21-LHospital.mws

Calculus I

Lesson 21: L'Hospital's Rule

Example 1
We find each of the following limits, first without Maple and then with Maple.

Plot a graph to visualize your answer.

> restart; with(plots):

Warning, the name changecoords has been redefined

a) Limit((x-2)/(x^2-4),x = 2)

We see:

Limit((x-2)/(x^2-4),x = 2) = Limit(1/(x+2),x = 2) = 1/4 .

> limit((x-2)/(x^2 - 4), x = 2);

1/4

> aa:= plot((x-2)/(x^2 - 4), x = 0..3, color = red):

> ba:= plot([x,0.25, x = 0..2], color = magenta):

> ca:= plot([2,x,x = 0..0.25], color = magenta):

> display(aa,ba,ca);

[Maple Plot]

b) Limit((x^6-1)/(x^4-1),x = 1)

We see:

Limit((x^6-1)/(x^4-1),x = 1) = Limit(6*x^5/(4*x^3),x = 1) = 3/2 .

> limit( (x^6 - 1)/(x^4 - 1) , x = 1);

3/2

> ab:= plot((x^6 - 1)/(x^4 - 1), x = 0..2, color = red):

> bb:= plot([x,3/2,x = 0..1], color = magenta):

> cb:= plot([1,x,x = 0..3/2], color = magenta):

> display((ab,bb,cb));

[Maple Plot]

c) Limit((e^x-1)/sin(x),x = 0)

We see:

Limit((e^x-1)/sin(x),x = 0) = Limit(e^x/cos(x),x = 1) = 1.

> limit( (exp(x) - 1)/(sin(x)), x = 0);

1

> ac:= plot((exp(x) - 1)/(sin(x)), x = -1..-0.001, color = red):

> bc:= plot((exp(x) - 1)/(sin(x)), x = 0.001..1, color = red):

> cc:= plot([x,1,x = -0.5..0.5], color = magenta):

> display((ac,bc,cc));

[Maple Plot]

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

We see:

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

> limit( (ln(x)) / x , x = infinity);

0

> plot((ln(x)) / x , x = 1..100);

[Maple Plot]

e) Limit(sin(x)^2/tan(x^2),x = 0)

We see:

Limit(sin(x)^2/tan(x^2),x = 0) = Limit(2*sin(x)*cos(x)/(2*x*sec(x)^2),x = 0)

= Limit(sin(x)/x,x = 0) = Limit(cos(x)/(sec(x^2)^2),x... = 1 * 1 = 1.

> limit( ((sin(x))^2) / ( tan(x^2)), x = 0);

1

> ae:= plot(((sin(x))^2) / ( tan(x^2)), x = -1..-0.01, color = red):

> be:= plot(((sin(x))^2) / ( tan(x^2)), x = 0.01..1, color = red):

> display((ae,be));

[Maple Plot]

f) Limit(arctan(2*x)/(3*x),x = 0)

We see:

Limit(arctan(2*x)/(3*x),x = 0) = Limit(2/(1+4*x^2)/3,x = 0) = 2/3 .

> limit( (arctan(2*x))/(3*x) , x = 0);

2/3

> af:= plot((arctan(2*x))/(3*x), x = -1..-0.01, color = red):

> bf:= plot((arctan(2*x))/(3*x), x = 0.01..1, color = red):

> cf:= plot([x,2/3,x = -0.5..0.5], color = magenta):

> display((af,bf,cf));

[Maple Plot]

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

We see:

Limit(sqrt(x)*ln(x),x = 0,right) = Limit(ln(x)/(x^(-1/2)),x = 0,right)

= Limit(1/x/(-x^(-3/2)/2),x = 0,right) = Limit(-2*sqr... = 0.

> limit( sqrt(x)* ln(x) , x = 0, right);

0

> plot(sqrt(x)* ln(x), x = 0.001..5);

[Maple Plot]

h) Limit(x*e^(1/x)-x,x = infinity)

We see:

Limit(x*e^(1/x)-x,x = infinity) = Limit(x*(e^(1/x)-1),x = infinity)

= Limit((e^(1/x)-1)/(1/x),x = infinity) = Limit((-e^(...

= Limit(e^(1/x),x = infinity) = 1 .

> limit( x * exp(1/x) - x, x = infinity);

1

> plot(x * exp(1/x) - x, x = 1..100, color = red);

[Maple Plot]

i) Limit(x^sin(x),x = 0,right)

Let y = x^sin(x) . Then, ln(y) = sin(x)*ln(x) .

We see:

Limit(sin(x)*ln(x),x = 0,right) = Limit(ln(x)/csc(x...

= Limit(1/x/(-csc(x)*cot(x)),x = 0,right)

= -Limit(sin(x)/x,x = 0,right) = Limit(tan(x),x = 0,r... = -1 * 0 = 0.

Hence,

Limit(x^sin(x),x = 0,right) = Limit(e^ln(y),x = 0,right) = 1 .

> limit( x ^(sin(x)), x = 0, right);

1

> plot(x ^(sin(x)), x = 0.001..2, color = red);

[Maple Plot]

j) Limit((e^x+x)^(1/x),x = infinity)

Let y = (e^x+x)^(1/x) . Then, ln(y) = 1/x*ln(e^x+x) .

We see:

Limit(ln(y),x = infinity) = Limit(ln(e^x+x)/x,x = i...

= Limit((e^x+1)/(e^x+x),x = infinity)

= Limit(e^x/(e^x+1),x = infinity) = 1 .

Hence,

Limit((e^x+x)^(1/x),x = infinity) = Limit(e^ln(y),x = infinity) = e .

> limit( (exp(x) + x)^(1/x), x = infinity);

exp(1)

> plot((exp(x) + x)^(1/x), x = 2..50, color = red);

[Maple Plot]

k) Limit((1+1/x)^(x^2),x = infinity)

Let y = (1+1/x)^(x^2) . Then, ln(y) = x^2*ln(1+1/x) .

We see:

Limit(x^2*ln(1+1/x),x = infinity) = Limit(ln(1+1/x)...

= Limit((-1/(x^2))/(1+1/x)/(-2/(x^3)),x = infinity)

= Limit(x/(2*(1+1/x)),x = infinity) = infinity .

Hence,

Limit((1+1/x)^(x^2),x = infinity) = Limit(e^ln(y),x = infinity) = infinity .

> limit( ( 1 + 1/x)^(x^2), x = infinity);

infinity

> plot(( 1 + 1/x)^(x^2), x = 2..10, color = red);

[Maple Plot]

Example 2

The diagram shows a sector of a circle with central angle theta = theta .

Let A = A(theta) be the area of the region between the chord PR and the arc PR.

Let B = B(theta) be the area of the triangle PQR.

Find Limit( A(theta)/B(theta), theta = 0, right). Plot A(theta)/B(theta) to visualize your answer.

From your plot what happens to A(theta)/B(theta) as theta goes to Pi /2?

Here is the code for the diagram.

> data:= ([0,0], [0.5, sqrt(3)/2]):

> data1:= ([0.5, sqrt(3)/2], [1,0]):

> data2:= ([0.5,sqrt(3)/2], [0.5,0]):

> a:= plot( sqrt(1 - x^2), x = 0..1, color = red):

> b:= plot([data], color = orange):

> c:= plot([data1], color = orange):

> d:= plot([data2], color = orange):

> e:= textplot([.07,.05,`O`],color = magenta):

> f:= textplot([.54,.05,`Q`], color = magenta):

> g:= textplot([.9,.05,`R`], color = magenta):

> h:= textplot([.4,.8,`P`], color = magenta):

> l:= textplot([.25,.15,`theta`], color = magenta):

> m:= textplot([.65,.35,`B`], color = red):

> n:= textplot([.8,.5,`A`], color = red):

> o:= plot(sqrt(.04 - x^2), x = 0.1..0.2, color = red):

> display(a,b,c,d,e,f,g,h,l,m,n,o, scaling=constrained);

[Maple Plot]

Let the radius of the circle be r. We have:

A(theta) = area of entire sector - area of triangle OPR = theta*r^2/2-r/2*r*sin(theta) = r^2/2*(theta-sin(the...

and

B(theta) = |QR| |PQ|/2 = r/2*(1-cos(theta))(rsin(theta)) .

Hence,

Limit(A(theta)/B(theta),theta = 0,right) = Limit(r^...

= Limit((1-cos(theta))/((1-cos(theta))*cos(theta)+sin...

= Limit((1-cos(theta))/(cos(theta)-cos(theta)^2+sin(t...

= Limit(sin(theta)/(-sin(theta)+4*sin(theta)*cos(thet...

= Limit(1/(-1+4*cos(theta)),theta = 0,right) = 1/3 .

> A:= x -> (0.5) * x^2 * ( x - sin(x));

A := proc (x) options operator, arrow; .5*x^2*(x-si...

> B:= x -> (0.5) * x * ( 1 - cos(x)) * x * sin(x);

B := proc (x) options operator, arrow; .5*x^2*(1-co...

> az:=plot(A(x)/B(x), x = 0.01..Pi/2, color = red):

> bz:= plot([x,1/3, x = 0.01..Pi/2], color = magenta):

> display((az,bz));

[Maple Plot]

> evalf( A(Pi/2) / B(Pi/2) );

.570796327

From the plot we see that as theta goes to Pi /2, A( theta )/B( theta ) goes to approximately .570796327 .