Math explained

L'Hôpital's rule and the Mean Value Theorem: when each applies, one example of each worked, and the hypothesis students skip

L’Hôpital’s rule and the Mean Value Theorem: the hypothesis to check first, one example of each worked line by line, and the case where each theorem fails.

L'Hôpital's rule says that if a limit gives 0/0 or ∞/∞, you may replace the fraction by the quotient of the derivatives (the top's derivative over the bottom's derivative, not the quotient rule) and take the limit again. The Mean Value Theorem says that a function continuous on [a, b] and differentiable on (a, b) has a point c where the tangent slope f'(c) equals the chord slope (f(b) − f(a))/(b − a). Each has a hypothesis, and each gives a wrong answer when the hypothesis is skipped. Here is one example of each, worked, and one case where each fails.

Two theorems, one habit: check the hypothesis first

A theorem is a promise with conditions. "If these things are true, then this follows." Students learn the "then" part because it is the part that produces an answer, and skip the "if" part because it seems like paperwork. With these two theorems, skipping the "if" does not just lose a mark for style. It produces a wrong number. So the habit is one line, written before the theorem is used: state the hypothesis and confirm it holds.

Both theorems sit in first-year calculus. In a Calculus I course, idea 11 is Rolle's theorem and the Mean Value Theorem and idea 15 is Indeterminate forms and L'Hôpital's rule. Neither is in MCV4U, so a Grade 12 student in Ontario usually meets them in first year (first-year calculus, what changes has the full picture) or in AP Calculus.

L'Hôpital's rule: what it says and when it applies

The statement: suppose f and g are differentiable near x = a, with g'(x) ≠ 0 near a (except possibly at a itself), and that substituting x = a into f(x)/g(x) gives 0/0 or ∞/∞. If the limit of f'(x)/g'(x) exists (or is infinite), then the limit of f(x)/g(x) is that same value. In symbols, lim f/g = lim f'/g'.

The hypothesis check is one line: substitute and confirm you get 0/0 or ∞/∞. The differentiability conditions hold automatically for the functions in a first course near the point, so the form is the check that catches students. Those two are called indeterminate forms, because the form alone does not tell you the limit. 0/0 can turn out to be 2/3, or 5, or anything. If limits and 0/0 are still new, read that page before this one; factoring and cancelling come first, and L'Hôpital is the tool for the limits that factoring cannot reach.

Other indeterminate forms exist, such as 0 · ∞, ∞ − ∞ and 1^∞. They are rewritten as a quotient first (a power such as 1^∞ by taking its logarithm first), and then the rule applies to the quotient.

One more point, because it costs marks every year. The rule differentiates the top and the bottom separately. It is not the quotient rule, and there is no subtraction and no squared denominator anywhere in it. (The search spelling, L'Hopital without the accent, names the same rule.)

Worked example 1: L'Hôpital's rule, line by line

Find the limit as x → 0 of (e^(2x) − 1)/sin(3x).

  • Line 1, check the hypothesis by substituting. The top is e⁰ − 1 = 1 − 1 = 0. The bottom is sin 0 = 0. The form is 0/0, so the rule applies.
  • Line 2, differentiate the top and the bottom separately. The top's derivative is 2e^(2x), by the chain rule. The bottom's derivative is 3cos(3x).
  • Line 3, write the new limit. The limit as x → 0 of 2e^(2x)/(3cos(3x)).
  • Line 4, substitute again. 2 · 1/(3 · 1) = 2/3.

The limit is 2/3.

The common wrong lines

Applying the rule to a limit that is not indeterminate. Take the limit as x → 0 of (x + 1)/(x + 2). Substitution gives 1/2 directly, and that is the answer. But a student who reaches for L'Hôpital without checking differentiates the top and the bottom, gets 1/1, and reports 1. That is wrong. The rule only promises anything when the form is 0/0 or ∞/∞, and here it was never either. This is the one-line check doing its job.

Using the quotient rule on f/g instead of f'/g'. The quotient rule gives the derivative of the fraction, which is a different object with a different limit. L'Hôpital never asks for the derivative of the fraction.

A caution about sin x/x. You may be tempted to use the rule on the limit as x → 0 of sin(x)/x. It gives 1, which is correct, but the argument is circular in a course that uses this very limit to prove that the derivative of sin x is cos x. Know the limit from its own proof.

Sibling to try cold (L'Hôpital)

Cover the example. Find the limit as x → 0 of (1 − cos x)/x². Check the hypothesis at every step.

Check

The answer is 1/2. It takes two applications: after the first, the new fraction still gives 0/0 when you substitute, so you check again and apply the rule a second time. If you stopped after one and reported 0/0 as a value, or applied the rule a third time to a limit that was no longer indeterminate, the hypothesis check is the line you skipped.

The Mean Value Theorem: what it says and when it applies

The statement in words: if a function is continuous on the closed interval [a, b] and differentiable on the open interval (a, b), then there is at least one c strictly between a and b where the instantaneous rate of change equals the average rate of change over the whole interval. In symbols, f'(c) = (f(b) − f(a))/(b − a). This is the mean value theorem formula.

The picture in words: draw the chord joining the two endpoints of the graph. Somewhere between them, the curve has a tangent line parallel to that chord.

Rolle's theorem is the special case where f(a) = f(b). The chord is flat, so somewhere between a and b there is a c with f'(c) = 0, a flat tangent.

The hypothesis check: is f continuous on the closed interval, and differentiable on the open one? Polynomials always pass, everywhere. The functions that can fail are the ones with a corner, a cusp or a break inside the interval: absolute values, roots such as the cube root at 0, and rational functions with a vertical asymptote between a and b.

Worked example 2: how to find c in the Mean Value Theorem, line by line

Let f(x) = x³ − x on [0, 2]. Find every c that the Mean Value Theorem promises.

  • Line 1, check the hypothesis. f is a polynomial, so it is continuous and differentiable everywhere. The theorem applies.
  • Line 2, compute the chord slope. f(2) = 8 − 2 = 6 and f(0) = 0, so the chord slope is (6 − 0)/(2 − 0) = 3.
  • Line 3, differentiate. f'(x) = 3x² − 1.
  • Line 4, set f'(c) equal to the chord slope and solve. 3c² − 1 = 3, so 3c² = 4, so c² = 4/3, so c = ±2/√3.
  • Line 5, keep only the c inside the interval. 2/√3 ≈ 1.155 lies in (0, 2). −2/√3 does not. So c = 2/√3, which is also written 2√3/3.

The common wrong lines

Keeping c = −2/√3. It solves the equation in line 4, but it lies outside (0, 2), and the theorem only promises a c strictly between a and b. Always test each solution against the interval.

Applying the theorem to f(x) = |x| on [−1, 1]. The chord slope is (1 − 1)/(1 − (−1)) = 0. So the "answer" would be a c where f'(c) = 0. But f'(x) is −1 for x < 0 and 1 for x > 0, and there is no derivative at all at x = 0. No such c exists. The theorem has not broken. Its hypothesis failed: |x| is not differentiable at 0, which is inside the interval, so the theorem never applied. Seeing a theorem fail when its condition fails is the fastest way to remember the condition, and Booth and colleagues (2013) found that students who studied explained incorrect examples alongside correct ones learned the concepts better, which is why this page shows each theorem failing once.

Sibling to try cold (Mean Value Theorem)

Cover the example. Let f(x) = x² on [1, 4]. Check the hypothesis, then find c.

Check

f is a polynomial, so the hypothesis holds. The chord slope is (16 − 1)/(4 − 1) = 5. f'(c) = 2c = 5, so c = 2.5, which lies inside (1, 4).

Why the Mean Value Theorem matters even when no one asks for c

Finding c is the exam question, but it is not why the theorem is in the course. Three results follow from it, and you use all three constantly.

  • A function whose derivative is 0 everywhere on an interval is constant there.
  • If f' > 0 on an interval, f is increasing there. This is the basis of the first-derivative test in the next idea, Critical points and extrema.
  • Two functions with the same derivative differ by a constant. That is where the + C comes from in every antiderivative.

The proofs of both theorems are in the textbook chapter. You will rarely be asked to reproduce them in a first course, but you will use these three consequences in every integration unit.

Where this sits in the course, and where it goes next

In Calculus I, idea 11, Rolle's theorem and the Mean Value Theorem, comes after idea 10, Hyperbolic functions and their derivatives, and before idea 12, Critical points and extrema. Idea 15, Indeterminate forms and L'Hôpital's rule, comes after idea 14, Limits at infinity, asymptotes and curve sketching, and before idea 16, Optimization.

One limit where you do not need L'Hôpital at all: a rational function as x → ∞, where the degrees of the top and bottom decide the answer. Limits at infinity on rational functions shows that shortcut.

To make the hypothesis checks stick, test yourself on them before you reread the statements: write the "if" of each theorem from memory, then check. Test yourself before you reread has the method. This page shows a worked example before each sibling for the reason Sweller and Cooper (1985) found, and worked examples, then practice problems explains the order.

L'Hôpital's rule and the Mean Value Theorem on one screen

  • L'Hôpital's rule: if substitution gives 0/0 or ∞/∞, then lim f/g = lim f'/g', top and bottom differentiated separately.
  • Its hypothesis check: substitute first. (x + 1)/(x + 2) at 0 is 1/2, not 1.
  • Mean Value Theorem: continuous on [a, b], differentiable on (a, b), then some c in (a, b) has f'(c) = (f(b) − f(a))/(b − a).
  • Its hypothesis check: any corner, cusp or break inside the interval? |x| on [−1, 1] has no c.
  • Rolle's theorem: the case f(a) = f(b), so some f'(c) = 0.
  • Keep only the c inside the interval: for x³ − x on [0, 2], c = 2/√3.

Questions students ask

When can you use L'Hôpital's rule?

Only when substituting gives 0/0 or ∞/∞. Check by substituting first. If the limit is already a number, the rule does not apply and using it gives a wrong answer. If the form is 0 · ∞ or ∞ − ∞, rewrite it as a quotient first.

Is L'Hôpital's rule the quotient rule?

No. The quotient rule differentiates a fraction as one function. L'Hôpital's rule replaces a fraction by a new fraction whose top is the derivative of the old top and whose bottom is the derivative of the old bottom, each taken on its own.

What does the Mean Value Theorem actually say?

If a function is continuous on a closed interval and differentiable inside it, there is at least one point where the instantaneous rate of change equals the average rate of change over the interval. In the picture, some tangent line is parallel to the chord joining the endpoints.

How do you find c in the Mean Value Theorem?

Compute the chord slope (f(b) − f(a))/(b − a), differentiate f, set f'(c) equal to the chord slope, and solve. Keep only the solutions strictly between a and b. The theorem promises at least one.

What happens if the function is not differentiable?

The theorem's conclusion can fail. The absolute value function on [−1, 1] has chord slope 0 and no point where its derivative is 0, because it has no derivative at the corner. That is why the hypothesis is checked before the theorem is used.

Put tonight's studying on rails

YSR Studies turns your notes, lectures and course into cards that come back before you forget, a tutor that makes you try first, and a map of what you know. Free, five hours a month, no card asked.

Open YSR Studies

Read next

Sources

  1. OpenStax (2016). Calculus Volume 1, chapter 4, Applications of Derivatives: 4.4 The Mean Value Theorem; 4.8 L'Hôpital's Rule. OpenStax, Rice University. Cited, not quoted; no problem reproduced.
  2. Sweller, J., & Cooper, G. A. (1985). The use of worked examples as a substitute for problem solving in learning algebra. Cognition and Instruction, 2(1), 59–89. https://doi.org/10.1207/s1532690xci0201_3
  3. Booth, J. L., Lange, K. E., Koedinger, K. R., & Newton, K. J. (2013). Using example problems to improve student learning in algebra: Differentiating between correct and incorrect examples. Learning and Instruction, 25, 24–34. https://doi.org/10.1016/j.learninstruc.2012.11.002
  4. YSR Studies (2026). The Calculus I course map: Rolle's theorem and the Mean Value Theorem is idea 11 of 26 and indeterminate forms and L'Hôpital's rule idea 15. Neither is in the MCV4U map.