L'Hopital's rule conditions

1.: The rule can also be applied in the case of $\frac{a}{\infty}$ and even when the limit of $f$ does not exist (but the limit of $g$ is $\infty$); but it's rarely told. To see why does it fail otherwise, you need to look at the proof. The most general case, when $g \to \infty$ can be proven with the Mean Value theorem and Stolz-Cesaro theorem and the $\frac{0}{0}$ is a consequence of this case. The problem comes from the Stolz-Cesaro theorem: the theorem requires the denominator to diverge to infinity.

2.: As I pointed it out on 1., they don't need to be zero; just their limits need to be "critical", i.e. $\frac{0}{0}$ or $\frac{\infty}{\infty}$ or just $g\to \infty$.

3.: The proper requirement is $g' \neq 0$ around $a$. This is needed because the Mean Value Theorem would not be applicable in the proof otherwise.

4.: No, condition 3 does not imply that.


You can easily come up with counterexamples for applying L'Hôpital's rule when the limit is not of the form $0/0$ or $\infty/\infty$. For any $a\in\mathbb{R}$: $$\lim_{x\to a}\frac{x}{1+x}=\frac{a}{1+a}\neq1=\lim_{x\to1}\frac{1}{1}=\lim_{x\to1}\frac{(x)'}{(1+x)'}.$$ The limit is never of the form $0/0$ or $\infty/\infty$ and clearly L'Hôpital's rule does not work on this example. To see why the rule does work for limits of the $0/0$ or $\infty/\infty$ form, see any analysis textbook for a proof (for example, Rudin's Principles of Mathematical Analysis).

We don't strictly need $g'(a)\neq0$. For example: $$\lim_{x\to0}\frac{x^2}{x^2+x^3}=\lim_{x\to0}\frac{2x}{2x+3x^2}=\lim_{x\to0}\frac{2}{2+6x}=1,$$ where we applied L'Hôpital's rule twice, but the second limit still is of the form $0/0$.

The limit $f'/g'$ may fail to exist even when the conditions for L'Hôpital's rule are satisfied and the limit $f/g$ exists; the classic example is: $$\lim_{x\to\infty}\frac{x+\sin(x)}{x}=1,$$ but upon applying L'Hôpital's rule we obtain: $$\lim_{x\to\infty}1+\cos(x),$$ for which the limit does not exist.