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?
 A: 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:


*

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

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

*$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.
