Radford Mathematics IB Mathematics resources • AA HL

Radford Mathematics

Contact / enquiry

Send a question about tutoring, revision courses, website resources or anything else. Your message will be sent to info@radfordmathematics.com.

IB Mathematics: Analysis and Approaches HL — Topic 5 Calculus

L’Hôpital’s Rule

Recognise the indeterminate forms \(0/0\) and \(\infty/\infty\), differentiate numerator and denominator separately, and repeat only when the new quotient is still indeterminate.

AA HL · AHL 5.13

Learning goal

Use l’Hôpital’s rule to evaluate limits that initially produce an indeterminate quotient. Decide when the rule applies, when it does not, and how to use it repeatedly.

Syllabus link

AHL 5.13 Limits as \(x\to a\) or \(x\to\infty\), using l’Hôpital’s rule or Maclaurin series; indeterminate forms \(0/0\) and \(\infty/\infty\); repeated use of the rule.

Big idea

When both numerator and denominator approach zero or both become unbounded, the original quotient may be hard to read. l’Hôpital’s rule compares their instantaneous rates of change instead.

Allowed forms

Use the rule only after direct substitution produces \(0/0\) or \(\infty/\infty\).

1

The problem: a quotient that refuses to give an answer

Substitution is always the first step when evaluating a limit. Sometimes it gives a useful answer immediately. But sometimes it gives an expression such as

\[\begin{gathered}\frac00 \\ \text{or} \\ \frac{\infty}{\infty},\end{gathered}\]

which is called an indeterminate form. The word indeterminate matters: it means the form alone does not determine the value of the limit.

A motivating question

Evaluate

\[\lim_{x\to 0}\frac{e^{2x}-1}{\sin(3x)}.\]

Solution

Substitution gives

\[\frac{e^0-1}{\sin 0}=\frac00,\]

so the limit is not found by direct substitution. The numerator and denominator both approach zero, but the limit depends on how fast they approach zero.

The curves e to the power 2x minus 1 and sin of 3x pass through the origin; their tangent slopes at zero are 2 and 3 respectively

The slopes shown on the diagram come from the gradients of the tangent lines at \(x=0\). For the numerator, \(N(x)=e^{2x}-1\), so \(N'(x)=2e^{2x}\) and therefore \(N'(0)=2\). For the denominator, \(D(x)=\sin(3x)\), so \(D'(x)=3\cos(3x)\) and therefore \(D'(0)=3\). So, very close to \(x=0\), the numerator behaves approximately like \(2x\) and the denominator behaves approximately like \(3x\). Hence

\[\frac{e^{2x}-1}{\sin(3x)}\approx \frac{2x}{3x}=\frac23.\]

l’Hôpital’s rule makes this intuition precise.

l’Hôpital’s Rule

Use this video alongside the first part of the lesson for a guided explanation of the idea, method and worked examples.

Watch on YouTube →

2

The rule and its conditions

l’Hôpital’s rule

Suppose \(f\) and \(g\) are differentiable near \(x=a\) (except possibly at \(a\) itself), with \(g'(x)\ne0\) nearby for \(x\ne a\), and suppose

\[\begin{gathered}\lim_{x\to a} f(x)=0,\\ \lim_{x\to a}g(x)=0.\end{gathered}\]

If the derivative quotient has a limit, then

\[\boxed{\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}}.\]

The same idea applies to the indeterminate form \(\frac{\infty}{\infty}\) and to limits as \(x\to\infty\).

Before using the rule, check these points

  • It must be a quotient: \(\frac{f(x)}{g(x)}\).

  • Direct substitution must give \(\frac00\) or \(\frac{\infty}{\infty}\).

  • Differentiate the numerator and denominator separately. Do not use the quotient rule.

  • If the new quotient is still indeterminate, the rule may be used again.

  • If substitution does not give an indeterminate form, do not use l’Hôpital’s rule.

3

A safe method for IB AA HL

  1. Try direct substitution.

  2. State the indeterminate form, for example \(\frac00\) or \(\frac{\infty}{\infty}\).

  3. Differentiate the numerator and denominator separately.

  4. Substitute again.

  5. Repeat only if the new expression is still indeterminate.

  6. Finish with a clear exact answer when possible.

Notation tip

A good line of working is:

\[\begin{gathered}\lim_{x\to a}\frac{f(x)}{g(x)} \overset{\frac00}{=} \lim_{x\to a}\frac{f'(x)}{g'(x)}.\end{gathered}\]

The symbol above the equals sign is not required, but it reminds the reader why l’Hôpital’s rule is allowed.

Worked example 1: a basic \(\frac00\) limit

Question. Evaluate

\[\lim_{x\to0}\frac{e^{2x}-1}{\sin(3x)}.\]

Solution

Direct substitution gives

\[\frac{e^0-1}{\sin 0}=\frac00,\]

so l’Hôpital’s rule may be used.

\[\begin{gathered}\lim_{x\to0}\frac{e^{2x}-1}{\sin(3x)} \\=\lim_{x\to0}\frac{2e^{2x}}{3\cos(3x)} \\=\frac{2e^0}{3\cos0} \\=\frac23.\end{gathered}\]

Answer: \(\frac23\)

Worked example 2: repeated use

Question. Evaluate

\[\lim_{x\to0}\frac{1-\cos x}{x^2}.\]

Solution

Direct substitution gives \(\frac00\), so use l’Hôpital’s rule.

\[\lim_{x\to0}\frac{1-\cos x}{x^2} =\lim_{x\to0}\frac{\sin x}{2x}.\]

This is still \(\frac00\), so use l’Hôpital’s rule again:

\[\lim_{x\to0}\frac{\sin x}{2x} =\lim_{x\to0}\frac{\cos x}{2} =\frac12.\]

Answer: \(\frac12\)

Worked example 3: a \(\frac{\infty}{\infty}\) limit

Question. Evaluate

\[\lim_{x\to\infty}\frac{\ln x}{\sqrt{x}}.\]

Solution

As \(x\to\infty\),

\[\begin{gathered}\ln x\to\infty \\\text{and}\quad \sqrt{x}\to\infty,\end{gathered}\]

so the expression has form \(\frac{\infty}{\infty}\). Use l’Hôpital’s rule:

\[\begin{gathered}\lim_{x\to\infty}\frac{\ln x}{\sqrt{x}} \\=\lim_{x\to\infty}\frac{\frac1x}{\frac1{2\sqrt{x}}} \\=\lim_{x\to\infty}\frac{2\sqrt{x}}{x} \\=\lim_{x\to\infty}\frac{2}{\sqrt{x}} \\=0.\end{gathered}\]

Answer: \(0\)

Worked example 4: repeated use with trigonometry

Question. Evaluate

\[\lim_{x\to0}\frac{\tan x-x}{x^3}.\]

Solution

Direct substitution gives \(\frac00\).

\[\begin{gathered}\lim_{x\to0}\frac{\tan x-x}{x^3} \\=\lim_{x\to0}\frac{\sec^2x-1}{3x^2} \\=\lim_{x\to0}\frac{\tan^2x}{3x^2}.\end{gathered}\]

This is still \(\frac00\), so use l’Hôpital’s rule again:

\[\lim_{x\to0}\frac{\tan^2x}{3x^2} =\lim_{x\to0}\frac{2\tan x\sec^2x}{6x}.\]

This is still \(\frac00\), so use l’Hôpital’s rule a third time:

\[\begin{gathered}\lim_{x\to0}\frac{2\tan x\sec^2x}{6x} \\=\lim_{x\to0}\frac{2\sec^4x+4\tan^2x\sec^2x}{6} \\=\frac{2}{6}\\=\frac13.\end{gathered}\]

Answer: \(\frac13\)

4

When not to use l’Hôpital’s rule

Common trap

l’Hôpital’s rule is not a magic rule for every limit. It only applies to a quotient with an indeterminate form \(\frac00\) or \(\frac{\infty}{\infty}\).

Worked example 5: a non-example

Question. Explain why l’Hôpital’s rule should not be used directly on

\[\lim_{x\to0^+}\frac{x+1}{x}.\]

Solution

Direct substitution does not give \(\frac00\) or \(\frac{\infty}{\infty}\):

\[\frac{x+1}{x}\to \frac{1}{0^+}.\]

The numerator approaches \(1\), while the denominator approaches \(0^+\). Therefore

\[\lim_{x\to0^+}\frac{x+1}{x}=+\infty.\]

l’Hôpital’s rule is not appropriate because the expression is not indeterminate.

5

l’Hôpital’s rule and Maclaurin series

The AA HL syllabus also allows some of these limits to be evaluated using Maclaurin series. This is often a useful check.

Worked example 6: using a Maclaurin check

Question. Re-evaluate

\[\lim_{x\to0}\frac{1-\cos x}{x^2}\]

using a Maclaurin expansion.

Solution

Since

\[\cos x=1-\frac{x^2}{2}+\frac{x^4}{24}-\cdots,\]

we have

\[1-\cos x=\frac{x^2}{2}-\frac{x^4}{24}+\cdots.\]

Therefore

\[\frac{1-\cos x}{x^2}=\frac12-\frac{x^2}{24}+\cdots,\]

and so

\[\lim_{x\to0}\frac{1-\cos x}{x^2}=\frac12.\]

This agrees with the repeated l’Hôpital’s rule result.

6

Rewriting before using l’Hôpital’s rule

Some limits do not begin as a quotient of the form \(\frac00\) or \(\frac{\infty}{\infty}\). In these cases, the main skill is to rewrite the expression first. Only then can we decide whether l’Hôpital’s rule is useful.

Important idea

Do not force l’Hôpital’s rule immediately. First identify the indeterminate form, then rewrite it into a quotient if possible.

Worked example 7: a product form \(0\cdot\infty\)

Question. Evaluate

\[\lim_{x\to0^+}x\ln x.\]

Solution

Direct substitution gives the indeterminate product form

\[0\cdot(-\infty).\]

This is not a quotient yet, so rewrite \(x\) as \(\frac{1}{1/x}\):

\[x\ln x=\frac{\ln x}{1/x}.\]

Therefore

\[\lim_{x\to0^+}x\ln x = \lim_{x\to0^+}\frac{\ln x}{1/x}.\]

This now has form \(\frac{-\infty}{\infty}\), so l’Hôpital’s rule may be used:

\[\begin{gathered}\lim_{x\to0^+}\frac{\ln x}{1/x} \\= \lim_{x\to0^+}\frac{1/x}{-1/x^2} \\= \lim_{x\to0^+}(-x) \\=0.\end{gathered}\]

Answer: \(0\)

Worked example 8: an \(\infty-\infty\) form

Question. Evaluate

\[\lim_{x\to\infty}\left(\sqrt{x^2+x}-x\right).\]

Solution

Direct substitution gives the indeterminate form

\[\infty-\infty.\]

Rationalise the expression:

\[\begin{gathered}\sqrt{x^2+x}-x \\= \frac{(\sqrt{x^2+x}-x)(\sqrt{x^2+x}+x)}{\sqrt{x^2+x}+x} \\= \frac{x^2+x-x^2}{\sqrt{x^2+x}+x} \\= \frac{x}{\sqrt{x^2+x}+x}.\end{gathered}\]

Now divide the numerator and denominator by \(x\):

\[\frac{x}{\sqrt{x^2+x}+x} = \frac{1}{\sqrt{1+\frac1x}+1}.\]

Therefore

\[\begin{gathered}\lim_{x\to\infty}\left(\sqrt{x^2+x}-x\right) \\= \frac{1}{\sqrt{1+0}+1} \\= \frac12.\end{gathered}\]

Answer: \(\frac12\)

Note. After rewriting, l’Hôpital’s rule was not needed. The algebra did the work.

Worked example 9: an \(\infty-\infty\) form that leads to l’Hôpital’s rule

Question. Evaluate

\[\lim_{x\to0^+}\left(\frac1x-\frac1{e^x-1}\right).\]

Solution

Direct substitution gives the indeterminate form

\[\infty-\infty.\]

Combine the two fractions:

\[\frac1x-\frac1{e^x-1} = \frac{e^x-1-x}{x(e^x-1)}.\]

So

\[\begin{gathered}\lim_{x\to0^+}\left(\frac1x-\frac1{e^x-1}\right) \\= \lim_{x\to0^+}\frac{e^x-1-x}{x(e^x-1)}.\end{gathered}\]

Substitution now gives \(\frac00\), so l’Hôpital’s rule may be used:

\[\begin{gathered}\lim_{x\to0^+}\frac{e^x-1-x}{x(e^x-1)} \\= \lim_{x\to0^+}\frac{e^x-1}{(e^x-1)+xe^x}.\end{gathered}\]

This is still \(\frac00\), so use l’Hôpital’s rule again:

\[\begin{gathered}\lim_{x\to0^+}\frac{e^x-1}{(e^x-1)+xe^x} \\= \lim_{x\to0^+}\frac{e^x}{e^x+(e^x+xe^x)} \\= \lim_{x\to0^+}\frac{e^x}{2e^x+xe^x}.\end{gathered}\]

Now substitute \(x=0\):

\[\frac{1}{2+0}=\frac12.\]

Answer: \(\frac12\)

7

Practice questions

Evaluate each limit, or explain why l’Hôpital’s rule is not appropriate.

  1. \(\displaystyle \lim_{x\to0}\frac{\sin(5x)}{2x}\)

  2. \(\displaystyle \lim_{x\to0}\frac{e^{3x}-1}{x}\)

  3. \(\displaystyle \lim_{x\to0}\frac{1-\cos(2x)}{x^2}\)

  4. \(\displaystyle \lim_{x\to\infty}\frac{\ln x}{x}\)

  5. \(\displaystyle \lim_{x\to\infty}\frac{x^2}{e^x}\)

  6. \(\displaystyle \lim_{x\to0}\frac{\tan x-x}{x^3}\)

  7. Explain why l’Hôpital’s rule should not be used directly on \(\displaystyle \lim_{x\to0}\frac{x^2+1}{x}\).

  8. Find the value of \(k\) if

    \[\lim_{x\to0}\frac{e^{kx}-1}{\sin(2x)}=3.\]
  9. Evaluate \(\displaystyle \lim_{x\to0}\frac{x-\sin x}{x^3}\).

  10. True or false? If \(\displaystyle \lim_{x\to a}\frac{f(x)}{g(x)}\) gives \(\frac00\), then one use of l’Hôpital’s rule always gives the final answer. Explain.

8

Answer key

Practice answers

  1. Since direct substitution gives \(\frac00\),

    \[\lim_{x\to0}\frac{\sin(5x)}{2x}=\lim_{x\to0}\frac{5\cos(5x)}{2}=\frac52.\]
  2. \[\lim_{x\to0}\frac{e^{3x}-1}{x}=\lim_{x\to0}\frac{3e^{3x}}{1}=3.\]
  3. \[\begin{gathered}\lim_{x\to0}\frac{1-\cos(2x)}{x^2} \\=\lim_{x\to0}\frac{2\sin(2x)}{2x} \\=\lim_{x\to0}\frac{4\cos(2x)}{2}\\=2.\end{gathered}\]
  4. \[\lim_{x\to\infty}\frac{\ln x}{x} =\lim_{x\to\infty}\frac{1/x}{1}=0.\]
  5. This is \(\frac{\infty}{\infty}\). Use l’Hôpital’s rule twice:

    \[\begin{gathered}\lim_{x\to\infty}\frac{x^2}{e^x} \\=\lim_{x\to\infty}\frac{2x}{e^x} \\=\lim_{x\to\infty}\frac{2}{e^x}\\=0.\end{gathered}\]
  6. From Worked example 4,

    \[\lim_{x\to0}\frac{\tan x-x}{x^3}=\frac13.\]
  7. Direct substitution gives

    \[\frac{x^2+1}{x}\to \frac{1}{0},\]

    not \(\frac00\) or \(\frac{\infty}{\infty}\). The expression is not indeterminate, so l’Hôpital’s rule should not be used directly. The two-sided limit does not exist because the expression tends to \(+\infty\) from the right and \(-\infty\) from the left.

  8. Direct substitution gives \(\frac00\). Then

    \[\begin{gathered}\lim_{x\to0}\frac{e^{kx}-1}{\sin(2x)} \\=\lim_{x\to0}\frac{ke^{kx}}{2\cos(2x)}\\=\frac{k}{2}.\end{gathered}\]

    Therefore \(\frac{k}{2}=3\), so \(k=6\).

  9. Direct substitution gives \(\frac00\).

    \[\lim_{x\to0}\frac{x-\sin x}{x^3} =\lim_{x\to0}\frac{1-\cos x}{3x^2}.\]

    This is still \(\frac00\), so

    \[\lim_{x\to0}\frac{1-\cos x}{3x^2} =\lim_{x\to0}\frac{\sin x}{6x}.\]

    This is still \(\frac00\), so

    \[\lim_{x\to0}\frac{\sin x}{6x}=\lim_{x\to0}\frac{\cos x}{6}=\frac16.\]
  10. False. Sometimes the new quotient is still indeterminate and l’Hôpital’s rule must be used again. For example,

    \[\lim_{x\to0}\frac{1-\cos x}{x^2}\]

    requires two uses of l’Hôpital’s rule.