# L'Hôpital's Rule

L'Hôpital's Rule can help us calculate a limit that may otherwise be hard or impossible.

L'Hôpital is pronounced "lopital". He was a French mathematician from the 1600s.

It says that the **limit** when we divide one function by another is the same after we take the derivative of each function (with some special conditions shown later).

In symbols we can write:

*lim***x→c**\frac{f(x)}{g(x)} = *lim***x→c**\frac{f’(x)}{g’(x)}

*The limit as x approaches c of "f-of−x over g-of−x" equals the
the limit as x approaches c of "f-dash-of−x over g-dash-of−x"*

All we did is add that little dash mark ’ on each function, which means to take the **derivative**.

*lim*

**x→2**\frac{x^{2}+x−6}{x^{2}−4}

At **x=2** we would normally get:

\frac{2^{2}+2−6}{2^{2}−4} = \frac{0}{0}

Which is indeterminate, so we are stuck. Or are we?

Let's try L'Hôpital!

Differentiate both top and bottom (see Derivative Rules):

*lim***x→2**\frac{x^{2}+x−6}{x^{2}−4} = *lim***x→2**\frac{2x+1−0}{2x−0}

Now we just substitute **x=2** to get our answer:

*lim***x→2**\frac{2x+1−0}{2x−0} = \frac{5}{4}

Here is the graph, notice the "hole" at x=2:

*Note: we can also get this answer by factoring, see Evaluating Limits*.

*lim*

**x→∞**\frac{e^{x}}{x^{2}}

Normally this is the result:

*lim***x→∞**\frac{e^{x}}{x^{2}} = \frac{∞}{∞}

Both head to infinity. Which is indeterminate.

But let's differentiate both top and bottom (note that the derivative of e^{x} is e^{x}):

*lim***x→∞**\frac{e^{x}}{x^{2}} = *lim***x→∞**\frac{e^{x}}{2x}

Hmmm, still not solved, both tending towards infinity. But we can use it again:

*lim***x→∞**\frac{e^{x}}{x^{2}} = *lim***x→∞**\frac{e^{x}}{2x} = *lim***x→∞**\frac{e^{x}}{2}

Now we have:

*lim***x→∞**\frac{e^{x}}{2} = ∞

It has shown us that e^{x} grows much faster than x^{2}.

## Cases

We have already seen a \frac{0}{0} and \frac{∞}{∞} example. Here are all the indeterminate forms that L'Hopital's Rule may be able to help with:

\frac{0}{0} \frac{∞}{∞} 0×∞ 1^{∞} 0^{0} ∞^{0} ∞−∞

## Conditions

### Differentiable

For a limit approaching c, the original functions must be differentiable either side of c, but not necessarily at c.

Likewise g’(x) is not equal to zero either side of c.

### The Limit Must Exist

This limit must exist:*lim***x→c**\frac{f’(x)}{g’(x)}

Why? Well a good example is functions that never settle to a value.

*lim*

**x→∞**\frac{x+cos(x)}{x}

Which is a \frac{∞}{∞} case. Let's differentiate top and bottom:

*lim***x→∞**\frac{1−sin(x)}{1}

And because it just wiggles up and down it never approaches any value.

So that new limit does not exist!

**And so L'Hôpital's Rule is not usable in this case.**

BUT we can do this:

*lim***x→∞**\frac{x+cos(x)}{x} = *lim***x→∞**(1 + \frac{cos(x)}{x})

As x goes to infinity then \frac{cos(x)}{x} tends to between \frac{−1}{∞} and \frac{+1}{∞}, and both tend to zero.

And we are left with just the "1", so:

*lim***x→∞**\frac{x+cos(x)}{x} = *lim***x→∞**(1 + \frac{cos(x)}{x}) = 1