I came across with this limit:
$\lim_{x \to 0}\frac{\tan x - \sin x}{x^3}$
I started working it out this way:
$\lim_{x \to 0}(\frac{\tan x}{x}\times \frac{1}{x^2}) - (\frac{sin x }{x}\times \frac{1}{x^2})$ = $\lim_{x \to 0}(1\times \frac{1}{x^2}) - (1\times \frac{1}{x^2})$ = $\lim_{x \to 0}\frac{1}{x^2} - \frac{1}{x^2}$ = $0$
This is wrong since the solution is $\frac{1}{2}$. So my question is why can't I do this?
$$\frac{\tan x-\sin x}{x^3}=\frac{\sin x}x\cdot\frac{\frac1{\cos x}-1}{x^2}=\frac{\sin x}x\cdot\frac1{\cos x}\cdot\frac{1-\cos x}{x^2}=$$
$$=\frac{\sin x}x\cdot\frac1{\cos x}\cdot\frac{\sin^2x}{x^2}\cdot\frac1{1+\cos x}\xrightarrow[x\to0]{}1\cdot1\cdot1^2\cdot\frac1{1+1}=\frac12$$