# Proof of l'Hôpital's rule, g'(0)=0

l'Hôpital's rule for limits where $\mathbf{x\to 0}$. Let $f$ and $g$ be continuous and differentiable in a neighborhood of $x=0$. Then, if $$\lim_{x\to 0} f(x) = \lim_{x\to 0} g(x) =0\,,$$ the following simplification can be made: $$\lim_{x\to 0} \frac{f(x)}{g(x)}=\lim_{x\to 0} \frac{f'(x)}{g'(x)}\,,$$ provided that the limit in the right-hand side exists.

Problem. The proof in my textbook assumes that $g'(0)\neq 0$. In many cases, however, that is not true, but the theorem can still be used. So somehow there must be a way to prove the theorem without this, or with some weaker requirement.

Failed attempt. Rewrite with Maclaurin's formula: $$\lim_{x\to 0} \frac{f(x)}{g(x)}=\lim_{x\to 0}\frac{f(0)+f'(\xi)x}{g(0)+g'(\zeta)x}=\lim_{x\to 0}\frac{0+f'(\xi)x}{0+g'(\zeta)x}=\lim_{x\to 0}\frac{f'(\xi)}{g'(\zeta)}\,,$$ where $\xi$ and $\zeta$ are somewhere between 0 and $x$. When $x\to 0$, both $\xi$ and $\zeta$ go to zero, but when $g'(0)=0$, as some helpful people concluded here, that doesn't necessarily mean that last limit is equal to $\lim_{x\to 0}f'(x)/g'(x)$.

Is this a dead end, or can I do something to make this work? Or are there any other proof methods that could be understood with basic calculus skills?

• check "Proof of L'Hospital's Rule" in blog post paramanands.blogspot.com/2013/11/… Your second approach is near to the actual proof. The actual proof ensures that you can find $p, q$ with $p = q$. Also the limitation $g'(x) \neq 0$ is obvious because if $g'(x)$ vanishes then $\lim_{x \to 0}f'(x)/g'(x)$ won't exist. – Paramanand Singh Nov 28 '13 at 16:27
• I don't think there is anything wrong with your textbook assuming $g'(x)\not=0$ because if it is equal to $0$, then $g(x)$ is a non-zero constant function. In which case, l'Hôpitals rule doesn't apply. – user44322 Nov 28 '13 at 16:35
• Try using rolles theorem – Ilaya Raja S May 15 '15 at 17:14
• Clarification: my problem was that the proof in my book only works for $g'(0)\neq 0$, and that is pretty restrictive. For example, that wouldn't allow us to use l'Hôpital on things like $$\lim_{x\to 0} \frac{1-\cos (\sin x)}{\sin^2 x}\,.$$ – Oskar Henriksson Nov 24 '17 at 0:17

The fundamental problem with my original approach was that $\xi$ and $\zeta$ might tend to $0$ at different rates. The solution therefore lies in finding a way to rewrite $f(x)/g(x)$ to something like $f'(\xi)/g'(\xi)$ where we have the same $\xi$ both in the numerator and the denominator.

This following proof is based on this blog post by Paramanand Singh (recommended in the comments to my original post) and this text by Lorenzo Sadun. The key in both of their proofs is to extend the mean value theorem in the following way:

Cauchy's mean value theorem. Let $f$ and $g$ be real-valued functions that are continious on $[a,b]$ and differentiable on $(a,b)$. Then there exists some $\xi\in (a,b)$ such that $$f'(\xi)\cdot [g(b)-g(a)]=g'(\xi)\cdot [f(b)-f(a)]\,.$$

Proof. Very similar to the proof of the usual mean value theorem; just apply Rolle's theorem (check that it really is applicable!) to $$h(x)=[f(x)-f(a)]\cdot[g(b)-g(a)]-[g(x)-g(a)]\cdot [f(b)-f(a)]\,.$$

We are now ready to prove a variation of l'Hôpital's rule, where we don't require $g'(0)\neq 0$ (in fact, we don't even require that $g'(0)$ exists!). Instead we make the much milder assumption that $g'(x)\neq 0$ in some punctured neighborhood around $x=0$.

L'Hôpital's rule. Let $f$ and $g$ be continious in a neighbourhood of $x=0$, and differentiable in a punctured neighborhood of $x=0$. Suppose that $g'(x)\neq 0$ in some punctured neightborhood of $x=0$, and that $$\lim_{x\to 0} f(x)=\lim_{x\to 0} g(x)=0\:\:\text{and}\:\:\lim_{x\to 0} \frac{f'(x)}{g'(x)}= L\,.$$ Then $$\lim_{x\to 0} \frac{f(x)}{g(x)}=L\,.$$

Proof. Start by noting that we, by the continuity of $f$ and $g$, have $$f(0)=\lim_{x\to 0} f(x)=0\ \ \mathrm{and} \ \ g(0)=\lim_{x\to 0} g(x)=0\,.$$

We will now show the right-sided limit $$\lim_{x\downarrow 0} \frac{f(x)}{g(x)}=L.$$ Rhe proof for the left-sided version is going to be analogous.

From the premises of the theorem, we note that if we choose $a>0$ sufficiently small, we can make the following three statements hold:

1. $f$ and $g$ are definined and continious on $[0,a]$, and differentiable on $(0,a)$.

2. $g'(x)\neq 0$ for all $x\in (0,a)$.

3. $g(a)\neq g(0)=0$.Otherwise there would exist some $c\in (0,a)$ such that $g'(c)=0$ by Rolle's theorem, which would contradict statement (2).

Statement (1) gives, by Cauchy's mean value theorem, that $$f'(\xi)\cdot [g(a)-g(0)] = g'(\xi)\cdot [f(a)-f(0)]$$ for some $\xi\in (0,a)$. With $f(0)=g(0)=0$ this means that $$f'(\xi)\cdot g(a) = g'(\xi)\cdot f(a)\,,$$ which we, by statement (2) och (3) can be rewritten as $$\frac{f(a)}{g(a)}=\frac{f'(\xi)}{g'(\xi)}\,.$$

We will now apply this to the the right-sided limit that we are trying to derive. Since $x$ can be assumed to be arbitrarily small and positive as $x\downarrow 0$, we can write $$\lim_{x\downarrow 0} \frac{f(x)}{g(x)}=\lim_{x\downarrow 0} \frac{f'(\xi(x))}{g'(\xi(x))},$$ for some $\xi(x)\in (0,x)$, for all suffciently small $x$. By an easy exersise in the $\varepsilon$-$\delta$-definition of a limit (we shouldn't just blindly make the substitution $t=\xi(x)$ because of the risk of running into this mess), we can now show that $$\lim_{x\downarrow 0} \frac{f'(\xi(x))}{g'(\xi(x))} =\lim_{t\downarrow 0}\frac{f'(t)}{g'(t)}=L\,.$$ This gives us the desried right-sided limit: $$\lim_{x\downarrow 0} \frac{f(x)}{g(x)}= L\,.$$

Now reapeat the argument above with with left-sided neighbourhoods of $x=0$ instead of right-sided ones, to show that $$\lim_{x\uparrow 0} \frac{f(x)}{g(x)}= L\,.$$ This concludes the proof.

• By the way there is no risk of "running into this mess" if we use the substitution $t=\xi(x)$. The important point is that limit of $f'/g'$ exists finitely or infinitely. The risk you mention appears only when the limit of $f'/g'$ does not exist because in that case it may happen that for some $\xi(x)$ the limit $f'(\xi(x)) /g'(\xi(x))$ may exist. See this question for a concrete example. – Paramanand Singh Nov 25 '17 at 7:44
• And I am glad that my blog post is useful to someone. +1 for your answer. – Paramanand Singh Nov 25 '17 at 7:48
• I just ran into another proof following this idea, and a very nice, general formulation of l'Hôpital's rule in this article by A.E. Taylor from 1952: jstor.org/stable/2307183 – Oskar Henriksson May 2 '18 at 1:11