Jump to content

L'Hôspital's rule – "Math for Non-Geeks"

From Wikibooks, open books for an open world

As a final application of the mean value theorem, more precisely the second mean value theorem, we want to derive L'Hospital's rule. This is a practical way to determine the limit of a quotient by separately differentiating numerator and denominator. The rule is named after the French mathematician Guillaume de l'Hôpital, but was first derived by the Swiss mathematician Johann Bernoulli.

L’Hospital's rule

[edit | edit source]
Theorem (L’Hospital's rule)

Let x~∈ℝ∪{−∞,∞} and I:=(a,x~) with a<x~ or I:=(x~,b) with b>x~. Let f,g:I→ℝ be two differentiable functions where g′(x)≠0 for all x∈I. Further, suppose that the limit limx→x~f′(x)g′(x)=:q exists and one of the following two statements is true:

  1. limx→x~f(x)=0 and limx→x~g(x)=0
  2. limx→x~f(x),limx→x~g(x)∈{−∞,∞}.

Then, there is limx→x~f(x)g(x)=q.

Proof (L’Hospital's rule)

We first look at the case with x~∈ℝ. Because limx→x~f(x)=0 and limx→x~g(x)=0 we can continue the functions f and g continuously. We obtain the functions f̂,ĝ:I∪{x~}→ℝ with f̂(x):=f(x) and ĝ(x):=g(x) for all x∈I. Further we set f̂(x~):=0 and ĝ(x~):=0.

We now look at any sequence (xn)n∈ℕ which converges towards x~. Since the functions f̂ and ĝ are continuous, we can apply the generalized mean value theorem. So there is a sequence (zn)n∈ℕ, such that for all n∈ℕ we have zn∈(x~,xn) or zn∈(xn,x~) and


f(xn)g(xn)↓ f(xn)=f̂(xn) and g(xn)=ĝ(xn) for all n∈ℕ, since xn∈I,f̂(x~)=0=ĝ(x~)= f̂(xn)−f̂(x~)ĝ(xn)−ĝ(x~)↓ generalized mean value theorem= f̂′(zn)ĝ′(zn)= f′(zn)g′(zn)

Thus,

limn→∞f(xn)g(xn)= limn→∞f′(zn)g′(zn)= limx→x~f′(x)g′(x)= q

Since this does even hold for every arbitrary sequence (xn)n∈ℕ, there is in total limx→x~f(x)g(x)=q.


Clipboard

To do:
case 2


Now let us consider the case x~∈{−∞,∞}. To do this, we define the auxiliary functions f~,g~:J→ℝ choosing a c∈I with c>0 for x~=∞ or c<0 for x~=−∞. We set J:=(0,1c) or J:=(1c,0). For all x∈J we set f~(x):=f(1x) and g~(x):=g(1x).

In the following, we consider only the case x~=∞, because the proof for x~=−∞ is analogous. There is:

limx→∞f(x)=limx→∞f~(1x)=limx→0f~(x)limx→∞g(x)=limx→∞g~(1x)=limx→0g~(x)

We can therefore apply L'Hospital's rule for the case x~=0, which we have already proved. There is:

limx→∞f(x)g(x)↓ limx→∞f(x)=limx→0f~(x) and limx→∞g(x)=limx→0g~(x)= limx→0f~(x)g~(x)↓ L’Hospital's rule= limx→0f~′(x)g~′(x)↓ chain rule in enumerator and denominator, f~(x)=f(1x),g~(x)=g(1x) for all x with 1x∈J= limx→0−f′(1x)x2−g′(1x)x2= limx→0f′(1x)g′(1x)= limx→∞f′(x)g′(x)= q


Clipboard

To do:
finish writing


Examples and applications

[edit | edit source]

Standard types 00 and ±∞±∞

[edit | edit source]

First, we will deal with the types where the rules can be applied directly.

Example (Limits via L’Hospital 1)

First, some commonly found application: find

limx→0sin⁡(x)x

There is limx→0sin⁡(x)=limx→0x=0. In addition, f(x)=sin⁡(x) and g(x)=x are differentiable on (0,∞) , and there is g′(0)=1≠0. Since further

limx→0f′(x)g′(x)=limx→0cos⁡(x)1=cos⁡(0)1=1

exists, there is by L’Hospital's theorem

limx→0sin⁡(x)x=1

In general, we do not write this down in such detail. We check the requirements in our heads and write down the result as follows:

limx→0sin⁡(x)x =00L.H. limx→0cos⁡(x)1=1

Hint

With the rule of L'Hospital the limit value limx→0sin⁡(x)x can be calculated within "one line". We would like to point out, however, that when applying the rule, we use the derivative

sin′⁡(x)=limh→0sin⁡(x+h)−sin⁡(x)h=…=sin⁡(x)⋅limh→0cos⁡(h)−1h⏟=0+cos⁡(x)⋅limh→0sin⁡(h)h⏟=1=cos⁡(x)

It was therefore precisely this limit value that was needed to calculate it. Since we assume that the derivatives of the basic functions are known once they have been calculated, this is not a problem.

Exercise (Limits via L’Hospital)

Determine the following limits:

  1. limx→0ex−1x
  2. limx→0ln⁡(1+x)x
Solution (Limits via L’Hospital)

Part 1:

limx→0ex−1x =00L.H. limx→0ex1=e0=1

Part 2:

limx→0ln⁡(1+x)x =00L.H. limx→011+x1=11=1

Example (Limits via L’Hospital 2)

Next, we determine

limx→∞ln⁡(x)x

There is limx→∞ln⁡(x)=∞=limx→∞x. Since also the other conditions for the theorem of L'Hospital are fulfilled, there is

limx→∞ln⁡(x)x =L'H limx→∞1x1=limx→∞1x=0

This limit value can be generalized for α>0 to

limx→∞ln⁡(x)xα =L'H∞∞ limx→∞1xαxα−1=limx→∞1αxα=0

Exercise (Limits via L’Hospital 2)

Determine for α>0 the limit

limx→∞eαxx

Solution (Limits via L’Hospital 2)

There is

limx→∞eαxx =L'H∞∞ limx→∞αeαx1=limx→∞αeαx=∞

Sometimes it is also necessary to apply the rules of L'Hospital several times in a row before we reach the desired result.

Example (Limits via L’Hospital 3)

Next, we determine

limx→01−cos⁡(x)x2

There is limx→01−cos⁡(x)=0=limx→0x2. Using L’Hospital, we obtain

limx→01−cos⁡(x)x2 =L'H limx→0sin⁡(x)2x

Now again, limx→0sin⁡(x)=0=limx→02x. Using L’Hospital again, we finally obtain

limx→0sin⁡(x)2x =L'H limx→0cos⁡(x)2=12

So all in all, there is

limx→01−cos⁡(x)x2=12

Exercise (Limits via L’Hospital 3)

Determine the limits

  1. limx→∞ex−x−1x2
  2. limx→0x3sin⁡(x)−x
Solution (Limits via L’Hospital 3)

Part 1:

limx→∞ex−1−xx2 =∞∞L.H. limx→∞ex−12x =∞∞L.H. limx→∞ex2=∞

Part 2:

limx→0x3sin⁡(x)−x =00L.H. limx→03x2cos⁡(x)−1 =00L.H. limx→06x−sin⁡(x) =00L.H. limx→06−cos⁡(x)=6−1=−6

Type 0⋅(±∞)

[edit | edit source]

Here, the rules of L'Hospital are not directly applicable. The "trick" is therefore to create a fraction by forming reciprocal values, and thus to obtain a limit value in the standard form 00 or ±∞±∞.

Example (Limits via L’Hospital 4)

A standard example is the limit

limx→0+xln⁡(x)

There is limx→0+x=0 and limx→0+ln⁡(x)=−∞. We take the reciprocal value

limx→0+xln⁡(x)=limx→0+ln⁡(x)1x

Since there is limx→0+1x=∞, we can indeed apply L’Hospital and obtain

limx→0+ln⁡(x)1x =L'H limx→0+1x−1x2=limx→0+−x=0

Warning

The following term shift

limx→0+xln⁡(x)=limx→0+x1ln⁡(x)

renders an expression 00. However, by applying the rule of L'Hospital,

limx→0+x1ln⁡(x)=L'Hlimx→0+1−1ln⁡(x)2⋅1x=limx→0+−xln⁡(x)2

This expression is now again of the type 0⋅∞, but has a more complicated form than the original one. So the trick does not always lead to success!

Hint

For two arbitrary functions f and g with respective properties, the re-formulation trick reads:

limx→x0f(x)⋅g(x)=limx→x0f(x)1g(x)

or

limx→x0f(x)⋅g(x)=limx→x0g(x)1f(x)

Depending on which of the two forms is used, the limit value can then be calculated more easily.

Exercise (Limits via L’Hospital 4)

Compute

  1. limx→0+x2ln⁡(x)
  2. limx→0+x(ln⁡(x))2
  3. limx→−∞xex
Solution (Limits via L’Hospital 4)

Part 1:

limx→0+x2ln⁡(x)=limx→0+ln⁡(x)1x2 =−∞∞L'H. limx→0+1x−2x3=limx→0+−12x2=0

Part 2:

limx→0+x(ln⁡(x))2=limx→0+(ln⁡(x))21x =∞∞L'H. limx→0+2ln⁡(x)⋅1x−1x2=limx→0+2ln⁡(x)−1x =−∞−∞L'H. limx→0+2x1x2=limx→0+2x=0

Part 3:

limx→−∞xex=limx→−∞x1ex=limx→−∞xe−x =−∞∞L'H. limx→−∞1−e−x=limx→−∞−ex=0

Type ∞−∞

[edit | edit source]

Next, we will deal with differences of limit values, both of which converge improperly towards ∞. These are often differences of fractional terms. By forming the principal denominator and grouping them into a fractional term, the expression can often be transformed such that the rules of L'Hospital are applicable.

Example (Limits via L’Hospital 5)

Consider the limit

limx→0+1sin⁡(x)−1x

Here we have limx→0+1sin⁡(x)=limx→01x=∞. So the limit value is of the described type ∞−∞. By forming the principal denominator we obtain

limx→0+1sin⁡(x)−1x=limx→0+x−sin⁡(x)xsin⁡(x)

Since limx→0+xsin⁡(x)=0=limx→0+x−sin⁡(x) we are able to apply L’Hospital and obtain

limx→0+x−sin⁡(x)xsin⁡(x) =L'H. limx→0+1−cos⁡(x)sin⁡(x)+xcos⁡(x) =L'H.00 limx→0+sin⁡(x)cos⁡(x)+cos⁡(x)−xsin⁡(x)=01+1−0=0

Hint

For two arbitrary functions f and g , the re-formulation trick reads:

limx→x01f(x)−1g(x)=limx→x0g(x)−f(x)f(x)g(x)

Exercise (Limits via L’Hospital 5)

Determine

  1. limx→0+1x−1ex−1
  2. limx→11x−1−1ln⁡(x)
Solution (Limits via L’Hospital 5)

Part 1: There is

limx→0+1x−1ex−1=limx→0+ex−1−xx(ex−1) =L'H.00 limx→0+ex−1ex−1+xex =L'H.00 limx→0+exex+ex+xex=11+1+0=12

Part 2: Here, we have

limx→11x−1−1ln⁡(x)=limx→1ln⁡(x)−x+1(x−1)ln⁡(x) =L'H.00 limx→11x−1ln⁡(x)+(x−1)1x=limx→11−xxxln⁡(x)+x−1x=limx→11−xxln⁡(x)+x−1 =L'H.00 limx→1−1ln⁡(x)+1+1=−10+1+1=−12

Types 00, 0∞, ∞0 and 1∞

[edit | edit source]

If one of the cases described occurs, we use the trick we have already used in the calculation of derivative of generalized power functions: We first write fg as exp⁡∘(g⋅ln⁡∘f). Since exp is continuous on all of ℝ, the limit can be "pulled inside". The limit formed there is now very often of the kind 0⋅±∞ and can be calculated as described above with the rules of L'Hôspital.

Example (Limits via L’Hospital 6)

A common example is the limit

limx→0+xx

This is a limit of type 00. As described above we re-formulate it into

limx→0+xx=limx→0+exp⁡(xln⁡(x))

If we pull the limit into the exponential function, we get the limit value

limx→0+xln⁡(x)

This is of type 0⋅(−∞). Above we calculated it as follows

limx→0+xln⁡(x)=limx→0+ln⁡(x)1x =L'H−∞∞ limx→0+1x−1x2=limx→0+−x=0

Because of continuity of exp we hence get

limx→0+xx=limx→0+exp⁡(xln⁡(x))=exp⁡(limx→0+xln⁡(x))=exp⁡(0)=1

Hint

The limit limx→0+xx is the main reason for setting 00=1 . It makes the function f:ℝ0+→ℝ, f(x)={xx for x≠0,1 for x=0 continuous at zero.

Hint

For two arbitrary functions f and g , the re-formulation trick reads:

limx→x0f(x)g(x)=limx→x0exp⁡[ln⁡(f(x))g(x)]

Exercise (Limits via L’Hospital 6)

Compute the following limits

  1. limx→∞x1x
  2. limx→0+xsin⁡(x)
Solution (Limits via L’Hospital 6)

Part 1:

limx→∞x1x=limx→∞exp⁡(ln⁡(x)x) =expcontinuous exp⁡(limx→∞ln⁡(x)x) =L'H∞∞ exp⁡(limx→∞1x1)=exp⁡(limx→∞1x)=exp⁡(0)=1

Part 2:

limx→0+xsin⁡(x)=limx→0+exp⁡(sin⁡(x)ln⁡(x)) =expcontinuous exp⁡(limx→0+sin⁡(x)ln⁡(x))=exp⁡(limx→0+ln⁡(x)1sin⁡(x)) =L'H−∞∞ exp⁡(limx→0+1x−1sin2(x)⋅cos⁡(x))=exp⁡(limx→0+−sin2(x)xcos⁡(x)) =L'H00 exp⁡(limx→0+−2sin⁡(x)cos⁡(x)cos⁡(x)−xsin⁡(x))=exp⁡(01−0)=exp⁡(0)=1

Some warnings

[edit | edit source]

However, it is not always useful to apply the rule of L'Hospital. In particular, it should not be applied if the conditions are not met. In this case, the hasty application of the rule may give a false result. We will discuss some warning examples to illustrate this.

L’Hospital proofs can get tedious - there are also other ways

[edit | edit source]

Growth of exponential and logarithm functions

[edit | edit source]

Let us consider the limit value

limx→∞eαxxk for α>0 and k∈ℕ

This is of the type ∞∞ and L'Hospital is therefore applicable, which results in

limx→∞eαxxk=L'H.limx→∞αeαxkxk−1

The limit is now again of type ∞∞. Repeating the rule, we obtain

limx→∞αeαxkxk−1=L'H.limx→∞α2eαxk(k−1)xk−2

When applying the rule of L'Hospital, we see the following pattern: the enumerator remains the same except for the pre-factor, but this does not change the divergence behaviour towards ∞. In the denominator, the power of x decreases by one in every step. If we apply the rule of L'Hospital k times, we hence get

limx→∞eαxxk=L'H.limx→∞αeαxkxk−1=L'H.limx→∞α2eαxk(k−1)xk−2=L'H.…=limx→∞αkeαxk!x0=limx→∞αkk!⏟constanteαx⏟→∞=∞

But we could have achieved this result much faster and more elegantly. We have already shown above by only one application of L'Hospital

limx→∞eαxx =L'H∞∞ limx→∞αeαx1=limx→∞αeαx=∞

for all α>0. So we get

limx→∞eαxxk=limx→∞(eαkxx)k=∞

since α~=αk>0.

Hint

The limit value states that every exponential function grows faster than every power function, no matter how large the power is.

Exercise (Limits via L’Hospital 7)

Determine for α>0 and k∈ℕ the limit

limx→∞(ln⁡(x))kxα

by

  1. k-fold application of the rule of L'Hospital.
  2. One-fold application of the rule of L'Hospital and smart re-formulation.
Solution (Limits via L’Hospital 7)

Part 1: The limit value is of type ∞∞ and L'Hospital is applicable. There is

limx→∞(ln⁡(x))kxα =L'H∞∞ limx→∞k(ln⁡(x))k−1⋅1xαxα−1=limx→∞k(ln⁡(x))k−1αxα

The limit value is again of the type ∞∞, the power in the numerator decreases by one, that in the denominator remains the same. After k-fold application of L'Hospital we obtain

limx→∞(ln⁡(x))kxα =L'H∞∞limx→∞k(ln⁡(x))k−1αxα =L'H∞∞limx→∞k(k−1)(ln⁡(x))k−2α2xα =L'H∞∞…=limx→∞k!(ln⁡(x))0αkxα=limx→∞k!αk⏟constant1xα⏟→0=0

Part 2: There is

limx→∞ln⁡(x)xα =L'H∞∞ limx→∞1xα∗xα−1=limx→∞1α∗xα=0

for all k∈ℕ. Hence

limx→∞(ln⁡(x))kxα=limx→∞(ln⁡(x)xαk)k=0k=0

As α~=αk>0.

Hint

The limit value says that the logarithmic function grows slower than any power function, no matter how small the power is.

Growth of polynomial functions

[edit | edit source]

Let us now consider the following limit value of a rational function for x→∞:

limx→∞x3−4x+1x3−3x2+2x−4

Here we have, because of limx→∞x3−4x+1=∞=limx→∞x3−3x2+2x−4 the type ∞∞, and by applying the rule of L'Hospital three times we obtain

limx→∞x3−4x+1x3−3x2+2x−4 =L'H∞∞ limx→∞3x2−43x2−6x+2 =L'H∞∞ limx→∞6x6x−6 =L'H∞∞ limx→∞66=1

Alternatively, the limit value can be calculated without L'Hospital by excluding and then shortening the highest power (x3):

limx→∞x3−4x+1x3−3x2+2x−4=limx→∞x3(1−4x2+1x3)x3(1−3x+2x2−4x3)=limx→∞1−4x2+1x31−3x+2x2−4x3=1−0+01−0+0−0=1

If now in general p(x)=xn+an−1xn−1+…+a1x1+a0 and q(x)=xn+bn−1xn−1+…+b1x1+b0 are normalized polynomials, then there is again

limx→∞p(x)q(x)=1

If we want to show this with the rule of L'Hospital, we have to apply it a total of n times, and get

limx→∞p(x)q(x)=limx→∞xn+an−1xn−1+…+a1x1+a0xn+bn−1xn−1+…+b1x1+b0=∞∞L'H.limx→∞nxn−1+an−1(n−1)xn−2+…+a1nxn−1+bn−1(n−1)xn−2+…+b1=∞∞L'H.limx→∞n(n−1)xn−2+an−1(n−1)(n−2)xn−3+…+a2n(n−1)xn−2+bn−1(n−1)(n−2)xn−3+…+b2↓ L’Hospital (n−2)-fold=∞∞L'H.limx→∞n(n−1)⋅…⋅2⋅1⋅x0n(n−1)⋅…⋅2⋅1⋅x0=limx→∞n!n!=limx→∞1=1

To calculate the limit without L'Hospital, we can again factor out the highest power, i.e. xn, and then calculate the limit value:

limx→∞p(x)q(x)=limx→∞xn+an−1xn−1+…+a1x1+a0xn+bn−1xn−1+…+b1x1+b0=limx→∞xn⋅(1+an−1x+…+a1xn−1+a0xn)xn⋅(1+bn−1x+…+b1xn−1+b0xn)=limx→∞1+an−1x⏞→0+…+a1xn−1⏞→0+a0xn⏞→01+bn−1x⏟→0+…+b1xn−1⏟→0+b0xn⏟→0=1+0+…+0+01+0+…+0+0=1

Exercise (Limits of rational functions)

Show for an,bm>0 that

limx→∞anxn+an−1xn−1+…+a1x1+a0bmxm+bm−1xm−1+…+b1x1+b0={∞ if n>m,anbn if n=m,0 if n<m

Solution (Limits of rational functions)

Case 1: n>m

1st way: without L’Hospital

We factor out the greatest power xn, and obtain

limx→∞anxn+an−1xn−1+…+a1x1+a0bmxm+bm−1xm−1+…+b1x1+b0=limx→∞xn⋅(an+an−1x−1+…+a1x1−n+a0x−n)xn⋅(bmxm−n+bm−1xm−n+1+…+b1x1−n+b0x−n)=limx→∞xn⋅(an+an−1x+…+a1xn−1+a0xn)xn⋅(bmxn−m+bm−1xn−m−1+…+b1xn−1+b0xn)=limx→∞an+an−1x⏞→0+…+a1xn−1⏞→0+a0xn⏞→0bmxn−m⏟→0+bm−1xn−m−1⏟→0+…+b1xn−1⏟→0+b0xn⏟→0=an+0+…+0+00+0+…+0+0=an0++∞

2nd way: with L’Hospital

We apply the rule of L'Hospital m times, and get

limx→∞anxn+an−1xn−1+…+a1x1+a0bmxm+bm−1xm−1+…+b1x1+b0=∞∞L'H.limx→∞annxn−1+an−1(n−1)xn−2+…+a1bmmxm−1+bm−1(m−1)xm−2+…+b1↓ L’Hospital (m−1)-fold=limx→∞n(n−1)⋅…⋅(n−m)xn−mm!x0=+∞n!+∞

Case 2: n=m

1st way: without L’Hospital

limx→∞anxn+an−1xn−1+…+a1x1+a0bnxn+bn−1xn−1+…+b1x1+b0=limx→∞xn⋅(an+an−1x+…+a1xn−1+a0xn)xn⋅(bn+bn−1x+…+b1xn−1+b0xn)=limx→∞an+an−1x+…+a1xn−1+a0xnbn+bn−1x+…+b1xn−1+b0xn=an+0+…+0+0bn+0+…+0+0=anbn

2nd way: with L’Hospital

limx→∞anxn+an−1xn−1+…+a1x1+a0bnxn+bn−1xn−1+…+b1x1+b0=∞∞L'H.limx→∞annxn−1+an−1(n−1)xn−2+…+a1bnnxn−1+bn−1(n−1)xn−2+…+b1↓ L’Hospital (n−1)-fold=limx→∞n!anx0n!bnx0=anbn

Case 3: n<m

1st way: without L’Hospital

We factor out the greatest power xm, and obtain

limx→∞anxn+an−1xn−1+…+a1x1+a0bmxm+bm−1xm−1+…+b1x1+b0=limx→∞xm⋅(anxm−n+an−1xm−n−1+…+a1xm−1+a0xm)xm⋅(bm+bm−1x+…+b1xm−1+b0xm)=limx→∞anxm−n+an−1xm−n−1+…+a1xm−1+a0xmbm+bm−1x+…+b1xm−1+b0xm=0+0+…+0+0bm+0+…+0+0=0

2nd way: with L’Hospital

We apply the rule of L'Hospital n times, and get

limx→∞anxn+an−1xn−1+…+a1x1+a0bmxm+bm−1xm−1+…+b1x1+b0=∞∞L'H.limx→∞annxn−1+an−1(n−1)xn−2+…+a1bmmxm−1+bm−1(m−1)xm−2+…+b1↓ L’Hospital (n−1)-fold=limx→∞n!x0m(m−1)⋅…⋅(m−n)xm−n=n!∞0

L’Hospital proof might fail

[edit | edit source]

In this section we will present some examples of limit values where the rule of L'Hospital "fails". This can happen because the rule of L'Hospital is a sufficient but not a necessary condition for the existence of the limit value limx→af(x)g(x).

infinite loops

[edit | edit source]

Sometimes the rule of L'Hospital can go in an "infinite loop". An example is

limx→∞ex+e−xex−e−x

This limit is of the type ∞∞, and L'Hospital is applicable. If we do so, we will obtain

limx→∞ex+e−xex−e−x =L'H. limx→∞ex−e−xex+e−x

The resulting limit value is now again of the type ∞∞. If we look more closely, we see that the enumerator and denominator have been changed by the use of L'Hospital. If we now apply the rule again, the result is

limx→∞ex−e−xex+e−x =L'H. limx→∞ex+e−xex−e−x

The original limit value is therefore not changed. The rule of L'Hospital therefore does not help us with this limit value! The reason is that exponentials do not change under differentiation. However, there is a relatively simple way to reach the destination without L'Hospital:

If we factor out ex from the numerator and denominator, and then shorten it, we get

limx→∞ex+e−xex−e−x=limx→∞ex(1−e−2x)ex(1+e−2x)=limx→∞1−e−2x1+e−2x=1−limx→∞e−2x1+limx→∞e−2x=1+01−0=1

Exercise (Limits without L’Hospital 1)

Determine the limit

limx→∞xx2+1

What is the problem in applying the rule of L'Hospital?

Solution (Limits without L’Hospital 1)

By factoring out x2 in the denominator we obtain

limx→∞xx2+1=limx→∞xx2⋅(1+1x2)=limx→∞xx2⋅1+1x2=limx→∞xx⋅1+1x2=limx→∞11+1x2⏟→1+0=11=1

The application of the rule of L'Hospital leads into an endless loop, because

limx→∞xx2+1 =L'H.∞∞ limx→∞12x2x2+1=limx→∞x2+1x =L'H.∞∞ limx→∞2x2x2+11=limx→∞xx2+1 =L'H.∞∞ …

L’Hospital makes divergence worse

[edit | edit source]

It may also happen that the use of L'Hospital actually "makes the situation worse". In other words, a limit value that exists can be transformed by applying the rule into a limit value that no longer exists. Therefore, always note: From limx→af′(x)g′(x)=c we get limx→af(x)g(x)=c, but not vice versa. In particular, the fact that limx→af′(x)g′(x) does not exist, does not imply that limx→af(x)g(x) does not exist. Let us look at

limx→∞2x+sin⁡(x)2x−sin⁡(x)


There is 2x±sin⁡(x)≥2x−1→∞. Therefore, we have a type ∞∞ . Application of L'Hospital now renders

limx→∞2x+sin⁡(x)2x−sin⁡(x) =L'H. limx→∞2+cos⁡(x)2−cos⁡(x)

Now we have a problem because this limit value does not exist. Let us look at the sequences (xn)n∈ℕ with

xn=nπ

This certainly diverges to ∞. However, there is

limn→∞2+cos⁡(xn)2−cos⁡(xn)=limn→∞nπ+(−1)n+1nπ−(−1)n+1

This limit value does not exist (not even improperly), since (−1)n+1 diverges. This means that L'Hospital is inapplicable here too. That the original limit value does exist can be seen from the following conversion trick: Because of limx→∞sin⁡(x)x=0 there is

limx→∞2x+sin⁡(x)2x−sin⁡(x)=limx→∞x(2+sin⁡(x)x)x(2−sin⁡(x)x)=limx→∞2+sin⁡(x)x2−sin⁡(x)x=2+02−0=1

Exercise (Limits without L’Hospital 2)

Determine

limx→0x2sin⁡(1x)x+sin⁡(x)

What is the problem in applying the rule of L'Hospital?

Solution (Limits without L’Hospital 2)

First there is with a simple re-formulation trick

limx→0x2sin⁡(1x)x+sin⁡(x)=limx→0x⋅x⋅sin⁡(1x)x+sin⁡(x)=limx→0x⋅sin⁡(1x)1x⋅(x+sin⁡(x))=limx→0x⋅sin⁡(1x)1x⋅(x+sin⁡(x))=limx→0x⋅sin⁡(1x)1+sin⁡(x)x

Further, on the one hand limx→0x⋅sin⁡(1x)=0, which follows directly from the estimation 0≤|x⋅sin⁡(1x)|≤|x|→x→00. On the other hand limx→0sin⁡(x)x=1, which we have shown with the rule of L'Hospital above.

In total, we get

limx→0x2sin⁡(1x)x+sin⁡(x)=limx→0x⋅sin⁡(1x)⏞→01+sin⁡(x)x⏟→1=01+1=0

If we apply the rule of L'Hospital, which is allowed since the limit value is of the type 00, we obtain

limx→0x2sin⁡(1x)x+sin⁡(x)=00L'H.limx→02xsin⁡(1x)+x2cos⁡(1x)⋅(−1x2)1+cos⁡(x)=limx→02xsin⁡(1x)⏞→0−cos⁡(1x)⏞(∗)1+cos⁡(x)⏟→1

This limit now diverges because the (∗) expression for x→0 diverges. Namely, for the null sequence xn=1nπ there is cos⁡(1xn)=cos⁡(nπ)=(−1)n+1. So the application of L'Hospital was again unsuccessful!

L’Hospital may render a wrong result

[edit | edit source]

This can happen whenever the rule is applied although the conditions not are met. An example is

limx→πsin⁡(x)x

Look carefully, in this case x converges towards π, not 0! Since enumerator and denominator are continuous in π, there is

limx→πsin⁡(x)x=sin⁡(π)π=0π=0

L'Hospital is not applicable in the case of 0π . If you apply the rule anyway, you will get the false result

limx→πsin⁡(x)x =false limx→πcos⁡(x)1=cos⁡(π)1=−11=−1

Therefore, you should always check first whether the rule of L'Hospital is applicable or whether it is even necessary at all.

Exercise (Limits without 3)

Determine the limits

  1. limx→0−cos⁡(x)x
  2. limx→0+x1x

What are the limits resulting from the incorrect application of the L'Hospital rule?

Solution (Limits without 3)

Part 1: Inserting results in

limx→0−cos⁡(x)⏞→cos⁡(0)=1x⏟→0−=−∞

Since the limit value is of the type 10, L'Hospital is not applicable. If we apply the rule anyway, we get the false result

limx→0−cos⁡(x)x =false limx→0−−sin⁡(x)1=−sin⁡(0)1=01=0

Part 2: Since the limit value is of the type 0∞, we first use our standard re-formulation trick

limx→0+x1x=limx→0+eln⁡(x)⋅1x=limx→0+eln⁡(x)x

For the expression in the exponent there is now limx→0+ln⁡(x)⏞→−∞x⏟→0+=−∞. Because of limx→−∞ex=0 the result is

limx→0+x1x=limx→0+eln⁡(x)x=0

In Exponent, L'Hospital is again not applicable. If we apply the rule anyway, we get

limx→0+ln⁡(x)x =false limx→0+1x1=limx→0+1x=+∞

Because of limx→∞ex=+∞ the following false result follows

limx→0+x1x=limx→0+eln⁡(x)x =false +∞

Implication: sufficient criterion for differentiability

[edit | edit source]
Theorem (Criterion for differentiability)

Let I⊆ℝ be an open interval and a∈I. Further let f:I→ℝ be continuous in I and differentiable in I∖{a}. In addition, let there be limx→af′(x)=c. Then f is differentiable also at a and there is f′(a)=c.

Proof (Criterion for differentiability)

We have to show:

f′(a)=limh→0f(a+h)−f(a)h=c

Now is limh→0f(a+h)−f(a)=f continuousf(a)−f(a)=0 and limh→0h=0. Furthermore, f~(h)=f(a+h)−f(a) and g~(h)=h are differentiable for h≠0, and g~′(h)=1≠0. With the rule of L'Hospital we obtain

limh→0f(a+h)−f(a)h=limh→0f′(a+h)1=limx→af′(x)=cc

Thus f is differentiable at a with f′(a)=c.

Alternative proof (Criterion for differentiability)

We can also use the mean value theorem to show

f′(a)=limx→af(x)−f(a)x−a=c

Let for this be (xn)n∈ℕ a sequence in I with limn→∞xn=a. Then f according to the precondition for all n∈ℕ is continuous on [a,xn] (or [xn,a]) and differentiable on (a,xn) (or (xn,a)). According to the mean value theorem there is for all n∈ℕ a ξn∈(a,xn) (or (xn,a)) with

f(xn)−f(a)xn−a=f′(ξn)

Since now xn→a and ξn∈[a,xn]⟺a≤ξn≤xn (or ξn∈[xn,a]⟺xn≤ξn≤a), there is also ξn→a. Because of limx→af′(x)=c it follows that limn→∞f′(ξn)=c. So we get

limn→∞f(xn)−f(a)xn−a=limn→∞f′(ξn)=c

Since (xn) with xn→a was arbitrary, we obtain

f′(a)=limx→af(x)−f(a)x−a=c

Hint

A function that fulfils the criterion from the theorem is not only differentiable at the point a. Because of limx→af′(x)=c=f′(a) the derivative function is even continuous in a. Therefore, the criterion is sufficient and not necessary for the differentiability in a.

Question: Give an example of a differentiable function that does not satisfy the conditions of the theorem.

We are looking for a differentiable function whose derivative is not continuous at one point. An example (among many) is the function

f:ℝ→ℝ, f(x)={x2sin⁡(1x) for x≠0,0 for x=0.

It has at a=0 the derivative f′(0)=0, but is not continuous there, as the limit

limx→0x≠0f′(x)=limx→0x≠0[2xsin⁡(1x)−cos⁡(1x)]

does not exist.

Exercise (Differentiability of the Si-function)

Let

f:ℝ→ℝ, f(x)={sin⁡(x)x for x≠0,1 for x=0

Show, without using the differential quotient, that f is differentiable at zero and calculate the derivative f′(0).

Solution (Differentiability of the Si-function)

Step 1: f is continuous at zero

By L’Hospital there is

limx→0f(x)=limx→0sin⁡(x)x=00l.H.limx→0cos⁡(x)1=1=f(0)

So f is continuous at zero.

Step 2: f is differentiable on ℝ∖{0}

Since sin and x↦x are differentiable on ℝ∖{0}, the function f is also differentiable there, by the quotient rule. Further there is for x≠0:

f′(x)=cos⁡(x)⋅x−sin⁡(x)⋅1x2=xcos⁡(x)−sin⁡(x)x2

Step 3: f is differentiable at zero

We use the criterion from the previous theorem. (Because of Step 1 and 2, it is applicable.) There is

limx→0f′(x)=limx→0xcos⁡(x)−sin⁡(x)x2=00l.H.limx→0cos⁡(x)−xsin⁡(x)−cos⁡(x)2x=limx→0−xsin⁡(x)2x=00l.H.limx→0−sin⁡(x)−xcos⁡(x)2=0

According to the criterion, f is differentiable at zero with f′(0)=0.