L'Hôpital's rule (source code)

= L'Hôpital's rule
{c}
{wiki}

= L'Hopital rule
{c}
{synonym}

A standard one-sided version is as follows. Let $f,g$ be <differentiable> on $(a,b)$, with $g'(x)\ne0$ there. Suppose either $f(x),g(x)\to0$ as $x\downarrow a$, or $|g(x)|\to\infty$ there. If
$$
\lim_{x\downarrow a}\frac{f'(x)}{g'(x)}=L\in\mathbb R\cup\{\pm\infty\},
$$
then $f(x)/g(x)\to L$. The denominator is nonzero sufficiently near the endpoint. Corresponding versions apply at other finite endpoints and at infinity. The quotient of <derivatives> must have a limit; differentiating numerator and denominator is not an unrestricted quotient identity.

In the zero-over-zero case, extend both <functions> continuously to the endpoint by zero and use the <Cauchy mean value theorem> to write $f(x)/g(x)=f'(\xi_x)/g'(\xi_x)$ for an intermediate $\xi_x$. For example, $\sin x/x\to1$ as $x\to0$. The rule is sufficient, not necessary: $(x+\sin x)/x\to1$ as $x\to\infty$, while its derivative ratio $1+\cos x$ has no limit. Without the required indeterminate setting, it can give a wrong answer: $(x+1)/x$ diverges at zero although its derivative ratio is one.