{
  "id": "lhopitals-rule",
  "title": "L’Hôpital’s Rule",
  "lang": "en",
  "source_lang": "en",
  "summary": "L’Hôpital’s rule evaluates certain indeterminate limits of quotients by replacing the numerator and denominator with their derivatives, subject to specific hypotheses.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "L’Hospital’s rule",
    "Bernoulli–L’Hôpital rule"
  ],
  "generated_at": "2026-11-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/lhopitals-rule/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/lhopitals-rule/",
      "json": "https://aiwiki.page/zh/lhopitals-rule.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "L’Hôpital’s rule is a theorem in calculus that evaluates certain limits of quotients by comparing the derivatives of their numerators and denominators. It applies principally to the indeterminate forms \\(0/0\\) and \\(\\infty/\\infty\\). Under appropriate differentiability and nonvanishing conditions, if the quotient of the derivatives has a limit, then the original quotient has the same limit. The rule gives a sufficient method for finding a limit, not a universal procedure for differentiating fractions or a necessary condition for a quotient to converge."
    },
    {
      "heading": "Statement",
      "text": "Let \\(f\\) and \\(g\\) be real-valued functions differentiable on an open interval immediately to one side of a point \\(a\\), with\n\n\\[g'(x)\\ne 0\\]\n\nthroughout that interval. Suppose either\n\n\\[\\lim_{x\\to a}f(x)=\\lim_{x\\to a}g(x)=0,\\]\n\nor both \\(f(x)\\) and \\(g(x)\\) tend to signed infinities as \\(x\\to a\\). The signs of those infinities need not agree.\n\nIf\n\n\\[\\lim_{x\\to a}\\frac{f'(x)}{g'(x)}=L,\\]\n\nwhere \\(L\\) is a real number, \\(+\\infty\\), or \\(-\\infty\\), then\n\n\\[\\boxed{\\lim_{x\\to a}\\frac{f(x)}{g(x)}=L.}\\]\n\nHere the limits are taken from the side on which the hypotheses hold. Analogous statements apply as \\(x\\to+\\infty\\) or \\(x\\to-\\infty\\). A two-sided limit at a finite point can be established by applying the rule separately from the left and right and obtaining the same result.\n\nThe assumptions ensure that \\(g(x)\\ne 0\\) sufficiently close to the limiting point. In the infinite-denominator case this follows directly from \\(|g(x)|\\to\\infty\\). In the zero-denominator case it follows from the nonvanishing derivative and the fact that \\(g(x)\\to0\\).\n\nA stronger infinite-denominator version\n\nFor the infinite-denominator case, the assumption that \\(f(x)\\) also tends to infinity can be dropped. It is enough that\n\n\\[|g(x)|\\to\\infty\\]\n\nand that the other differentiability and derivative-ratio hypotheses hold. This stronger version can establish the limit of \\(f/g\\) even when the behavior of \\(f\\) has not been determined separately.\n\nWhat is not required\n\nAt a finite limiting point \\(a\\), neither function needs to be defined or differentiable at \\(a\\) itself. The hypotheses concern values in a neighboring interval with \\(a\\) excluded. The derivatives also need not be continuous.\n\nThe rule is a statement about limits:\n\n\\[\\lim\\frac{f}{g}=\\lim\\frac{f'}{g'},\\]\n\nwhen its hypotheses hold. It does not assert the pointwise identity\n\n\\[\\frac{f(x)}{g(x)}=\\frac{f'(x)}{g'(x)}.\\]\n\nNor does it say that the derivative of \\(f/g\\) is \\(f'/g'\\); differentiating a quotient requires the quotient rule."
    },
    {
      "heading": "Why the rule works",
      "text": "The theoretical basis is Cauchy’s generalized mean value theorem. Under its hypotheses, this theorem relates a quotient of changes in two functions to a quotient of their derivatives at an intermediate point.\n\nConsider the \\(0/0\\) case as \\(x\\to a^+\\). Extend the functions to the endpoint by defining\n\n\\[f(a)=g(a)=0.\\]\n\nBecause both functions tend to zero, these extensions are continuous at \\(a\\). Cauchy’s mean value theorem gives a point \\(c_x\\in(a,x)\\) such that\n\n\\[\\frac{f(x)-f(a)}{g(x)-g(a)} = \\frac{f'(c_x)}{g'(c_x)}.\\]\n\nConsequently,\n\n\\[\\frac{f(x)}{g(x)} = \\frac{f'(c_x)}{g'(c_x)}.\\]\n\nAs \\(x\\to a^+\\), the intermediate point \\(c_x\\) also tends to \\(a\\), so the assumed limit of the derivative quotient yields the desired result.\n\nFor an infinite denominator, the proof compares increments from a fixed interior point \\(b\\):\n\n\\[\\frac{f(x)-f(b)}{g(x)-g(b)}.\\]\n\nCauchy’s mean value theorem bounds this quotient using values of \\(f'/g'\\) between \\(b\\) and \\(x\\). The point \\(b\\) is chosen sufficiently close to the limiting endpoint, or sufficiently far toward infinity, that those derivative ratios are close to their limit. Since \\(|g(x)|\\to\\infty\\), the fixed quantities \\(f(b)\\) and \\(g(b)\\) become negligible relative to the denominator. A similar argument using inequalities handles infinite values of \\(L\\)."
    },
    {
      "heading": "Examples",
      "text": "A \\(0/0\\) limit\n\nFor the standard trigonometric functions,\n\n\\[\\lim_{x\\to0}\\frac{\\sin x}{x} = \\lim_{x\\to0}\\frac{\\cos x}{1} =1.\\]\n\nThis is a valid application once the derivative formula for sine has been established independently. In developments of calculus that use \\(\\lim_{x\\to0}\\sin x/x=1\\) to prove that derivative formula, using L’Hôpital’s rule to prove the same foundational limit would be circular.\n\nAn infinite-denominator limit\n\nUsing the derivative of the natural logarithm,\n\n\\[\\lim_{x\\to+\\infty}\\frac{\\ln x}{x} = \\lim_{x\\to+\\infty}\\frac{1/x}{1} =0.\\]\n\nThus \\(\\ln x\\) grows more slowly than \\(x\\).\n\nRepeated application\n\nSometimes the first derivative quotient is still indeterminate. For example,\n\n\\[\\lim_{x\\to0}\\frac{e^x-1-x}{x^2} = \\lim_{x\\to0}\\frac{e^x-1}{2x} = \\lim_{x\\to0}\\frac{e^x}{2} = \\frac12.\\]\n\nThe original quotient and the first derivative quotient both have form \\(0/0\\), so the rule can be applied twice. Logically, the second application first establishes the limit needed to justify the first.\n\nRepeated differentiation is valid only while the hypotheses remain satisfied. It is not an instruction to keep differentiating indefinitely.\n\nAn infinite limit\n\nThe rule also accommodates an infinite derivative-ratio limit:\n\n\\[\\lim_{x\\to0^+}\\frac{x}{x^2} = \\lim_{x\\to0^+}\\frac{1}{2x} =+\\infty.\\]\n\nFrom the left the limit is \\(-\\infty\\), so no two-sided limit exists, even though the one-sided conclusions are valid."
    },
    {
      "heading": "Transforming other indeterminate forms",
      "text": "The rule applies directly to quotients, but algebraic transformations can turn other indeterminate expressions into suitable quotient forms.\n\nProducts and differences\n\nAn expression of form \\(0\\cdot\\infty\\) can sometimes be rewritten as a quotient. For example,\n\n\\[x\\ln x=\\frac{\\ln x}{1/x} \\qquad (x>0).\\]\n\nAs \\(x\\to0^+\\), the quotient has an infinite numerator and denominator, and\n\n\\[\\lim_{x\\to0^+}x\\ln x = \\lim_{x\\to0^+}\\frac{1/x}{-1/x^2} = \\lim_{x\\to0^+}(-x) =0.\\]\n\nAn expression of form \\(\\infty-\\infty\\) may require a common denominator or rationalization before the rule becomes relevant. Such transformations can also resolve the limit without differentiation. For example,\n\n\\[\\sqrt{x^2+x}-x = \\frac{x}{\\sqrt{x^2+x}+x} = \\frac{1}{\\sqrt{1+1/x}+1} \\longrightarrow\\frac12\\]\n\nas \\(x\\to+\\infty\\).\n\nVariable powers\n\nFor a positive base, an expression\n\n\\[y(x)=u(x)^{v(x)}\\]\n\ncan be analyzed by taking logarithms:\n\n\\[\\ln y(x)=v(x)\\ln u(x).\\]\n\nThis converts power forms such as \\(0^0\\), \\(1^\\infty\\), and \\(\\infty^0\\) into products that may then be rewritten as quotients.\n\nFor example,\n\n\\[\\ln(x^x)=x\\ln x\\to0 \\qquad (x\\to0^+).\\]\n\nBy continuity of the exponential function,\n\n\\[\\lim_{x\\to0^+}x^x=1.\\]\n\nThis is a statement about a limit, not an assignment of a value to \\(0^0\\)."
    },
    {
      "heading": "Limitations and common errors",
      "text": "An indeterminate form is essential\n\nDifferentiating numerator and denominator without checking the limiting form can give an incorrect result. For example,\n\n\\[\\lim_{x\\to0}\\frac{1+x}{2+x}=\\frac12,\\]\n\nwhereas the quotient of derivatives is \\(1\\). Neither the \\(0/0\\) nor the infinite-denominator hypotheses hold.\n\nThe derivative quotient need not converge\n\nThe existence of a limit for \\(f'/g'\\) is sufficient, but not necessary, for \\(f/g\\) to have a limit. Consider\n\n\\[\\frac{x+\\sin x}{x} = 1+\\frac{\\sin x}{x} \\longrightarrow1 \\qquad (x\\to+\\infty).\\]\n\nHowever,\n\n\\[\\frac{(x+\\sin x)'}{x'}=1+\\cos x\\]\n\nhas no limit. L’Hôpital’s rule is therefore inconclusive for this expression, despite the existence of the original limit.\n\nIn particular, failure of the derivative quotient to converge does not establish divergence of the original quotient.\n\nNonvanishing conditions matter\n\nThe standard theorem requires \\(g'\\ne0\\) throughout a suitable one-sided interval or sufficiently far along an infinite interval. Zeros of \\(g'\\) accumulating at the limiting point prevent direct application of this version of the theorem. More specialized variants require additional hypotheses.\n\nOther methods may be simpler\n\nFactoring, rationalization, elementary bounds, or known limits can avoid unnecessary differentiation. Taylor expansions and asymptotic expansions can also reveal the leading terms responsible for a limit. For example,\n\n\\[e^x-1-x=\\frac{x^2}{2}+O(x^3)\\]\n\nimmediately gives the limit \\(1/2\\) after division by \\(x^2\\). Here \\(O(x^3)\\) uses big-O notation to describe the size of the remainder near zero."
    },
    {
      "heading": "History",
      "text": "The rule is named after the French mathematician Guillaume de l’Hôpital, who published it in his 1696 textbook Analyse des infiniment petits pour l’intelligence des lignes courbes. The spelling “L’Hospital” reflects an older spelling of his surname.\n\nThe result originated with the Swiss mathematician Johann Bernoulli, who taught L’Hôpital calculus and supplied him with mathematical material. Its conventional name reflects its influential publication in L’Hôpital’s textbook rather than sole authorship of the underlying result. The modern formulation, with explicit limit and differentiability hypotheses, belongs to the later rigorous development of mathematical analysis."
    }
  ],
  "links": [
    "calculus",
    "limit",
    "derivative",
    "indeterminate-form",
    "mathematical-function",
    "real-number",
    "mean-value-theorem",
    "continuous-function",
    "trigonometric-functions",
    "natural-logarithm",
    "exponential-function",
    "taylor-series",
    "asymptotic-expansion",
    "big-o-notation",
    "mathematical-analysis"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}