I have been trying to understand this limit:
$$\lim_{x \to 0}\frac{tan(x)-sin(x)}{x^2}$$
When aplying the l'Hopital rule I arrive to the limit being $0$ but when doing things organically I get an indetermination:
$$ \lim_{x \to 0}\frac{tan(x)-sin(x)}{x^2}=\lim_{x \to 0}\frac{tan(x)}{x^2}-\frac{sin(x)}{x^2}= \lim_{x \to 0} \frac{sin(x)}{cos(x)x^2}-\frac{sin(x)}{x^2}= \lim_{x \to 0}\frac{sin(x)}{x^2}(\frac{1}{cos(x)}-1) $$
Clearly $\lim_{x \to 0} \frac{1}{cos(x)}=1$ hence $(\frac{1}{cos(x)}-1)=0$ and I could well aply $\lim_{x \to 0}\frac{sin(x)}{x}=1$ but that still leaves $\lim_{x \to 0}\frac{1}{x}$ which is undetermined because it has different limits on $0^-$ and $0^+$.
Is there something I'm missing?