A function which changes sign infinitely many times, but for which L'Hôpital's rule works I found a visual proof of the L'Hôpital's rule by Giorgio Goldoni which uses an additional hypothesis: $g'(x)$ (i.e. the function which is at the denominator) cannot change its sign.
My question is this: is this additional hypothesis reductive? Does it exist a function whose first derivative changes sign infinitely many times, but for which the De l'Hospital rule works?
 A: If the denominator changes sign infinitely many times as $x\to a$, then by Darboux' theorem it will be $0$ at points arbitarily close to $a$. That means $\lim_{x\to a} \frac{f'}{g'}$ fails to exist at all, because it can only exist if there is a set $A\ni a$ such that $A$ is open in the domain of $\frac{f}{g}$, and $\frac{f'}{g'}$ is defined everywhere on $A\setminus\{a\}$.
Also, if $g'$ changes sign infinitely often, then so does $g''$ if it exists (and so forth by induction), so no matter what order of L'Hôpital we use, it will fail to work. Thus, higher-order L'Hôpital cannot work for such functions either.
A: Update: As it turned out, my answer below isn't correct because $\frac{f'(x)}{g'(x)}$ fraction cannot be simply reduced, because it's not defined in points where $g(x)=0$ (see comments). However, I am not removing the post, because it's can serve as a demonstration how one can make a mistake solving problems like this.

Yes, there do exist such example, but it doesn't mean that the $g'(x)\not=0$ condition is reductive - it's a sufficient condition, but not necessary: 
Consider functions $f(x)=-x*sin(\frac{1}{x})$ and $g(x)=2*f(x)$ and assume $a=0$.
We have $\lim_{x \to 0}f(x)=0$ and $\lim_{x \to 0}g(x)=0$

From one hand, obviously, $$\lim_{x \to 0}\frac{f(x)}{g(x)}=\lim_{x \to 0}\frac{f(x)}{2*f(x)}=\frac{1}{2}$$
Now, $f'(x)=\frac{cos(\frac{1}{x})}{x}-sin(\frac{1}{x})$ and $g'(x)=2*\frac{cos(\frac{1}{x})}{x}-2*sin(\frac{1}{x})$
And here we also have $$\lim_{x \to 0}\frac{f'(x)}{g'(x)}=\lim_{x \to 0}\frac{\frac{cos(\frac{1}{x})}{x}-sin(\frac{1}{x})}{2*\frac{cos(\frac{1}{x})}{x}-2*sin(\frac{1}{x})}=\frac{1}{2}$$
Which means that De l'Hopital rule works for this function, but $g'(x)$ changes its sign infinitely many times.
