L'Hôpital's Rule for Indeterminate Limits

When a limit takes an indeterminate form such as 0 / 0 or ± / ± , L'Hôpital's Rule says to differentiate the numerator and denominator separately and retry. The same idea extends to products, differences, and exponential forms by first converting them to a ratio.

Indeterminate form Technique
0 / 0 or ± / ± Apply L'Hôpital's Rule directly
0 ( ± ) Rewrite as f / ( 1 / g ) or g / ( 1 / f )
Use common denominator, rationalize, or factor
0 0 , 1 ± , ( ± ) 0 Take ln , reduce to 0 ( ± )

L'Hôpital's Rule for 0 / 0

Assume f ( a ) = g ( a ) = 0 . For x a :

f ( x ) g ( x ) = f ( x ) f ( a ) g ( x ) g ( a ) = f ( x ) f ( a ) x a g ( x ) g ( a ) x a .

If f'(a) and g'(a) both exist and g'(a)\neq0, taking the limit as x a gives:

\lim_{x\to a}\frac{f(x)}{g(x)}=\frac{f'(a)}{g'(a)}.\tag{i}
Two panels showing graphs of f and g near x=a, demonstrating that zooming in makes them look linear and the ratio approaches f'(a)/g'(a)
Zooming in near x = a , the graphs of f and g look nearly linear, so their ratio approaches f'(a)/g'(a).

L'Hôpital's Rule for 0 / 0 . Assume

lim x s f ( x ) = 0 and lim x s g ( x ) = 0 ,

and that \lim_{x\to s}f'(x)/g'(x) exists (or is + or ). Then:

\lim_{x\to s}\frac{f(x)}{g(x)}=\lim_{x\to s}\frac{f'(x)}{g'(x)}.

Here s denotes a , a + , a , , or + .

Proof For x a + , introduce extended functions: F(x)=\begin{cases}f(x)&x\neq a\\0&x=a\end{cases},\quad G(x)=\begin{cases}g(x)&x\neq a\\0&x=a\end{cases}. For a < x , apply Cauchy's Mean Value Formula to [ a , x ] : there exists c ( a , x ) such that f(x)g'(c)=g(x)f'(c), giving f(x)/g(x)=f'(c)/g'(c). As x a + , c a + , so \lim_{x\to a^+}f(x)/g(x)=\lim_{c\to a^+}f'(c)/g'(c). For x + , the substitution x = 1 / u reduces the problem to u 0 + .

Important notes:

  • f'(x)/g'(x) is the ratio of the derivatives, not the derivative of the ratio.
  • Apply L'Hôpital's Rule only when the limit takes the indeterminate form 0 / 0 . If it is not 0 / 0 , substituting directly is correct.
  • Write = H above the equals sign to indicate an application of L'Hôpital's Rule.

To apply L'Hôpital's Rule:

  1. Verify that the limit takes the form 0 / 0 (or ± / ± ).
  2. Differentiate f ( x ) and g ( x ) separately (not the ratio).
  3. Find \lim_{x\to s} f'(x)/g'(x). If it is a number, + , or , that is the answer. Otherwise, you cannot conclude the original limit does not exist, but you cannot use L'Hôpital's Rule further in this form.
  4. If the result is still 0 / 0 or ± / ± , repeat.

Stop differentiating as soon as the numerator or denominator is no longer zero (or infinite) at s .

Examples: Form 0 / 0

Find lim x 0 sin x 1 e x .

Solution f ( 0 ) = sin 0 = 0 and g ( 0 ) = 1 e 0 = 0 , so we apply L'Hôpital's Rule: lim x 0 sin x 1 e x = H cos 0 e 0 = 1 1 = 1.

Find lim x 1 1 x 3 1 x .

Solution lim x 1 1 x 3 1 x = H lim x 1 3 x 2 1 = 3.

Find lim x 1 x 3 3 x + 2 2 x 3 x 2 4 x + 3 .

Solution lim x 1 x 3 3 x + 2 2 x 3 x 2 4 x + 3 = H lim x 1 3 x 2 3 6 x 2 2 x 4 . At x = 1 : still 0 / 0 . Apply L'Hôpital's Rule again: = H lim x 1 6 x 12 x 2 = 6 10 = 3 5 . **Warning:** After the second application, the limit 6 x / ( 12 x 2 ) is no longer indeterminate at x = 1 . Do not apply L'Hôpital's Rule a third time.

Find lim t 2 t + 7 3 t 2 .

Solution lim t 2 t + 7 3 t 2 = H lim t 2 1 2 t + 7 1 = 1 2 9 = 1 6 .

Find lim x 0 1 cos x x 2 .

Solution lim x 0 1 cos x x 2 = H lim x 0 sin x 2 x = H lim x 0 cos x 2 = 1 2 .

Find lim x 0 x sin x x tan x .

Solution lim x 0 x sin x x tan x = H lim x 0 1 cos x 1 sec 2 x . Simplify algebraically: 1 cos x 1 sec 2 x = 1 cos x cos 2 x 1 cos 2 x = cos 2 x ( 1 cos x ) ( cos x 1 ) ( cos x + 1 ) = cos 2 x cos x + 1 . lim x 0 cos 2 x cos x + 1 = 1 2 .

Find lim x 1 ln x x 1 .

Solution lim x 1 ln x x 1 = H lim x 1 1 / x 1 = 1.

Find lim x 0 x sin x sinh x .

Solution lim x 0 x sin x sinh x = H lim x 0 1 cos x cosh x = 1 1 1 = 0.
Graph of y = (x - sin x) / sinh x showing the function approaching 0 at the origin

Find lim x 0 arcsin 4 x 2 arcsin 2 x x 3 .

Solution The limit is 0 / 0 . Using d d x arcsin x = 1 1 x 2 : lim x 0 arcsin 4 x 2 arcsin 2 x x 3 = H lim x 0 4 1 16 x 2 4 1 4 x 2 3 x 2 . Still 0 / 0 . Writing the numerator as 4 ( 1 16 x 2 ) 1 / 2 4 ( 1 4 x 2 ) 1 / 2 and differentiating: = H lim x 0 64 ( 1 16 x 2 ) 3 / 2 16 ( 1 4 x 2 ) 3 / 2 6 = 64 16 6 = 8.

Find lim x e 1 / x 2 1 2 arctan x 2 π .

Solution As x : e 1 / x 2 e 0 = 1 and arctan x 2 π / 2 , so the limit is 0 / 0 . Applying L'Hôpital's Rule: lim x e 1 / x 2 1 2 arctan x 2 π = H lim x 2 x 3 e 1 / x 2 4 x / ( 1 + x 4 ) = lim x ( 1 + x 4 ) 2 x 4 e 1 / x 2 = 1 2 .

Find lim x + x 5 / 3 sin ( 1 / x ) .

Solution As x + , both x 5 / 3 0 and sin ( 1 / x ) 0 , giving 0 / 0 : lim x + x 5 / 3 sin ( 1 / x ) = H lim x + 5 3 x 8 / 3 1 x 2 cos ( 1 / x ) = lim x + 5 x 2 / 3 3 cos ( 1 / x ) = 0 3 ( 1 ) = 0.

Evaluate lim x sin ( 1 / x ) ln x + 1 x + 2 .

Solution As x : sin ( 1 / x ) 0 and ln x + 1 x + 2 ln 1 = 0 , giving 0 / 0 . lim x sin ( 1 / x ) ln x + 1 x + 2 = H lim x 1 x 2 cos 1 x 1 ( x + 2 ) ( x + 1 ) = lim x ( ( x + 1 ) ( x + 2 ) x 2 cos 1 x ) = ( 1 ) ( 1 ) = 1.

Limitations of L'Hôpital's Rule

If f , g 0 as x s , but \lim_{x\to s}f'(x)/g'(x) does not exist (and is not ± ), we cannot conclude that lim x s f ( x ) / g ( x ) fails to exist. For example, with f ( x ) = x 2 sin ( 1 / x ) and g ( x ) = x : f'(x)/g'(x)=2x\sin(1/x)-\cos(1/x), which does not have a limit as x 0 (because cos ( 1 / x ) oscillates). Yet:

lim x 0 x 2 sin ( 1 / x ) x = lim x 0 x sin 1 x = 0.

Also, sometimes L'Hôpital's Rule leads to circular or increasingly complex expressions. Examples:

  • lim x 0 + e 1 / x x : repeated application gets more complicated; substitute t = 1 / x instead to get lim t + t e t = H 0 .

  • lim x + e x e x e x + e x : L'Hôpital's Rule cycles back to the original expression. Factor out e x instead: lim x + 1 e 2 x 1 + e 2 x = 1 .

L'Hôpital's Rule for ± / ±

L'Hôpital's Rule for ± / ± . Assume lim x s f ( x ) = ± and lim x s g ( x ) = ± . If \lim_{x\to s}f'(x)/g'(x)=L (or ± ), then:

lim x s f ( x ) g ( x ) = L .

Find lim x π / 2 + tan 5 x tan x .

Solution Both tan 5 x and tan x as x ( π / 2 ) + , giving / : lim x π / 2 + tan 5 x tan x = H lim x π / 2 + 5 sec 2 ( 5 x ) sec 2 x = lim x π / 2 + 5 cos 2 x cos 2 ( 5 x ) = H 0 / 0 lim x π / 2 + sin 2 x sin 10 x = H lim x π / 2 + 2 cos 2 x 10 cos 10 x = 2 cos 0 10 cos 0 = 1 5 .

Evaluate lim x + ln x x α where α > 0 .

Solution This is / : lim x + ln x x α = H lim x + 1 / x α x α 1 = lim x + 1 α x α = 0. This shows that x α grows much faster than ln x for any α > 0 .

Evaluate lim x 0 + ln x csc x .

Solution ln x and csc x + as x 0 + , giving / : lim x 0 + ln x csc x = H lim x 0 + 1 / x csc x cot x = lim x 0 + sin 2 x x cos x = H lim x 0 + 2 sin x cos x cos x x sin x = 0.

Indeterminate Form 0 ( ± )

If f ( x ) 0 and g ( x ) ± as x s , rewrite the product as a fraction:

f ( x ) g ( x ) = f ( x ) 1 / g ( x ) or g ( x ) 1 / f ( x ) ,

producing the form 0 / 0 or ± / ± , then apply L'Hôpital's Rule.

Evaluate lim x π / 2 ( sec 3 x cos 5 x ) .

Solution As x π / 2 : cos 5 x 0 and sec 3 x ± , giving 0 ( ± ) . Write: sec 3 x cos 5 x = cos 5 x cos 3 x = [ 0 0 ] . lim x π / 2 cos 5 x cos 3 x = H lim x π / 2 5 sin 5 x 3 sin 3 x = 5 sin ( 5 π / 2 ) 3 sin ( 3 π / 2 ) = 5 ( 1 ) 3 ( 1 ) = 5 3 .
Graph of y = sec(3x)cos(5x) near x = pi/2, showing the function approaching -5/3

Evaluate lim x π / 2 ( π 2 x ) tan x .

Solution ( π 2 x ) 0 and tan x ± as x π / 2 . Write as 0 / 0 : lim x π / 2 ( π 2 x ) tan x = lim x π / 2 π 2 x cot x = H lim x π / 2 2 ( 1 + cot 2 x ) = 2 ( 1 + 0 ) = 2.
Graph of y = (pi - 2x) tan x near x = pi/2, approaching 2

Evaluate lim x 0 + x ln sin x .

Solution x 0 and ln sin x , giving 0 ( ) : lim x 0 + x ln sin x = lim x 0 + ln sin x 1 / x = [ + ] = H lim x 0 + ( cos x ) / sin x 1 / x 2 = lim x 0 + ( x 2 cot x ) . = lim x 0 + ( cos x ) ( x sin x ) ( x ) = ( 1 ) ( 1 ) ( 0 ) = 0.
Graph of y = x ln(sin x) near x = 0, approaching 0

Evaluate lim x x e x .

Solution e x 0 as x , giving 0 ( ) : lim x x e x = lim x x e x = H lim x 1 e x = 0.
Graph of y = x e^x, approaching 0 as x approaches negative infinity

Indeterminate Form

To evaluate a limit of the form , convert to a fraction using a common denominator, rationalization, or factoring, then apply L'Hôpital's Rule.

Evaluate lim x π / 2 ( sec x tan x ) .

Solution Using a common denominator: sec x tan x = 1 sin x cos x = [ 0 0 ] . lim x π / 2 1 sin x cos x = H lim x π / 2 cos x sin x = 0 1 = 0.

Evaluate lim x 0 ( 1 sin x 1 x ) .

Solution lim x 0 x sin x x sin x = H lim x 0 1 cos x sin x + x cos x = H lim x 0 sin x 2 cos x x sin x = 0 2 = 0.

Evaluate lim x 1 ( 1 ln x 1 x 1 ) .

Solution lim x 1 x 1 ln x ( x 1 ) ln x = H lim x 1 1 1 / x ln x + 1 1 / x = H lim x 1 1 / x 2 1 / x + 1 / x 2 = 1 1 + 1 = 1 2 .

Indeterminate Forms 0 0 , 1 ± , ( ± ) 0

Limits of the form lim x s f ( x ) g ( x ) are indeterminate when:

  • f 0 and g 0 (form 0 0 ),
  • f 1 and g ± (form 1 ± ),
  • f ± and g 0 (form ( ± ) 0 ).

Strategy: Let y = f ( x ) g ( x ) , take ln y = g ( x ) ln f ( x ) (form 0 ± ), find lim ln y = L , then lim y = e L .

Note: 0 + = 0 and 0 = + are not indeterminate.

Evaluate lim x 0 + x x .

Solution Let y = x x , so ln y = x ln x . As x 0 + , this is 0 ( ) : lim x 0 + x ln x = lim x 0 + ln x 1 / x = H lim x 0 + 1 / x 1 / x 2 = lim x 0 + ( x ) = 0. Therefore ln y 0 , so y = e ln y e 0 = 1 .
Graph of y = x^x for x  loading= 0, approaching 1 as x approaches 0">

Evaluate lim x + x 1 / x .

Solution Form ( ) 0 . Let y = x 1 / x , so ln y = ( ln x ) / x : lim x + ln x x = H lim x + 1 / x 1 = 0. So ln y 0 and y e 0 = 1 .

Evaluate lim x 0 ( 1 + sin x ) 1 / x .

Solution Form 1 . Let y = ( 1 + sin x ) 1 / x , so ln y = ln ( 1 + sin x ) x : lim x 0 ln ( 1 + sin x ) x = H lim x 0 cos x / ( 1 + sin x ) 1 = 1. So ln y 1 and y e 1 = e .
Graph of y = (1 + sin x)^(1/x), approaching e at x = 0

Evaluate lim x 0 + ( cot x ) sin x .

Solution Form 0 . Let y = ( cot x ) sin x , so ln y = sin x ln cot x : lim x 0 + ln cot x 1 / sin x = H lim x 0 + ( 1 + cot 2 x ) ( 1 / cot x ) cos x / sin 2 x = lim x 0 + sin x cos x = 0. So ln y 0 and y e 0 = 1 .

Frequently Asked Questions

When should I NOT use L'Hôpital's Rule? Do not apply L'Hôpital's Rule if the limit is not in an indeterminate form. For example, lim x 0 ( 1 + 2 x ) / ( 1 x ) = 1 by simple substitution. Applying L'Hôpital's Rule there (incorrectly) gives 2 / ( 1 ) = 2 , which is wrong.

Can L'Hôpital's Rule be applied repeatedly? Yes, as long as each application produces another indeterminate form. Stop as soon as the limit can be evaluated by substitution. Never apply L'Hôpital's Rule when the result is not indeterminate.

What if L'Hôpital's Rule does not resolve the limit? L'Hôpital's Rule can fail to resolve the limit in two ways: (1) the ratio of derivatives cycles back to the original form (as in lim x + ( e x e x ) / ( e x + e x ) ), or (2) the ratio of derivatives has no limit (as in the x 2 sin ( 1 / x ) / x example). In these cases, use algebraic manipulation, substitution, or other techniques to evaluate the limit directly.