Chalk−1

Math · Calculus I · Concept

L’Hôpital’s rule for indeterminate limits

L’Hôpital’s rule says that if f⁡(x)⁢/⁢g⁡(x) gives the indeterminate form 0⁢/0 or ∞⁢/⁢∞ at a, its limit equals the limit of f′(x)⁢/g′(x), provided that limit exists. Differentiate the top and bottom separately, not with the quotient rule, and check the form before every use.

Try one — Chalk checks each line

A concrete case

Two quantities racing to zero

Take (ex−1)⁢/⁢x as x approaches 0. Substituting x=0 gives (1−1)⁢/0, which is 0⁢/0. That is not a number, and it does not say the limit is 0 or 1. It only says that the top and the bottom both shrink toward 0.

The table shows what happens as x closes in on 0. The quotient settles near 1. Both parts vanish, but at the same rate, so their ratio stays close to 1.

Now try (e3⁢x−1)⁢/⁢x. At x=0.01 the top is e0.03−1≈0.030455, and the quotient is about 3.05. Near 0 the top shrinks three times as fast as the bottom, and the limit is 3. A 0⁢/0 limit is decided by how fast each part approaches 0, and the rate at which a function changes is its derivative.

limx→0ex−1x=1
The quotient (ex−1)⁢/⁢x as x approaches 0
xex−1(ex−1)⁢/⁢x
0.10.1051711.05171
0.010.01005021.00502
0.0010.00100051.00050
−0.01−0.009950170.995017

The rule

L’Hôpital’s rule

The two indeterminate forms the rule handles directly are 0⁢/0 and ∞⁢/⁢∞, which a first substitution can give. The form alone does not settle the limit, which could turn out to be any number, or infinite.

L’Hôpital’s rule handles both forms. Suppose f and g are differentiable near a, except perhaps at a itself, and g′(x)≠0 near a. Suppose f⁡(x) and g⁡(x) both approach 0, or both grow without bound in size, as x approaches a. Then the limit of f⁡(x)⁢/⁢g⁡(x) equals the limit of f′(x)⁢/g′(x), provided the second limit exists or is infinite.

The same holds for one-sided limits and for limits as x→∞ or x→−∞. f′ and g′ are the derivatives of the top and the bottom, taken separately. The quotient rule plays no part.

limx→af⁡(x)g⁡(x)=limx→af′(x)g′(x)

Why it works

Why the slopes decide

Take the case where f⁡(a)=g⁡(a)=0, both functions have derivatives at a, and g′(a)≠0. Because f⁡(a) and g⁡(a) are 0, subtracting them changes nothing. Then divide the top and the bottom by x−a.

The top becomes the slope of the chord of f from a to x, and the bottom becomes the slope of the chord of g. As x approaches a, those slopes approach f′(a) and g′(a). The quotient therefore approaches f′(a)⁢/g′(a).

The picture is a zoom. Close to a, each graph is nearly its tangent line through (a,0). For ex−1 and x at 0, both tangent lines are y=x, so their ratio is close to 1. The tangent line of e3⁢x−1 is y=3⁢x, and that ratio is close to 3.

f⁡(x)g⁡(x)=(f⁡(x)−f⁡(a))/⁢(x−a)(g⁡(x)−g⁡(a))/⁢(x−a)→x→af′(a)g′(a)
f⁡(x)g⁡(x)=(f⁡(x)−f⁡(a))/⁢(x−a)(g⁡(x)−g⁡(a))/⁢(x−a)→x→af′(a)g′(a)

The method

The method in four steps

Write each new limit on its own line, with the form you found beside it. Checking the form is the step most often skipped, and it decides whether the rule applies at all. The table follows (1−cosx)⁢/x2 as x→0.

The method on (1−cosx)⁢/x2 as x approaches 0
StepWhat to doFor (1−cosx)⁢/x2
1Substitute first(1−cos0)⁢/02 =0⁢/0, so go on
2Differentiate the top and the bottom separatelysinx over 2⁢x
3Simplify, then substitute againsin0⁢/⁢(2⋅0) =0⁢/0 again
4Repeat while the form is 0⁢/0 or ∞⁢/⁢∞, and stop as soon as it is notcosx over 2 gives cos0⁢/2 =1⁢/2

Other indeterminate forms

The rule applies only to quotients, so other forms are rewritten as one first.

A product of the form 0⋅∞ becomes a quotient when one factor moves into the denominator. As x→0+, xlnx has the form 0⋅(−∞). Written as (lnx)⁢/⁢(1⁢/⁢x) it is a quotient of the form −∞⁢/⁢∞, and the rule gives (1⁢/⁢x)⁢/⁢(−1⁢/x2)=−x, which approaches 0.

A difference of the form ∞−∞ becomes a quotient once its fractions are combined over a common denominator.

Powers of the forms 1∞, 00 and ∞0 need a logarithm. Take y=(1+1⁢/⁢x)x as x→∞. Then lny =xln(1+1⁢/⁢x) =ln(1+1⁢/⁢x)⁢/⁢(1⁢/⁢x), a 0⁢/0 form. The rule turns it into 1⁢/⁢(1+1⁢/⁢x), which approaches 1. Since lny approaches 1, y approaches e.

limx→∞(1+1x)x=e

Which grows fastest

Used again and again, the rule ranks the common functions by how fast they grow. As x→∞, xn/ex→0 for every power n, however large, and (lnx)⁢/xp→0 for every p>0, however small. Exponentials outgrow powers, and powers outgrow logarithms.

The ranking settles many limits at a glance. In (x100+lnx)⁢/ex the exponential in the denominator wins, and the limit is 0.

lnx ≪ xp ≪ exas ⁢x→∞, p>0

Where it breaks

Where it breaks

The rule needs an indeterminate form. The limit of (x+1)⁢/⁢(x+2) as x→0 is 1⁢/2 by substitution. Differentiating the top and the bottom would give 1⁢/1=1, which is wrong, because neither part approaches 0. In the same way, sinx⁢/⁢x as x→π is 0⁢/⁢π=0, not cosπ⁢/1=−1.

The rule says nothing when the new limit fails to exist. As x→∞, (x+sinx)⁢/⁢x equals 1+(sinx)⁢/⁢x, which approaches 1. The rule gives (1+cosx)⁢/1, which keeps swinging between 0 and 2 and has no limit. The original limit exists all the same.

The rule can also go in circles. For x2+1/⁢x as x→∞, it produces x⁢/x2+1, and a second use returns the quotient you started with. Dividing the top and the bottom by x ends it at once. For x>0 the quotient is 1+1⁢/x2, which approaches 1.

The rule needs g′(x)≠0 near a, and it applies only to quotients. A product, a difference or a power must be rewritten first.

Check your answer

Check your answer

The rule hands you a number, and numbers, a graph or a second method can confirm it.

Try numbers close to a. For (1−cosx)⁢/x2, x=0.1 gives 0.49958 and x=0.01 gives 0.4999958, closing in on 1⁢/2.

Graph the quotient near a and read the height the curve approaches, ignoring the hole at a itself.

Find the limit another way when you can. (x2−1)⁢/⁢(x−1) factors to x+1, which approaches 2 as x→1, and the rule gives 2⁢x⁢/1=2 as well.

To have Chalk check the work, write the limit on the first row of a Math box and each new limit on its own row below it, ending with the value. For (1−cosx)⁢/x2, the rows are the limits of (1−cosx)⁢/x2, sinx⁢/⁢(2⁢x) and cosx⁢/2, then 1⁢/2. The Checker marks each row ✓ or ✗ by whether it is the same limit as the row above. It does not see whether you checked the form before differentiating. That step is yours.

A ? on a logarithm limit is not a ✗, and the work may still be right. Chalk follows the step from (lnx)⁢/⁢x to 1⁢/⁢x, the step from (lnx)⁢/x to (1⁢/⁢x)⁢/⁢(1⁢/⁢(2x)) as x→∞, and the quotient forms of xlnx, but not yet every limit with lnx. Check a row it leaves at ? with numbers instead.

Which of three limits can L’Hôpital’s rule take as written, (x2−9)⁢/⁢(x−3) as x→3, xe−x as x→∞, or (x+1)⁢/x2 as x→0?

Only the first, which gives 0⁢/0. The second is a product of the form ∞⋅0, so rewrite it first as x⁢/ex, an ∞⁢/⁢∞ form. The third gives 1⁢/0, which is not indeterminate, so the rule does not apply. Its values grow without bound on both sides of 0. Check the form before every use of the rule.

Why the rule is true, and what it connects to

The argument above needs f′(a) and g′(a) to exist, with g′(a)≠0. The full rule covers more, including a quotient f′/g′ that is itself 0⁢/0 at a, and limits at infinity. Its proof uses Cauchy’s mean value theorem.

Suppose f and g are continuous on [a,x], differentiable inside it with g′ never 0 there, and f⁡(a)=g⁡(a)=0. Cauchy’s theorem then gives a point c between a and x with f⁡(x)⁢/⁢g⁡(x)=f′(c)⁢/g′(c). As x approaches a, the point c is squeezed toward a as well, so the two quotients share their limit.

The rule cannot be used to show that sinx⁢/⁢x approaches 1. Finding the derivative of sinx needs that very limit, so the argument would assume its own answer.

Taylor polynomials, met later in calculus, explain these results another way. Near 0, 1−cosx is about x2/2, so (1−cosx)⁢/x2 is about 1⁢/2.

f⁡(x)g⁡(x)=f′(c)g′(c),c between a and x
f⁡(x)g⁡(x)=f′(c)g′(c)c between a and x

Common mistakes

  • Using the rule when the form is not 0⁢/0 or ∞⁢/⁢∞. The limit of (x+1)⁢/⁢(x+2) as x→0 is 1⁢/2 by substitution. Differentiating first gives 1⁢/1=1, which is wrong, because neither part approaches 0.
  • Using the quotient rule. The rule takes f′ over g′, not the derivative of f/⁢g. For (ex−1)⁢/⁢x as x→0, the quotient rule produces (xex−ex+1)⁢/x2, another 0⁢/0 form. The right step is ex/1, which gives 1.
  • Using the rule again without checking the form. For (ex−1)⁢/⁢(x2+x) as x→0, one use gives ex/⁢(2⁢x+1), which is 1 at x=0. Differentiating again gives ex/2 and the wrong answer 1⁢/2, because 1⁢/1 was no longer indeterminate.
  • Using the rule on a product. xlnx as x→0+ has the form 0⋅(−∞), not a quotient. Rewrite it as (lnx)⁢/⁢(1⁢/⁢x) first. The rule then gives −x, and the limit is 0.
  • Dropping the chain rule factor. The derivative of sin(3⁢x) is 3cos(3⁢x), so the limit of sin(3⁢x)⁢/⁢x as x→0 is 3cos0⁢/1=3. Writing cos(3⁢x)⁢/1 gives 1, because the factor 3 from the inside is lost.

Key terms

L’Hôpital’s rule
For a limit of the form 0⁢/0 or ∞⁢/⁢∞, the limit of f⁡(x)⁢/⁢g⁡(x) equals the limit of f′(x)⁢/g′(x) when that limit exists and f and g are differentiable nearby. It doesn’t apply to other quotients.
Indeterminate form
A pattern such as 0⁢/0, ∞⁢/⁢∞ or ∞−∞ that direct substitution produces and that doesn’t decide the limit on its own. Different limits can give the same pattern, so more work is needed, such as factoring or L’Hôpital’s rule.
Limit
The value f⁡(x) approaches as x gets closer and closer to a point a, not counting x=a itself. A limit can exist even when f⁡(a) is undefined or has a different value.
Derivative
The instantaneous rate of change of a function: the limit of the average rate of change as the step shrinks to zero, when that limit exists. On a graph it is the slope of the tangent line.

Work through an example

Evaluate the limit of (1−cosx)⁢/x2 as x→0.

Apply L’Hôpital’s rule twice →

Compare the growth of x2 and ex →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Check each step in Math Check the limit in Math Study the 4 key terms Open worked example on a board Limit of a quotient in Math Reference

Your existing work stays on this device. Examples open as editable copies.