Consider the first example using repeated l'Hôpital:

$$\lim_{x \rightarrow 0} \frac{x^4}{x^4+x^2} = \lim_{x \rightarrow 0} \frac{\frac{d}{dx}(x^4)}{\frac{d}{dx}(x^4+x^2)} = \lim_{x \rightarrow 0} \frac{4x^3}{4x^3+2x} = ... = \lim_{x \rightarrow 0}\frac{\frac{d}{dx}(24x)}{\frac{d}{dx}(24x)} = \frac{24}{24}=1 $$

Consider the following example using a different method:

$$ \lim_{x \rightarrow 0} \frac{x^4}{x^4+x^2} = \lim_{x \rightarrow 0}\frac{\frac{x^4}{x^4}}{\frac{x^4}{x^4}+\frac{x^2}{x^4}} = \lim_{x \rightarrow 0} \frac {1}{1 +\frac{1}{x^2}} = \frac {1}{1+\infty} = \frac{1}{\infty}=0 $$

The graph here clearly tells me the limit should be $0$, but why does l'Hôpital fail?