L'Hopital's Rule is a powerful tool that can be used when you are stuck on certain types of derivatives. Many derivatives that otherwise appear undefined can be cracked using L'Hopital's Rule. This article will explore the two pieces to this rule, and help calculus students become more apt and confident at computing limits. The examples here can also be usen by a teacher for a comprehensive introduction to the subject.

0 Divided by 0 Indeterminate Forms

One scenario where L'Hopital's Rule is applicable is where the numerator and denominator of the limit both approach zero. If \(f(x)\) and \(g(x)\) are the numerator and denominator of the limit \(x \rightarrow a\), and \(\lim_{x \rightarrow a}f(x) = 0\) and \(\lim_{x \rightarrow a}g(x) = 0\), then we have

$$\lim_{x \rightarrow a}\frac{f(x)}{g(x)} = \lim_{x \rightarrow a}\frac{f'(x)}{g'(x)}$$

This is part one of L'Hopital's Rule. It also assumes that both the numerator and denomninator are differentiable functions. \(a\) can be any real number, positive or negative. To see if this form of L'Hopital's Rule applies, use direct substitution on both the numerator and the denominator with the given limit. If you get \(\frac{0}{0}\), then you can use this form of L'Hopital's Rule. Differentiate both the numerator and denominator and repeat the process again until you either get a definite value for the limit or get it into a different indeterminate form. What you do with a different indeterminate form varies, and we will not go into that right now.

Example 1: Calculate the limit \(\lim_{x \rightarrow 0}\frac{\sin x}{x}\). This is a classic example!

Solution: The limit of both the numerator and the denominator are \(0\). Therefore, this is a \(\frac{0}{0}\) indeterminate form, and we can use L'Hopital's Rule. The derivative of the numerator is \(\cos x\), and the derivative of the deonimnator is \(1\), so by L'Hopital's Rule:

$$\lim_{x \rightarrow 0}\frac{\sin x}{x} = \lim_{x \rightarrow 0}\frac{\cos x}{1} = \cos(0) = 1$$

You may be asking why L'Hopital's Rule is true. There is a formal proof for it, but it will be omitted because it is quite elaborate and requires information usually not taught in high school courses.

Example 2: Calculate the limit \(\lim_{x \rightarrow 1}\frac{x^2 - 1}{x^3 - 1}\).

Solution 1: You may be tempted to dive right into using L'Hopital's Rule, and that works fine here, as direct substitution results in \(\frac{0}{0}\):

$$\lim_{x \rightarrow 1}\frac{x^2 - 1}{x^3 - 1} = \lim_{x \rightarrow 1}\frac{2x}{3x^2} = \lim_{x \rightarrow 1}\frac{2}{3x} = \frac{2}{3}$$

Example 3: Calculate the limit \(\lim_{x \rightarrow 2}\frac{x^2 + x - 6}{x^3 + 2x^2 - x - 14}\).

Solution: A quick inspection of the numerator and denominator allow us to see that both approach zero with the given limit. Thus we can use L'Hopital's Rule:

$$\lim_{x \rightarrow 2}\frac{x^2 + x - 6}{x^3 + 2x^2 - x - 14} = \lim_{x \rightarrow 2}\frac{2x + 1}{3x^2 + 4x - 1}$$

Do not make the mistake of using L'Hopital's Rule again, because we do not have a \(\frac{0}{0}\) indeterminate form any longer. Rather, just use direct substitution:

$$\frac{2(2) + 1}{3(2)^2 + 4(2) - 1} = \frac{4 + 1}{3(4) + 8 - 1} = \frac{5}{12 + 7} = \frac{5}{19}$$

Infinity Divided by Infinity Indeterminate Forms

There is another form of L'Hopital's Rule that is called the \(\frac{\infty}{\infty}\) form. In this case, both the numerator and denominator of the fraction approach infinity with the given limit. Usually the value that the variable approaches is either positive or negative infinity, but it may on occasion be something else. If the numerator and denominator are both differentiable functions and they approach infinity with the given limit:

$$\lim_{x \rightarrow a}\frac{f(x)}{g(x)} = \lim_{x \rightarrow a}\frac{f'(x)}{g'(x)}$$

This is the exact same operation that is performed when both the numerator and denominator approach zero! So basically, the only distinction between the two parts of L'Hopital's Rule is the scenario where the rule is applicable. Be aware, however, that L'Hopital's Rule cannot be used when the numerator approaches infinity and the denominator approaches zero.

Example 4: Calculate the limit \(\lim_{x \rightarrow \infty}\frac{x - 1}{x}\).

Solution 1: Both the numerator and denominator of the limit approach infinity, so we can differentiate the numerator and denominator:

$$\lim_{x \rightarrow \infty}\frac{x - 1}{x} = \lim_{x \rightarrow \infty}\frac{1}{1} = 1$$

Solution 2: If you didn't know L'Hopital's Rule, you could just rewrite the fraction as this:

$$\lim_{x \rightarrow \infty}\frac{x - 1}{x} = \lim_{x \rightarrow \infty}\left(\frac{x}{x} - \frac{1}{x}\right) = \lim_{x \rightarrow \infty}\left(1 - \frac{1}{x}\right)$$

The term with the variable that remains is equal to zero; as the denominator gets progressively bigger, the fraction gets smaller and approaches zero (graph \(f(x) = \frac{1}{x}\) if you cannot picture it). Thus the whole limit is still \(1\).

Example 5: Calculate the limit \(\lim_{x \rightarrow \infty}\frac{x^2 + \ln x}{x^2 + x}\).

Solution: Plugging infinity into the numerator and denominator gives back infinity for both of them. Thus we can differentiate the numerator and denominator to get a new form of the limit:

$$\lim_{x \rightarrow \infty}\frac{x^2 + \ln x}{x^2 + x} = \lim_{x \rightarrow \infty}\frac{2x + \frac{1}{x}}{2x + 1}$$

Multiply the numerator and denominator by \(x\) to clear the complex fraction:

$$\lim_{x \rightarrow \infty}\frac{2x^2 + 1}{2x^2 + x}$$

Well, this limit is of the \(\frac{\infty}{\infty}\) indeterminate form once again, so we use L'Hopital's Rule again (quick tip: you can use it as many times as you need to in one problem, as long as the conditions for using the rule still meet each time):

$$\lim_{x \rightarrow \infty}\frac{4x}{4x + 1}$$

Use it one more time as this is still of the same indeterminate form:

$$\lim_{x \rightarrow \infty}\frac{4}{4} = 1$$

Example 6: Calculate the limit \(\lim_{x \rightarrow \infty}\frac{2x^7 + 5x^4}{12x^6 + 9x^3 + 1}\).

Solution 1: The first of the solutions is to use L'Hopital's Rule, as once again both the numerator and denominator approach infinity.

$$\lim_{x \rightarrow \infty}\frac{2x^7 + 5x^4}{12x^6 + 9x^3 + 1} = \lim_{x \rightarrow \infty}\frac{14x^6 + 20x^3}{72x^5 + 27x^2}$$

Each term has a common factor of \(x^2\), so those can be factored out and removed:

$$\lim_{x \rightarrow \infty}\frac{x^2(14x^4 + 20x)}{x^2(72x^3 + 27)} = \lim_{x \rightarrow \infty}\frac{14x^4 + 20x}{72x^3 + 27}$$

Checking, we see that the limit is still in the indeterminate form that allows us to use L'Hopital's Rule a second time:

$$\lim_{x \rightarrow \infty}\frac{14x^4 + 20x}{72x^3 + 27} = \lim_{x \rightarrow \infty}\frac{56x^3 + 20}{216x^2}$$

Before proceeding, note that there is a common factor of \(4\) in the numerator and denominator. Factor it out:

$$\lim_{x \rightarrow \infty}\frac{4(14x^3 + 5)}{4(54x^2)} = \lim_{x \rightarrow \infty}\frac{14x^3 + 5}{54x^2}$$

Now use L'Hopital's Rule one more time:

$$\lim_{x \rightarrow \infty}\frac{14x^3 + 5}{54x^2} = \lim_{x \rightarrow \infty}\frac{42x^2}{108x} = \lim_{x \rightarrow \infty}\frac{7}{18}x = \infty$$

In general, when the numerator and denominator are both polynomials, if the numerator has the highest-degreed term, then the limit will approach positive or negative infinity. 

Solution 2: A much faster solution exists when the numerator and denominator are both polynomials. Divide both the numerator and denominator by the highest-degreed term in the fraction. In that case, this is \(x^7\):

$$\lim_{x \rightarrow \infty}\frac{2x^7 + 5x^4}{12x^6 + 9x^3 + 1} = \lim_{x \rightarrow \infty}\frac{2 + \frac{5}{x^3}}{\frac{12}{x} + \frac{9}{x^4} + \frac{1}{x^7}}$$

Each term in both the numerator and the denominator approaches zero on its own--except for the lone \(2\) in the numerator. That means that the limit equals

$$\frac{2}{0} = \infty$$

Example 7: Explain why L'Hopital's Rule cannot be used to compute the limit \(\lim_{x \rightarrow \infty}\frac{x^4 - 1}{\cos x}\).

Solution: The cosine function constantly oscillates; it does not approach a certain value as \(x\) approaches infinity. In other words, \(\lim_{x \rightarrow \infty}\cos x\) is undefined. Thus this cannot be a \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\) indeterminate form. As a result, L'Hopital's Rule cannot be used.